Skip to main content
. 2021 Nov 2;21(21):7306. doi: 10.3390/s21217306
Algorithm 1: Salp Swarm Algorithm (SSA)
N → number of salps in the swarm.
D → number of dimensions of the given problem.
X → Initialize a swarm of salps with respect to lb and ub.
F → The best search agent (Food source).

while (Stopping criterion is not met) do
      Calculate the fitness of the salps
      c1 = 2 x e(4l=L)
      for i = (1 to N) do
          for j = (1 to D) do
             if i = 1 then
                 Update the position of salps’ leader using Equation (6).
             else
            xji=12xji+xji1   …… (See Equation (9))
    for i = (1 to N) do
       Fit xi to its boundaries.
       if f(xi) < f(F) then
         F = xi
Output: F