PaGMO
1.1.5
|
Co-Evolution constraints handling meta-algorithm. More...
#include <cstrs_co_evolution.h>
Public Types | |
enum | method_type { SIMPLE = 0, SPLIT_NEQ_EQ = 1, SPLIT_CONSTRAINTS = 2 } |
Type of co-evolution. More... | |
Public Member Functions | |
cstrs_co_evolution (const base &=jde(), const base &=sga(1), int pop_penalties_size=30, int gen=1, method_type method=SIMPLE, double pen_lower_bound=0., double pen_upper_bound=100000., double=1e-15, double=1e-15) | |
Constructor. More... | |
cstrs_co_evolution (const cstrs_co_evolution &) | |
Copy constructor. | |
base_ptr | clone () const |
Clone method. | |
void | evolve (population &) const |
Evolve implementation. More... | |
std::string | get_name () const |
Algorithm name. | |
base_ptr | get_algorithm () const |
Get a copy of the internal local algorithm. More... | |
void | set_algorithm (const base &) |
Set algorithm. More... | |
Public Member Functions inherited from pagmo::algorithm::base | |
base () | |
Default constructor. More... | |
virtual | ~base () |
Trivial destructor. More... | |
std::string | human_readable () const |
Return human readable representation of the algorithm. More... | |
void | set_screen_output (const bool p) |
Setter-Getter for protected m_screen_output data. More... | |
bool | get_screen_output () const |
Gets screen output. More... | |
void | reset_rngs (const unsigned int) const |
Resets the seed of the internal rngs using a user-provided seed. More... | |
Protected Member Functions | |
std::string | human_readable_extra () const |
Extra human readable algorithm info. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Attributes inherited from pagmo::algorithm::base | |
bool | m_screen_output |
Indicates to the derived class whether to print stuff on screen. | |
rng_double | m_drng |
Random number generator for double-precision floating point values. | |
rng_uint32 | m_urng |
Random number generator for unsigned integer values. | |
unsigned int | m_fevals |
A counter for the number of function evaluations. | |
Co-Evolution constraints handling meta-algorithm.
Co-Evolution constraints handling is a meta-algorithm that allow to solve constrained optimization problems. The key idea of this constraint handling technique is to use two different populations that evolves the one after the other. The first one has an objective function penalized with constraints. The penalty coefficients are encoded in the population 2 which evolves depending on the average population 1 fitness.
This meta-algorithm is based on the problems cstrs_co_evolution and cstrs_co_evolution_2.
Note: This constraints handling technique can only be used for MINIMIZATION problems.
Definition at line 62 of file algorithm/cstrs_co_evolution.h.
Type of co-evolution.
Definition of three types of co-evolution: SIMPLE, SPLIT_NEQ_EQ and SPLIT_CONSTRAINTS. The SIMPLE, is co-evolution defined by COELLO. The SPLIT_NEQ_EQ, splits equalities and inequalities constraints (4 penalty coefficients). The SPLIT_CONSTRAINTS split the number of coefficients upon the number of penalty coefficients (2 * c_dimension).
Definition at line 73 of file algorithm/cstrs_co_evolution.h.
pagmo::algorithm::cstrs_co_evolution::cstrs_co_evolution | ( | const base & | original_algo = jde() , |
const base & | original_algo_penalties = sga(1) , |
||
int | pop_penalties_size = 30 , |
||
int | gen = 1 , |
||
method_type | method = SIMPLE , |
||
double | pen_lower_bound = 0. , |
||
double | pen_upper_bound = 100000. , |
||
double | ftol = 1e-15 , |
||
double | xtol = 1e-15 |
||
) |
Constructor.
Constructs a co-evolution adaptive algorithm
[in] | original_algo | pagmo::algorithm to use as 'original' optimization method |
[in] | original_algo_penalties | pagmo::algorithm to use as 'original' optimization method for population representing the penaltiesweights |
[in] | pop_penalties_size | population size for the penalty encoding population. |
[in] | gen | number of generations. |
[in] | method | the method used for the population 2. Three possibililties are available: SIMPLE, SPLIT_NEQ_EQ and SPLIT_CONSTRAINTS. The simple one is the original version of the Coello/He implementation. The SPLIT_NEQ_EQ, splits the equalities and inequalities constraints in two different sets for the penalty weigths, containing respectively inequalities and equalities weigths. The SPLIT_CONSTRAINTS splits the constraints in M set of weigths with M the number of constraints. |
[in] | pen_lower_bound | the lower boundary used for penalty. |
[in] | pen_upper_bound | the upper boundary used for penalty. |
[in] | ftol | stopping criteria on the f tolerance. |
[in] | xtol | stopping criteria on the x tolerance. |
value_error | if stop is negative |
Definition at line 64 of file algorithm/cstrs_co_evolution.cpp.
|
virtual |
Evolve implementation.
Run the co-evolution algorithm
[in,out] | pop | input/output pagmo::population to be evolved. |
Implements pagmo::algorithm::base.
Definition at line 105 of file algorithm/cstrs_co_evolution.cpp.
base_ptr pagmo::algorithm::cstrs_co_evolution::get_algorithm | ( | ) | const |
Get a copy of the internal local algorithm.
Definition at line 311 of file algorithm/cstrs_co_evolution.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.
Definition at line 331 of file algorithm/cstrs_co_evolution.cpp.
void pagmo::algorithm::cstrs_co_evolution::set_algorithm | ( | const base & | algo | ) |
Set algorithm.
A copy of the input algorithm will be set as the internal local algorithm.
[in] | algo | algorithm to be set as local algorithm. |
Definition at line 322 of file algorithm/cstrs_co_evolution.cpp.