Beruflich Dokumente
Kultur Dokumente
CHAPTER 4
4.1 INTRODUCTION
that is tracked by the global version of the swarm is the overall best value, and
its location obtained so far by any particle in the population. This location is
called gbest. At each time step velocity of each particle flying toward its gbest
and p best location is changed. Acceleration is weighted by random terms, with
separate random numbers being generated for acceleration towards pbest and
gbest location.
At each time step position and velocities are adjusted and the
function is evaluated with new coordinates. When the particle discovers a
pattern that is better than any it has found previously, it stores the coordinates
in the vector pbest id. The difference between the best point found by a
particular agent and the individual’s current positions is stochastically added
to the current velocity causing the trajectory to oscillate around the point.
Further each particle is defined within the context of a topological
neighborhood comprising itself and some other particles in the population.
The stochastically weighted difference between the neighborhood’s best
position gbestd and the individual’s current position is also added to its
velocity, adjusting it for the next time step. These adjustments to the particle’s
movement through the space cause it to search around the two best positions.
Vid(t 1)
= w Vid (t) + c1 rand1 (p (t) (t)
best id - X id )
(t) (t)
(4.1)
+ c 2 rand 2 (g best d - X id )
where Vid(t) and Xid(t) are the velocity and position of particle i,
in d dimensional space respectively. p(t)
best id best position of
position of each particle is updated using the new velocity vector for that
particle, so that
w max w min
w w max iter (4.3)
itermax
42
X (t )
id if f (X (idt 1)
) f p (t)
best id
p (tbest1) id (4.4)
(t 1) (t 1)
X id if f (X id ) f p (t)
best id
Record the non dominated solutions found so far and save them
in archive.
Vid(t 1)
= w Vid (t) + c1 rand1 (p (t) (t) (t) (t)
best id - X id ) + c 2 rand 2 (g best d - X id )
where Vid(t) and Xid(t) are the velocity and position of particle i, in d
dimensional space respectively. p(t)
best id best position of individual i in d
The first part of the equation (4.1) is the momentum part of the
particle. The inertia weight w represents the degree of the momentum of the
particles. The second part of the equation (4.1) is the cognition part which
represents the independent thinking of the particle itself. The third part of
equation (4.1) is the social part which represents the collaboration among the
particles. Vmax is an important parameter it determines the resolution with
which the regions around the current solutions are searched. If Vmax is too
45
high the PSO facilitates global search, and particles might fly pass good
solutions. If Vmax is too small the PSO facilitates local search and particles
may not explore sufficiently beyond locally good regions. They could be
trapped at local minima unable to move far enough to reach a better position
in the problem space. Vmax is often set at about 10-20% of the dynamic range
of the variable on each dimension.
Vi New Position
X (t+1)
i
(t+1)
Vi
Vgbest
Current Position
(t)
Xi
Vpbest
(t+1) (t)
X id = Xid + Vid( t 1)
where Xid( t 1) is the new position and Xid(t ) is the previous position and Vid(t 1)
is
the new velocity.
46
Check all the imposed constraints to ensure the feasibility of all the
potential solutions. If any element of individual violates its
inequality constraints then the position of the individual is fixed to
its maximum/minimum operating point as shown in equation (4.5)
t t 1 min t t 1 max
Xid vid if Xid Xid vid Xid
t 1 min t t 1 min
Xid Xid if Xid vid Xid (4.5)
max t t 1 max
Xid if Xid vid Xid
(t 1) (t 1) (t 1) (t)
Pbest id X id if f (X id ) f Pbest id
(4.6)
g (t 1)
best d
(t 1)
X id if (t 1)
f (X id ) f g (t)
best d
the population’s overall previous best. If the current value is better than g(t)
best d
Population size = 50
c1 , c2 = 2
The flow chart explains the sequence of steps to be carried out in the
PSO algorithm.
Start
g (t 1)
best d
(t
Xid 1)
if (t
f (Xid 1)
) (t)
f g best d
Yes Iteration
Iteration =Iteration +1
<t
No
Output g (tbest
)
d value and its location
stop
4.5 CONCLUSION