PaGMO  1.1.5
Public Member Functions | Protected Member Functions | Friends
pagmo::algorithm::de Class Reference

Differential Evolution Algorithm. More...

#include <de.h>

Inheritance diagram for pagmo::algorithm::de:
Inheritance graph
[legend]

Public Member Functions

 de (int=100, double=0.8, double=0.9, int=2, 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.
 
void set_cr (double cr)
 Sets crossover parameter. More...
 
double get_cr () const
 Gets crossover parameter. More...
 
void set_f (double cr)
 Sets f parameter. More...
 
double get_f () const
 Gets f parameter. 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.
 

Detailed Description

Differential Evolution Algorithm.

de.jpg
Differential Evolution block diagram.

Differential Evolution is an heuristic optimizer developed by Rainer Storn and Kenneth Price.

''A breakthrough happened, when Ken came up with the idea of using vector differences for perturbing the vector population. Since this seminal idea a lively discussion between Ken and Rainer and endless ruminations and computer simulations on both parts yielded many substantial improvements which make DE the versatile and robust tool it is today'' (from the official web pages....)

The implementation provided for PaGMO derives from the code provided in the official DE web site and is suitable for box-constrained single-objective continuous optimization.

At each call of the evolve method a number of function evaluations equal to m_gen * pop.size() is performed.

NOTE: when called on mixed-integer problems DE treats the integer part as fixed and optimizes the continuous part.

NOTE2: when called on stochastic optimization problems, DE changes the seed at the end of each generation.

NOTE3: the velocity is also updated along DE whenever a new chromosome is accepted.

See also
http://www.icsi.berkeley.edu/~storn/code.html for the official DE web site
http://www.springerlink.com/content/x555692233083677/ for the paper that introduces Differential Evolution
Author
Dario Izzo (dario.nosp@m..izz.nosp@m.o@goo.nosp@m.glem.nosp@m.ail.c.nosp@m.om)

Definition at line 70 of file de.h.

Constructor & Destructor Documentation

pagmo::algorithm::de::de ( int  gen = 100,
double  f = 0.8,
double  cr = 0.9,
int  strategy = 2,
double  ftol = 1e-6,
double  xtol = 1e-6 
)

Constructor.

Allows to specify in detail all the parameters of the algorithm.

Parameters
[in]gennumber of generations.
[in]fweight coefficient (dafault value is 0.8)
[in]crcrossover probability (dafault value is 0.9)
[in]strategystrategy (dafault strategy is 2: /rand/1/exp)
[in]ftolstopping criteria on the x tolerance
[in]xtolstopping criteria on the f tolerance
Exceptions
value_errorif f,cr are not in the [0,1] interval, strategy is not one of 1 .. 10, gen is negative

Definition at line 50 of file de.cpp.

Member Function Documentation

void pagmo::algorithm::de::evolve ( population pop) const
virtual

Evolve implementation.

Run the DE algorithm for the number of generations specified in the constructors. At each improvments velocity is also updated.

Parameters
[in,out]popinput/output pagmo::population to be evolved.

Implements pagmo::algorithm::base.

Definition at line 76 of file de.cpp.

double pagmo::algorithm::de::get_cr ( ) const

Gets crossover parameter.

Returns
the crossover parameter

Definition at line 400 of file de.cpp.

double pagmo::algorithm::de::get_f ( ) const

Gets f parameter.

Returns
the f parameter

Definition at line 410 of file de.cpp.

std::string pagmo::algorithm::de::human_readable_extra ( ) const
protectedvirtual

Extra human readable algorithm info.

Returns
a formatted string displaying the parameters of the algorithm.

Reimplemented from pagmo::algorithm::base.

Definition at line 419 of file de.cpp.

void pagmo::algorithm::de::set_cr ( double  cr)

Sets crossover parameter.

Parameters
[in]crnew value for the crossover parameter
Exceptions
value_errorif cr not in (0,1)

Definition at line 375 of file de.cpp.

void pagmo::algorithm::de::set_f ( double  f)

Sets f parameter.

Parameters
[in]fnew value for the crossover parameter
Exceptions
value_errorif f not in (0,1)

Definition at line 388 of file de.cpp.


The documentation for this class was generated from the following files: