Skip to main content
. 2023 Mar 28;10(4):429. doi: 10.3390/bioengineering10040429
Algorithm 1 Pseudo-code of MPA algorithm.
  1: Initialization step, P, TP, TF, Pyi.
  2: while t <tmax do
  3:     Compute the fitness value of each pyi,fpyi
  4:     Construct E
  5:     Implement the memory saving
  6:     Update CF using Equation (16)
  7:     for each pyi do
  8:     if t<13tmax then
  9:        Reposition the current pyi based on Equation (11)
10:     else
11:        if  13tmax<t<23tmax then
12:         if i<12n then
13:         Reposition the current pyl using Equation (13)
14:         else
15:         Reposition the current pyi using Equation (15)
16:         end if
17:        else
18:         Reposition the current pyi using Equation (18)
19:        end if
20:     end if
21:    end for
22:    Compute the fitness value of each pyi,fpyi
23:    Update TopPradatorPos, and TopPredatorFit.
24:    Apply the memory saving
25:    Apply the FADS for ∀ pyi
26:    t++
27: end while