Algorithm 2 The Improved Spider Wasp Optimization Algorithm |
Input: |
|
Output: |
|
1. |
Initialize parameters |
2. |
Set boundary conditions
|
3. |
Initialize as a zero vector |
4. |
Set optimal fitness to infinity |
5. |
Initialize positions of search agents |
6. |
|
7. |
|
8. |
Combining the original and inverse populations |
9. |
|
10. |
) |
11. |
To calculate the values of TR, Cr, and k using Equations (26), (41) and (42), |
12. |
Randomly shuffle the index |
13. |
Judgement of hunting and nesting behavior based on TR |
14. |
between 0 and 1 |
15. |
If , perform hunting and nesting behavior |
16. |
can be calculated using Formulas (4)–(8) from the exploration phase and Formulas (10), (12), (16) and (17) from the follow-escape phase. |
17. |
Perform boundary check |
18. |
Else, perform mating behavior (DE + COA hybrid strategy) |
19. |
Differential Evolution (DE) operates using Equations (38) and (39) |
20. |
Perform crossover operations |
21. |
Apply boundary check |
22. |
solution can be obtained by combining COA using Formulas (29)–(37), and then fusing the results of DE and COA, applying Formula (40). |
23. |
Apply opposition-based learning (OBL) every 10 iterations |
24. |
|
25. |
Combining the original and inverse populations |
26. |
if
|
27. |
|
28. |
Else, U
|
29. |
Reduce population size |
30. |
Compute the new population size ensuring it is not less than the minimum size |
31. |
Update the population accordingly |