|
Algorithm 3 Pseudo-code for PSO Algorithm. |
-
1:
Determine objective function .
-
2:
Initialize parameters , , , , and population size .
-
3:
Evaluate the fitness of each particle and set all initial positions as .
-
4:
Generate an initial population of particles.
-
5:
whiledo
-
6:
Select the particle in the swarm, which has the minimum fitness value
-
7:
for do
-
8:
Calculate the velocity of particle .
-
9:
Update the position of particle .
-
10:
end for
-
11:
for do
-
12:
Evaluate the fitness of updated particle .
-
13:
if then
-
14:
Set current position as .
-
15:
end if
-
16:
end for
-
17:
Find the best particle
-
18:
end while
|