Reference
Pseudocode
- Set algorithm parameters F, CR, mutation strategy, and recombination strategy
- Initialize population $\mathbb{P}=\{\mathbf{p}_1,\ldots,\mathbf{p}_N\}$.
- For each $\mathbf{p} \in \mathbb{P}$:
- Initialize $\mathbf{p}=\{$x, v, u, f(x)$\}$
- Evaluate f(x)
- For each $\mathbf{p} \in \mathbb{P}$:
- While termination criterion is not fulfilled:
- For each $\mathbf{p} \in \mathbb{P}$:
- v $\gets$ mutate(F, x$_{r_1}$, x$_{r_2}$, x$_{r_3}$, …)
- u $\gets$ recombine(CR, x, v)
- Evaluate f(u)
- x $\gets$ select(x, f(x), u, f(u))
- For each $\mathbf{p} \in \mathbb{P}$:
- Output results
Class view
class Canonical_DE : public algorithm
Link: algorithm
Data member
Name | Type | Utility |
---|---|---|
m_pop |
DE::population < DE::individual >> |
The population |
Member function
Name | Utility |
---|---|
intialize() ⊕ |
Set parameters; initialize and evaluate the population (Pseudocode 1., 2.) |
run_() ⊕ |
The optimization process (Pseudocode 3.) |
record() ⊕ |
Record the evluations and the error in GOPs. Record the evaluations and the number of optima found in MMOPs. |
DE::population
Class view
template<typename Individual>
class DE::population : public population<Individual>
Links: population
Data member
Name | Type | Utility |
---|---|---|
m_F |
real |
The value of parameter F |
m_CR |
real |
The value of parameter CR |
Member function
Name | Utility |
---|---|
evolve() ⊕ |
Optimization operators in each iteration (Pseudocode 3.1.) |
DE::individual
Class view
class DE::individual : public individual<variable_vector<real>, real>
Links: individual
Data member
Name | Type | Utility |
---|---|---|
m_pv |
solution<> |
The donor vector |
m_pu |
solution<> |
The trial vector |
Member function
Name | Utility |
---|---|
mutate(F, r1, r2, r3, r4, r5) |
Pseudocode 3.1.1. |
recombine(CR, rs) |
Pseudocode 3.1.2. |
select() |
Pseudocode 3.1.4. |
DE/rand/1
Command line arguments example
AN=DE-rand-1 PS=100
Mutation strategy
v = x$_{r_1}$ + F $\cdot$ (x$_{r_2}$ - x$_{r_3}$)
Class view
class DE_rand_1 : public Canonical_DE
Overridden member function
Name | Utility |
---|---|
initialize() ⊕ |
Set the mutation strategy to DE::mutation_strategy::rand_1 |
DE/best/2
Command line arguments example
AN=DE-best-2 PS=100
Mutation strategy
v = x$_{best}$ + F $\cdot$ (x$_{r_1}$ - x$_{r_2}$) + F $\cdot$ (x$_{r_3}$ - x$_{r_4}$)
Class view
class DE_best_2 : public Canonical_DE
Overridden member function
Name | Utility |
---|---|
initialize() ⊕ |
Set the mutation strategy to DE::mutation_strategy::best_2 |
DE/nrand/1
Command line arguments example
AN=DE-nrand-1 PS=100
Reference
Mutation strategy
v = x$_{nearest}$ + F $\cdot$ (x$_{r_1}$ - x$_{r_2}$)
Class view
class DE_nrand_1 : public Canonical_DE
Overridden member function
Name | Utility |
---|---|
initialize() ⊕ |
Set the mutation strategy to DE::mutation_strategy::nrand_1 |