|
Algorithm 3 Pseudocode of ABBFGO |
-
1:
Initialize the parameters of BFGO: N (number of search agents), T (maximum iteration), n (number of bamboo shoots) and K (number of bamboo whips)
-
2:
Initialize the positions of the search agents
-
3:
Calculate the fitness of each search agent
-
4:
The search agents are sorted in descending order of fitness and divided into K groups according to the uniform grouping in Figure 2
-
5:
Update , , and
-
6:
-
7:
whiledo
-
8:
if &&Convergence(t)==Convergence(t-3) then
-
9:
Use the long-mutation strategy to generate new solutions
-
10:
If the fitness value of the new solution is greater than the global optimal value, replace it
-
11:
Update , , and
-
12:
end if
-
13:
for i = 1;i ≤ k;i++ do
-
14:
if not updated then
-
15:
P++
-
16:
end if
-
17:
end for
-
18:
if P = k then
-
19:
Do Random grouping
-
20:
end if
-
21:
for each bamboo whip do
-
22:
Update using Equation (1)
-
23:
Update the using Equations (2)–(6)
-
24:
Calculate the position under binary conditions of each search agent by Equations (11)–(21)
-
25:
Calculate
-
26:
end for
-
27:
Update , , and
-
28:
for each bamboo whip do
-
29:
Update using Equation (1)
-
30:
Update the using Equations (7)–(10)
-
31:
Calculate the position under binary conditions of each search agent by Equations (11)–(21)
-
32:
Calculate
-
33:
end for
-
34:
Update , , and
-
35:
Convergence(t) =
-
36:
-
37:
Repeat step 4
-
38:
end while
|