|
Algorithm 1 Pseudo-code of the GOA. |
-
Input:
: population size; : problem dimension; : maximum number of iterations;
-
Output:
The position of the best individual and its fitness value;
-
1:
Initialize the population randomly, and are all random numbers from 0 to 1;
-
2:
Generate memory matrix MX;
-
3:
Calculate the fitness value of X;
-
4:
while stopping condition is not met do
-
5:
if then
-
6:
for do
-
7:
if then
-
8:
Update the location Gannet using Equation (7),where ;
-
9:
else
-
10:
Update the location Gannet using Equation (7),where ;
-
11:
end if
-
12:
end for
-
13:
else
-
14:
for do
-
15:
if then
-
16:
Update the location Gannet using Equation (16),where ;
-
17:
else
-
18:
Update the location Gannet using Equation (16),where ;
-
19:
end if
-
20:
end for
-
21:
end if
-
22:
for do
-
23:
Calculate the fitness value of ;
-
24:
If the value of is better than the value of , replace with ;
-
25:
end for
-
26:
end while
|