Algorithm 6 Optimisation based on PSO algorithm |
-
1:
Initialise population of particles with random values positions in the search space ∼U
-
2:
Set each particle best known position to its initial position ←
-
3:
Initialise each particle velocity to random values ∼U[,] where =
-
4:
Initialise the best known position to the where ) is lowest
-
5:
while Termination condition not reached do
-
6:
for Each particle i
do
-
7:
if
then
-
8:
Choose two random numbers ,
-
9:
Adapt velocity ←
+
(–) +
(–)
-
10:
Bound for all dimensions i (, -, )
-
11:
Update the position of the particle ← +
-
12:
Bound population for all dimensions i (,)
-
13:
end if
-
14:
if
then
-
15:
update the particle’s best known position
-
16:
end if
-
17:
if
then
-
18:
update the particle’s best known position
-
19:
end if
-
20:
end for
-
21:
holds the best found position in search space
-
22:
end while
|