| Algorithm 1 The framework of CASSA |
|
/*Initialization*/ 1. Set the maximum iterations as ; 2. Set the number of finders as ; 3. Set the number of threatened sparrows as ; 4. Set the alarm value as ; 5. Set the number of sparrows as ; 6. Initialize the position of n sparrows using Equation (5); /*Iterative search*/ 7. while () 8. Rank the fitness values and find the best individual and the worst individual currently; 9. ; 10. for 11. Update the finder’s position using Equation (7); 12. end for 13. for 14. Update the entrant’s position using Equation (3); 15. end for 16. for 17. Update the threatened sparrow’s position using Equation (4); 18. end for 19. Select the top S elite individuals and implement adaptive mutation for them by Equation (9); 20. Get the current new position; 21. If the new position is better than before, update it; 22. ; 23. end while 24. Output the best solution |