|
Algorithm 3 ABC |
Input: the parameters M, N,,,
Begin
S1: initialize M individuals randomly by Equation (2), and appoint bees to the employed foragers, iterative times t = 1;
S2: compute , update ; if it satisfies (t > N or precision), then go to step S4; otherwise, go to step S3;
S3: employed foragers search new food sources by Equation (3) and compute; update the food sources if the new one is better than the old one; onlookers choose food sources of employed foragers according to Equations (4) and (5), and generate new food sources by Equation (3); update the food sources if the new one is better than the old one; if there are some food sources which need to be given up (cannot be optimized after times searches); the corresponding bees become the scouts, and generate new sources by Equation (2); increase times t = t + 1, go to step S2;
S4: output the optimized results.
End
|