Research Article
A Hybrid Butterfly Optimization Algorithm for Numerical Optimization Problems
| | Generate initial population of NP butterflies | | | Initialize parameters c, a, p | | | While t < tmax | | | Calculate the mean and Cov using equations (5) and (6) | | | 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 (4) | | | 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 |
|