Research Article

A Modified Artificial Bee Colony Algorithm for -Center Problems

Pseudocode 1

Pseudocode of M-ABC.
( )     set  Popsize  =  SN
( )     set  Maximum  number  of  iteration  =  Max.iter
( )     set  Maximum  number  of  trials  =  Max.trial
( )     Generate  initial  population  by  (7)
( )     Evaluate  initial  population  //Section 4.1.
( )     Set  iteration  =  1
( )     for  each  food  source   ,  set    =  0
( )     do  while  ( .iter)
( )     //****EMPLOYED  BEE  PHASE****
( )   for  each  food  source     do
( )  //choose  the  search  strategy  randomly.
(12)    Generate  random  integer  number     from  the  range   1, 2, 3, 4
(13)    if  (   =  1)  then
(14)    Produce  a  new  neighbor     by  (10)
(15)    Evaluate     //Section 4.1
(16)    Apply  greedy  selection  between     and  
(17)    else  if  (   =  2)  then
(18)    Produce  a  new  neighbor     by  (11)
(19)    Evaluate     
(20)    Apply  greedy  selection  between     and  
(21)    else  if  (   =  3)  then
(22)    Produce  a  new  neighbor     by  (12)
(23)    Evaluate  
(24)    Apply  greedy  selection  between     and  
(25)    else
(26)    Produce  a  new  neighbor     by  (13)
(27)    Evaluate  
(28)    Apply  greedy  selection  between     and  
(29)    end  if
(30)   end  for
(31)  //****ONLOOKER  BEE  PHASE****
(32)   Calculate  probability  values     by  (9)
(33)   for  each  food  source     do
(34)    Produce  random  number,   1  from  the  range   0, 1
(35)    if  ( )  then
(36)  //choose  the  search  strategy  randomly
(37)    Generate  random  integer  number     from  the  range   1, 2, 3, 4
(38)    if  (   =  1)  then
(39)       Produce  a  new  neighbor     by  (10)
(40)       if  ( )  then     =     +  1
(41)       Apply  greedy  selection  between     and  
(42)    else  if  (   =  2)  then
(43)       Produce  a  new  neighbor     by  (11)
(44)       if  ( )  then     =     +  1
(45)       Apply  greedy  selection  between     and  
(46)    else  if  (   =  3)  then
(47)       Produce  a  new  neighbor     by  (12)
(48)       if  ( )  then     =     +  1
(49)       Apply  greedy  selection  between     and  
(50)    else
(51)       Produce  a  new  neighbor     by  (13)
(52)       if  ( )  then     =     +  1
(53)       Apply  greedy  selection  between     and  
(54)    end  if
(55)    end  if
(56)   end  for
(57)  //****SCOUT  BEE  PHASE****
(58)   for  each  food  source     do
(59)    if  Max.   then
(60)    Replace     with  a  new  randomly  generated  solution  (7)
(61)    end  if
(62)   end  for
(63)   Save  necessary  information
(64)   iteration  =  iteration  +  1
(65)  end  while