|
Algorithm 4 Parallel strategy for bi-directional ring topology |
-
1:
for
do
-
2:
Use to find the remainder of 4 and record the remainder as
-
3:
Use to find the remainder of 4 and record the remainder as
-
4:
if then
-
5:
-
6:
end if
-
7:
if then
-
8:
-
9:
end if
-
10:
Calculate the average position of the optimal particle in group and group and its fitness value
-
11:
if The fitness value of the average position < The fitness value of the optimal particle in group g then
-
12:
Replace the position of the optimal particle in group g and its fitness value using the average position and its fitness value
-
13:
end if
-
14:
end for
|