|
Algorithm 1: Pseudocode of Jaya. |
-
1:
Input: Input: objective function (f), Population size (n)
Number of design variables (m), Lower and Upper bounds (Lb,Ub),
and Maximum number of iterations (Maxiter)
-
2:
Output: best solution and best objective function value
-
3:
Initialize the population within lower and upper bounds randomly
-
4:
Evaluation of fitness values
-
5:
iter = 1
-
6:
while iter < Maxiter
-
7:
Find the best and worst solution among the current population
-
8:
for n = 1 to k do
-
9:
for m = 1 to j do
-
10:
Update the solution according to Equation (35)
-
11:
if < Lb
-
12:
= Lb
-
13:
else if > Ub
-
14:
= Ub
-
15:
else
-
16:
=
-
17:
end if
-
18:
end for
-
19:
if solution f() better than f()
-
20:
= (replace old solution by new solution)
-
21:
else
-
22:
= (keep old solution)
-
23:
end if
-
24:
end for
-
25:
iter = iter + 1
-
26:
end while
|