PaGMO
1.1.5
|
VEGA based multi-objective algorithm. More...
#include <vega.h>
Data Structures | |
struct | crossover |
Crossover operator info. More... | |
struct | mutation |
Mutation operator info. More... | |
Public Member Functions | |
vega (int gen=1, const double &cr=.95, const double &m=.02, int elitism=1, mutation::type mut=mutation::GAUSSIAN, double width=0.1, crossover::type cro=crossover::EXPONENTIAL) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. | |
std::string | get_name () const |
Algorithm name. | |
void | evolve (population &) const |
Evolve implementation. 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. | |
VEGA based multi-objective algorithm.
Implements of the VEGA (Vector evaluated genetic algorithms) multi-objective agorithm. This algorithm is based on a simple genetic algorithm where the initial population is split into the number of objectives. Each sub populations are associated one objective as fitness function and sub populations are selected according to it with a proportionate selection process. Then, the subpopulations are put into a mating pool. The resulting population is mutated.
pagmo::algorithm::vega::vega | ( | int | gen = 1 , |
const double & | cr = .95 , |
||
const double & | m = .02 , |
||
int | elitism = 1 , |
||
mutation::type | mut = mutation::GAUSSIAN , |
||
double | width = 0.1 , |
||
crossover::type | cro = crossover::EXPONENTIAL |
||
) |
Constructor.
Allows to specify in detail all the parameters of the vega multi-objective algorithm.
[in] | gen | Number of generations to evolve. |
[in] | cr | Crossover probability (of each allele if binomial crossover) |
[in] | m | Mutation probability (of each allele) |
[in] | elitism | The best individual is reinserted in the population each elitism generations |
[in] | mut | Mutation type. One of sga::mutation::GAUSSIAN, sga::mutation::RANDOM |
[in] | width | Mutation width. When gaussian mutation is selected is the width of the mutation |
[in] | cro | Crossover type. One of sga::crossover::BINOMIAL, sga::crossover::EXPONENTIAL |
value_error | if gen is negative, crossover probability is not , mutation probability is not , elitism is <=0 |
|
virtual |
Evolve implementation.
Run the vega algorithm for the number of generations specified in the constructors.
[in,out] | pop | input/output pagmo::population to be evolved. |
We now set the cleared pop. cur_x is the best_x, re-evaluated with new seed.
Implements pagmo::algorithm::base.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.