• No results found

Differential evolution is an evolutionary algorithm proposed by Storn and Prize in [59] widely used to solve global optimization problems. As all the others, it includes ini- tialization of population, crossover, mutation and selection operations. Although, here they succeed one another differently with respect to classical algorithms as the genetic ones. Its main advantage is the very simple structure, the little computational costs for operation between individuals and the ease of use. Instead, as the others evolution- ary based codes, the major drawback is the requirement of large number of function evaluations at each generation. This could be worsened by the presence of a complex objective function, leading to a time-consuming and computationally expensive prob- lem [19].

23 3.4. Differential evolution

Algorithm 3: Pseudo code of Particle Swarm Optimization Result: Obtain the optimal value of fitness function Input: c1, c2, C, φ, itermax

Set pgb = None;

for each particle i = 1, . . . , N do

Initialize particle position: xi ∼ U (blo, bup)4;

Evaluate particle fitness: f iti ← f (xi);

Initialize particle best position to its initial position: pi ← xi;

if f (pi) < f (pgb) then pgb ← pi

end

Initialize particle velocity: vi ∼ U (−|bup− blo|, |bup− blo|);

end iter = 0;

while termination criterion is not reached do for each particle i = 1, . . . , N do

for each dimension j = 1, . . . , n do

Extract random numbers: r1, r2 ∼ U (0, 1);

Evaluate inertial weight: ω = ωmax− ωmaxiter−ωmaxminiter;

Update j -th component of i -th particle velocity:

vi,j(t + 1) ← φ{ωvi,j(t) + c1r1[pi,j − xi,j(t)] + c2r2[pgb,j− xi,j(t)]};

Update particle position: xi,j(t + 1) ← xi,j(t) + vi,j(t + 1);

Update particle fit: f iti ← f (xi) if f (xi) < f (pi) then

Update particle best position: pi ← xi;

if f (pi) < f (pgb) then

Update global best position: pgb ← pi; end end end end iter ← iter + 1; end

Dealing with the basic algorithm, as always, the first step consists in building the starting population by randomly sampling Np individuals from the sample space, where

Np is the population dimension. The following operation creates the mutant vector for

each selected individual of the current generation xi,G, i = 1, . . . , Np. Each of them

has n components as the number of decision variables. The mutation operation can be performed in several ways. It could involve two or three individuals different from the selected one, individuals randomly chosen in the population or those with the best

4b

loand bup values are the lower and upper boundaries of the search space variables, expressed as vectors.

function value:

DE Rand 1 vi,G= xr1,G+ F (xr2,G− xr3,G)

DE Best 1 vi,G= xbest,G+ F (xr1,G − xr2,G)

DE Rand to Best 1 vi,G= xr1,G+ F (xr2,G− xr3,G) + F (xbest,G− xr1,G)

DE Curr to Best 1 vi,G= xi,G+ F (xr2,G− xr3,G) + F (xbest,G− xi,G)

DE Rand 2 vi,G= xr1,G+ F (xr2,G− xr3,G + xr4,G− xr5,G)

DE Rand 2 vi,G= xr1,G+ F (xr2,G− xr3,G + xr4,G− xr5,G)

(3.5)

In these formulas from [39] several new elements can be seen: r1−5 are integers which

identify the individuals randomly chosen in the population. These differ from the i -th individual which is the subject of mutation. The subscript G indicates the generation, so the operation deals always with members of the same generation. Finally here the most important parameter is F, the (mutation) scaling factor, ranging in [0,2]. It amplifies the difference between all the selected individuals.

The mutant vector vi,G such defined is then sided to the original selected vector

xi,G. These two generate a trial vector by the following operations:

uj,i,G =

 vj,i,G if randj(0, 1) ≤ Cr or j = jrand

xj,i,G otherwise

(3.6)

Here j = 1, . . . , n and jrand are a random integers and Cr is the crossover control

parameter, again a random number Cr ∈ (0, 1). Due to the use of jrand the trial vector

ui,G always differs from the original one xi,G, since could happens that randj > Cr∀j.

On the other hand Cr controls how much the generated individuals will be altered with respect to the old one. A small parameter changes few chromosomes, while a big one would almost build a brand-new individual.

Before completing the crossover phase it is necessary to check the mutation intro- duced, because the values of ui,G inherited from vi,G could be outside the boundaries.

In those cases the values are reset as follows:

uj,i,G =

 min{Uj, 2Lj− uj,i,G} if uj,i,G < Lj

max{Lj, 2Uj − uj,i,G} if uj,i,G > Uj

(3.7)

Finally, a simple selection operation is performed, bringing to the next generation the individuals between xi,G and ui,G which has the best fitness value:

xi,G+1 =

 ui,G if f (ui,G) < f (xi,G)

xi,G otherwise

(3.8)

Once the new population is built, all the operations of mutation, crossover and selection are repeated until convergence or termination criterion is reached.

In the basic version of this algorithm, the parameters which handle the entire op- timization are only three. The first encountered is the population size: its typical value ranges between 5 and 10 times the dimension problem. However, it depends a lot on the number of decision variables, which could easily exceed a hundred. Dealing with the scaling factor, its usual range is between 0.4 and 1, but changing this value could be enhanced exploration or exploitation of the design space. Finally there is the crossover factor Cr which needs to be optimized in the different situations. Little values of this parameter are suitable for low coupled functions (e.g. in additive relation Cr ∈ (0, 0.2)), while larger values for high coupled ones (Cr ∈ (0.9, 1)).

Finally, the suggested mutation strategies are DE Curr to Best 1 and DE Curr to Rand 1 from 3.5.