Skip to main content
. 2024 Jan 23;14(3):239. doi: 10.3390/diagnostics14030239
Algorithm 1. Salp Swarm Algorithm
1. Initialization:
     Salp swarm random population generation Xi where i = 1,2,3, . . . ., n
2. Determine each salp’s fitness value.
3. Assign X* as one of the best searching agents.
4. While the end condition has not arrived
5. Update the convergence factor r1 by Equation (7)
6. For each and every salp
7. If (n = = 1)
8. Update leader salp’s position, x1,d using Equation (6)
9. Else
10. Update the follower salps’ position, xk,di+1 using Equation (12)
11. End if
12. End for
13. Estimate each salp’s fitness value using Equation (14).
14. Update the X* with its finest solution.
15. End while
16. Return X* along with its best fitness value.