ECF 1.5
AlgDifferentialEvolution.h
1#ifndef DifferentialEvolution_h
2#define DifferentialEvolution_h
3using namespace std;
4#include "Algorithm.h"
5
13{
14public:
16 bool advanceGeneration(StateP state, DemeP deme);
17 bool initialize(StateP state);
18 void createDonorVectors(DemeP deme, StateP state);
19 void crossover(DemeP deme, uint index, StateP state);
20 void registerParameters(StateP state);
21
22protected:
23 double Fconst_;
24 double CR_;
25 bool bounded_;
26 SelectionOperatorP selRandomOp;
27 std::vector<IndividualP> donor_vector;
28};
29typedef boost::shared_ptr<DifferentialEvolution> DifferentialEvolutionP;
30
31#endif // Differential Evolution
32
Algorithm base class.
Definition: Algorithm.h:20
Differential evolution (DE) optimization algorithm (see e.g. http://en.wikipedia.org/wiki/Differentia...
bool initialize(StateP state)
Initialize the algorithm, read parameters from the system, do a sanity check.
void registerParameters(StateP state)
Register algorithm's parameters (if any).
std::vector< IndividualP > donor_vector
vector of donor solutions (individuals)
bool bounded_
constrained or not
void crossover(DemeP deme, uint index, StateP state)
cross donor vectors with population members to create trial vectors
double Fconst_
scaling constant
bool advanceGeneration(StateP state, DemeP deme)
Perform a single generation on a single deme.
void createDonorVectors(DemeP deme, StateP state)
create donor vectors (the same number as the population size)