Algorithm 1 Particle Swarm Optimization (PSO) Algorithm. |
Input: |
Maximum number of iterations (). |
Population size (). |
Lower and upper bound variables (). |
Output: |
Best value of all particles (). |
-
1:
for i=1:
do
-
2:
-
3:
-
4:
-
5:
-
6:
if
then
-
7:
-
8:
end if
-
9:
end for
-
10:
for t=1:
do
-
11:
for i=1:
do
-
12:
-
13:
-
14:
-
15:
if
then
-
16:
-
17:
-
18:
if
then
-
19:
-
20:
end if
-
21:
end if
-
22:
end for
-
23:
end for
|