Algorithm 1 Pseudocode for the MSCSO optimization algorithm |
1: Initialization parameters: population size , maximum iteration count , upper and lower limits of solutions and . 2: Initialize the optimal position of the sand cat and the optimal fitness value . 3: Fitness function : see Equation (19). 4: Population initialization: to initialize the sand cat population, use Equations (1) and (2) to compute fitness value of every sand cat individual, and take the first to form a new sand cat population. 5: While do 6: for every individual sand cat do 7: To ensure that each individual sand cat is in the limits of the solution and to calculate the , the fitness value of the is used. 8: if , then 9: Assign the value of to , updating the optimal location . 10: end if 11: end for 12: Set S to 2 and initialize rg and r according to Equations (3) and (4). 13: if > 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 and the new position of fitness value . 21: if , then 22: Assign to . 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 |