Research Article
A Hybrid Butterfly Optimization Algorithm for Numerical Optimization Problems
Algorithm 1
Butterfly optimization algorithm.
| Generate initial population of NP butterflies | | Initialize parameters c, a, p | | While t < tmax | | For each butterfly do | | Calculate the fragrance using equation (1) | | End for | | Find the best butterfly | | For each butterfly Xi do | | Generate a random number r from [0,1] | | If p < r | | Calculate the position using equation (2) | | Else | | Calculate the position using equation (3) | | End if | | Calculate the fitness and select the better one from [, Xi] | | End for | | Update parameter c | | End while | | Output the best position and fitness |
|