| Algorithm: Improved whale-optimization algorithm (IWOA) |
| Objective: |
| Minimize and maximize the objective function , |
| Parameters: |
| iter-iteration number. |
| Maxiter-the maximum number of iteration. |
| I-a population pop. |
| p-the switch probability |
| 1. /*Initialize a population |
| 2. WHILEiter < Maxiter |
|
3. FORi = 1 to I Update , , l and p |
| 4. IFp > 0.5 |
| 5. IF |
| 6. Update the position of the current solution by Equation (14) |
| 7. ELSE IF |
| 8. Randomly choose a search agent |
| 9. Update the position of the current search agent by Equation (16) |
| 10. END IF |
| 11. ELSE IFp > 0.5 |
| 12. Update the position of the current search by Equation (15) |
| 13. END IF |
| 14. END FOR |
| 15. /*Jump out of local optimum by using chaotic local search. */ |
| 16. Calculate |
| 17. Calculate the next iteration chaotic variable by Equation (16) |
| 18. Transform for the next iteration |
| 19. /*Evaluate replace by if the newly generation is better. */ |
| 20. /*Find the current best solution gbest*/ |
| 21. |
| 22. END WHILE |