Skip to main content
. 2023 Jul 11;8(3):305. doi: 10.3390/biomimetics8030305
Algorithm 2. Pseudo-code of FRSA
1. Define Dim, UB, LB, Max_Iter(T), Curr_Iter(t), α, β, etc
2. Initialize the population randomly pi(i=1,2,…,m)
3. while (t < T) do
4.  Evaluate the fitness of each pi(i=1,2,…,m)
5.  Find Best solution
6.  Update the ES using Equation (6).
7.  for (i = 1 to m) do
8.   for (j = 1 to n) do
9.   Update the η, R, P and values using Equations (4), (5) and (7), respectively.
10.   if (t ≤ 3T/10) then
11.    Calculate pi,jt+1 using Equation (10)
12.   else if (t ≤ 6T/10 and t > 3T/10) then
13.    Calculate pi,jt+1 using Equation (14)
14.   else if (t ≤ 8T/10 and t > 6T/10) then
15.    Calculate pi,jt+1 using Equation (15)
16.   else
17.    Calculate pi,jt+1 using Equation (15)
18.    end if
19.   end for
20.  end for
21.  t = t + 1
22. end while
23. Return best solution.