(1) | Generate an initial population according to Algorithm1 |
(2) | Predefine the related parameters, i.e., and |
(3) | Let |
(4) | Let // represent the iterative variable |
(5) | Let // represents the index of the chosen search strategy from the first strategy candidate pool |
(6) | Let // represents the number of the chosen search strategy from the second strategy candidate pool |
(7) | while do |
(8) | //the employed bees phase |
(9) | for to do |
(10) | Let |
(11) | if then |
(12) | |
(13) | end if |
(14) | if then |
(15) | //Choose the first search strategy |
(16) | Produce an individual using equation (8) |
(17) | else |
(18) | //Choose the second search strategy |
(19) | Produce an individual in the light of equation (9) |
(20) | end if |
(21) | Deal with boundary constraints according to equation (6) |
(22) | if then |
(23) | Substitute with && reset |
(24) | else |
(25) | Let |
(26) | Let |
(27) | end if |
(28) | Let |
(29) | end for |
(30) | Compute using equation (4) |
(31) | //the onlooker bee phase |
(32) | Set and |
(33) | while do |
(34) | //ξ is a function for producing a random number in [0,1) |
(35) | if then |
(36) | Let and |
(37) | if then |
(38) | |
(39) | end if |
(40) | if then |
(41) | //Select the first search strategy |
(42) | Produce an individual using equation (8) |
(43) | else |
(44) | //Choose the second search strategy |
(45) | Generate a new individual according to equation (9) |
(46) | end if |
(47) | Handle boundary constraints according to equation (6) |
(48) | if then |
(49) | Substitute with and let |
(50) | else |
(51) | Set |
(52) | Set //Change the number of the search strategy |
(53) | end if |
(54) | Set |
(55) | end if |
(56) | Set |
(57) | if then . |
(58) | end while |
(59) | //the scout bee phase |
(60) | if limit then |
(61) | if then |
(62) | //Choose the 1st strategy from the 2nd search strategy candidate pool |
(63) | Produce an individual according to equation (5) |
(64) | else |
(65) | //Choose the 2nd search strategy from the 2nd search strategy candidate pool |
(66) | Produce an individual according to equation (7) |
(67) | end if |
(68) | if then |
(69) | Let |
(70) | if then |
(71) | |
(72) | end if |
(73) | end if |
(74) | Substitute with |
(75) | Let and |
(76) | end if |
(77) | Memorize the best individual found up to now |
(78) | end while |