Skip to main content
. 2022 Feb 22;22(5):1711. doi: 10.3390/s22051711
Algorithm 1: Pseudocode of SSARM-SCA.
Initialize population X by using Equation (5)
repeat
  Compute the objective function for each solution xi
  Update the best salp (solution) (F=Xb)
  for i=1:N do
   if i==1 then
     Update the position of salp using Equation (1)
   end if
   if ϕ<0.5 then
     Update followers by using SSA search and Equation (4)
   else
     Update followers by using SCA search and Equation (6)
   end if
  end for
  Sort all individuals according to fitness
  if l<rmp then
   Replace wrs worst solutions by random ones using Equation (5).
  end if
  Update c1 using Equation (2)
  Update r1 using Equation (7)
until(l<L)
Return the best solution F.