|
Algorithm 1. The pseudocode of JS |
| Inputs: number of search agents (), number of iterations (), initial value of chaotic map (), problem dimension (), and lower () and upper () boundaries of search space |
| Outputs: the best jellyfish () and its fitness () |
| // Swarm generation |
|
| while () |
| Initialize using Equation (1) |
| Calculate
|
|
|
| end while |
| Find and
|
|
| while () |
|
|
| while () |
| Compute using Equation (3) |
| if () |
| // Ocean current |
| Update using Equation (4) |
| else |
| if () |
| // Passive motion |
| Update using Equation (13) |
| else |
| // Active motion |
| Calculate by Equation (15) |
| Update using Equation (14) |
| end if |
| end if |
| Update
|
|
|
| end for |
| Update and
|
|
|
| end while |
| Return and
|