Skip to main content
. 2024 Nov 15;9(11):701. doi: 10.3390/biomimetics9110701
Algorithm 1 Pseudocode for the MSCSO optimization algorithm
1: Initialization parameters: population size N, maximum iteration count Tmax, upper and lower limits of solutions ub and lb.
2: Initialize the optimal position of the sand cat Pb and the optimal fitness value Pbest.
3: Fitness function f(x): see Equation (19).
4: Population initialization: to initialize the sand cat population, use Equations (1) and (2) to compute fitness value f(Pi) of every sand cat individual, and take the first N to form a new sand cat population.
5: While t<Tmax do
6: for every individual sand cat Pi do
7:  To ensure that each individual sand cat Pi is in the limits of the solution and to calculate the Pi, the fitness value of the f(Pi) is used.
8:   if f(Pi)<Pbest, then
9:    Assign the value of f(Pi) to Pbest, updating the optimal location Pb.
10:  end if
11: end for
12: Set S to 2 and initialize rg and r according to Equations (3) and (4).
13:  if |R| > 1 then
14:  Update individual positions according to Equation (5).
15:  Use the Weibull flight strategy to obtain a new position, see Equation (6).
16: else
17:  Adjust positions based on Formula (9).
18:  Use the triangle parade to obtain a new position, see Equation (10).
19: end if
20: Calculate the fitness of the individual value f(Pi) and the new position of fitness value f(Pnewi).
21: if f(Pnewi)<f(Pi), then
22:   Assign f(Pnewi) to Pi.
23: end if
24: Use Formulas (15) and (18) to update the location of the entire sand cat population.
25: Use Formula (19) to ensure excellence.
26: If the number of iterations increases by 1, t = t + 1.
27: end while