• No se han encontrado resultados

CAPÍTULO III.- EVALUACIÓN DEL PLAN DE CONTINUIDAD PARA

3.2 IDENTIFICACIÓN DE LAS ACTIVIDADES QUE INTERVIENEN EN LA OBTENCIÓN DEL

Particle swam optimization (PSO) is inspired from the behaviour exhibited in swarm of social insects, big bird flock and fish school. This algorithm turns out to be very efficient in a large variety of engineering design problem. As the other evolutionary algorithm,

2Further development and personalization are realized and also the NSGA-III has been released. However usually the community report and compare the results with the second version of the algo- rithm.

21 3.3. Particle swarm optimization

it is population based, but instead of developing several generations, at every iteration it modifies the existent candidate solutions, moving them over the entire search space. Dealing with an n-dimensional PSO, the fundamental constitutive bricks are par- ticles, which represent the candidate solutions. Each of them is characterized by its position xi = (xi,1, xi,2, . . . , xi,n) (dealing with the i -th particle), its velocity vi =

(vi,1, vi,2, . . . , vi,n) and its best value pi = (pi,1, pi,2, . . . , pi,n). To complete the set

of information coming with this particle, one finds its local best neighbour parti- cle and the global best particle, respectively pnb = (pnb,1, pnb,2, . . . , pnb,n) and pgb =

(pgb,1, pgb,2, . . . , pgb,n). The main feature of these particles is their position, which is

the vector containing the n current decision variables required to evaluate the fitness function. In some code implementation few of this information is discarded: usually either local or global best value is employed, while some other algorithm completely neglect the velocity.

During the optimization process these quantities are updated using several funda- mental parameters. They can be largely modified to better fit the current problem in analysis: the maximum velocity of the particles Vmax, the total number of iteration3,

the accelerating constants c1 and c2 and the inertia weight ω; a brief description of the

last two elements must be given.

The inertia weight is a parameter required to handle properly the particle velocities. When ω is large the algorithm performs a global search and the particle velocity increase steadily up the maximum, but it makes difficult to change the direction of motion, realizing a divergent population. On the other hand, if ω is small particle velocity would decrease slowly until it reaches zero. Any little bias from global or local best would produce a rapid direction shift. So the proper choice for the inertia weight would lead to the introduction of a changing parameter in relation to surrounding condition. A first implementation reported from [21] develops an easy equation to properly modify ω:

ω = ωmax−

ωmax− ωmin

itermax

iter (3.1)

Here in 3.1 terms ωmax and ωmin are fixed parameters that should be appropriately

tuned for any single problem (suggested values are 0.9 and 0.4 respectively). A more advanced implementation, related also with the fitness value, is reported in [30] and defines ω as:

ω = (

ωmin−

(ωmax−ωmin)(f −fmin)

favg−fmin if f ≤ favg

ωmax if f > favg

(3.2)

In 3.2, f identifies current objective function value, while favg and fmin represent re-

spectively average and minimum objective value of all particles. Anyway one of the handling above is necessary to tune properly the inertia weight and to improve both particle intelligence during the searching process and convergence rate.

Instead, the accelerating constants reflect how the considered particle motion is affected by its personal best, the local best or the global best value. Since usually only two out of these three quantities get used, only two parameters are needed. Under these updating rules the particle will move toward the best positions found so far. Also accelerating constants can provide great improvements to the searching abilities

and convergence, but again they need to be suitably tuned to obtain the best perfor- mance (also they have suggested values which are c1 = c2 = 2.05). Often from these

parameters also two other factors get defined and these are: C = c1+ c2 (constrained

to be C > 4) and the constriction factor φ = |2−C−√2

C2−4C|.

The remaining part of the method to describe is the updating of particle position and speed. These are performed by an iterative approach, in which all the parameters defined above play a key role to the correct solve of the problem. First, the algorithm needs to update velocity with equation:

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

Note that particle speed has as many entries as the problem’s dimension (indexed with the j subscript). So each of them needs to be calculated and it is possible to write 3.3 vectorial form without misunderstanding. The quantities r1and r2are uniform random

numbers between 0 and 1. As already said, global best and local best can be exchanged in the formula, while almost always particle personal best is present. Moreover, since each element has its own fitness value, using equation 3.2 to evaluate inertia weight, it is necessary to recalculate ω for each particle and every iteration.

Finally it is possible to update position:

xi,j(t + 1) = xi,j(t) + vi,j(t + 1) (3.4)

Successively to the motion of all the particles, fitness evaluations are performed, also to verify the possible update of personal, local and global best values.

Such algorithm has as only criterion of termination the maximum iteration limit. In fact, convergence cannot be evaluated because particles evolution develops paths which do not necessary aim to better fitness at each iteration or at most of them.

A final remark should be made dealing with the use of local best value. Definition of the neighbourhood of each particle can be extremely variable in different situations. Performing the proper choice of this set can lead to a much more robust and faster algorithm. As neighbourhood set of elements with which the considered particle com- municates, it is possible to consider for examples a geometric set, counting its k nearest particles, or all the elements located in its same portion of the domain (e.g. settling a grid), or instead a group set, that initializes a certain number of families and inside them collocate randomly the particles.