Algorithm 2 Adaptive restart GWO |
-
1:
Initialize the number of iterations for optimization
-
2:
Initialize the positions of n grey wolves ,
-
3:
Calculate the fitness value of each grey wolf
-
4:
Choose the best three grey wolves as , , base on there fitness
-
5:
.
-
6:
the best fitness calculated from initialized wolves
-
7:
whiledo
-
8:
Update the position of the each wolf using Equation (6)
-
9:
Update , A, and C
-
10:
Update , , and using Equations (12)–(14) or get the position vector of each wolf
-
11:
Transform each wolf’s position into a binary vector using Equation (11) and , , or Equation (15) and wolf’s original position vector.
-
12:
Calculate the fitness of each Wolf
-
13:
-
14:
best fitness in iteration t
-
15:
if
then
-
16:
calculate using Equation (17).
-
17:
select wolves randomly from all search agents to reinitialize
-
18:
end if
-
19:
Update the first three grey wolves , , base on fitness
-
20:
.
-
21:
end while
-
22:
return
|