Skip to main content
. 2021 Jan 24;18(3):1024. doi: 10.3390/ijerph18031024
Algorithm: Improved whale-optimization algorithm (IWOA)
Objective:
Minimize and maximize the objective function f(x), xi=(xi1, xi2, , xid)
Parameters:
iter-iteration number.
Maxiter-the maximum number of iteration.
I-a population pop.
p-the switch probability
1. /*Initialize a population xi=(xi1, xi2, , xid)
2. WHILEiter < Maxiter
3.FORi = 1 to I
Update A, C, l and p
4.IFp > 0.5
5.IF(|A|<+1)
6. Update the position of the current solution by Equation (14)
7.ELSE IF(|A|>+1)
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 cxiiter=xiiterximinximaxximin
17. Calculate the next iteration chaotic variable by Equation (16)
18. Transform cxiiter+1 for the next iteration xiiter+1=ximin+cxiiter+1(ximaxximin)
19. /*Evaluate xiiter replace xiiter by xiiter+1 if the newly generation is better. */
20. /*Find the current best solution gbest*/
21.iter = iter + 1
22.END WHILE