Main steps of the CABC algorithm |
(2.1)cycle=1 |
(2.2)Initialize the food source positions |
(2.3)Evaluate the nectar amount(fitness) of food sources and find the best food source which is |
the initial value of gbest |
(4) repeat |
(5) For each component |
(6) Employed Bees’ Phase |
For each employed bee |
Replace thecomponent of the gbest by using thecomponent of bee |
Calculate the [newgbest ] |
If (newgbest) better than (gbest) |
Then gbest is replaced by newgbest |
For employed bee produce new food source positions by using (2.1) |
Calculate the value |
Apply greedy selection mechanism |
EndFor. |
(7) Calulate the probability values for the solution. |
(8) Onlooker Bees’ Phase |
For each onlooker bee |
Chooses a food source depending on |
Replace the component of the gbest by using the component of bee |
Calculate the [newgbest ] |
If (newgbest) better than (gbest) |
Then gbest is replaced by newgbest |
For onlooker bee produce new food source positions by using (2.1) |
Calculate the value |
Apply greedy selection mechanism |
EndFor |
EndFor |
(9) Scout Bees’ Phase |
If there is an employed bee becomes scout |
Then replace it with a new random source positions |
(10) Memorize the best solution achieved so far |
(11) Compare the best solution with gbest and Memorize the better one. |
(12) cycle=cycle+1. |
(13) until cycle=Maximum Cycle Number |