
Step-by-step numerical example of EHO algorithm 157
71 pp_new [ j ] [ c ]=LB[ c ]+(UB[ c]−LB[ c ]+1 ) ∗ r ( ) ;
72 }
73 }
74 // f i t n e s s c a l c u l a t i o n f o r new p o s i t i o n s
75 F i t n e s s [ j ]=OF(pp_new [ j ] , nc ) ;
76 }
77 // dete rmine t h e f i t t e s t e l e ph a n t
78 // f i n d th e b e s t f i t n e s s v al u e
79 fbest_new=∗min_element ( F i t n e s s , F i t n e s s+N) ;
80 // f i n d th e wo rst f i t n e s s v a l u e
81 f w o r s t=∗max_element ( Fi t n e s s , F i t n e s s+N) ;
82 // dete rmine t h e l o c a t i o n of b e s t el e p h an t
83 i n t bestlo c_new=min_element ( F i t n e s s , F i t n e s s+N)−F i