PaGMO
1.1.5
|
Differential Evolution Algorithm - 1220 (our version!!) More...
#include <de_1220.h>
Public Member Functions | |
de_1220 (int=100, int=1, const std::vector< int > &=construct_default_strategies(), bool=true, double=1e-6, double=1e-6) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. | |
void | evolve (population &) const |
Evolve implementation. More... | |
std::string | get_name () const |
Algorithm name. | |
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. | |
Differential Evolution Algorithm - 1220 (our version!!)
Since Differential Evolution has always been one of PaGMO's best algorithm we dared to propose our own algoritmic variant we call DE 1220. Our variant has self-adaptation of CR, F and the mutation variant, so that the only parameter left to be specified is the population size.
NOTE: when called on mixed-integer problems DE 1220 treats the integer part as fixed and optimizes the continuous part.
NOTE2: when called on stochastic optimization problems, DE 1220 changes the seed at the end of each generation.
NOTE3: the pagmo::population::individual_type::cur_v is also updated in DE 1220 as soon as a new chromosome is accepted.
pagmo::algorithm::de_1220::de_1220 | ( | int | gen = 100 , |
int | variant_adptv = 1 , |
||
const std::vector< int > & | allowed_variants = construct_default_strategies() , |
||
bool | memory = true , |
||
double | ftol = 1e-6 , |
||
double | xtol = 1e-6 |
||
) |
Constructor.
Allows to specify in detail all the parameters of the algorithm.
[in] | gen | number of generations. |
[in] | variant_adptv | parameter adaptation scheme to be used (one of 1..2) |
[in] | allowed_variants | a vector of integers containing mutation variants allowed (in the 1..18 range) |
[in] | memory | when true the algorithm re-initialize randomly the parameters at each call |
[in] | ftol | stopping criteria on the x tolerance |
[in] | xtol | stopping criteria on the f tolerance |
value_error | if gen is negative, variant_adptv is not in [1,2], varianis contains value outside the [1,18] range |
Definition at line 55 of file de_1220.cpp.
|
virtual |
Evolve implementation.
Run the DE-1220 algorithm for the number of generations specified in the constructors. At each improvments velocity is also updated.
[in,out] | pop | input/output pagmo::population to be evolved. |
Implements pagmo::algorithm::base.
Definition at line 84 of file de_1220.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.
Definition at line 588 of file de_1220.cpp.