|
Algorithm 1. The pseudo-code of HFBOA |
|
|
Generate the initialize population of the butterflies randomly; |
|
|
Initialize the parameters , and
|
|
|
Define sensory modality c, power exponent a and switch probability p
|
|
|
for
|
|
|
Calculate the fitness value of each butterflies |
|
|
end for |
|
|
while
|
|
|
for
|
|
|
Update the fragrance of current search agent by Equation (6) |
|
|
for
|
|
|
if
|
|
|
Update the attractiveness and by Equation (9) and Equation (10) respectively |
|
|
else |
|
|
Continue |
|
|
end if |
|
|
%
|
|
|
if
|
|
|
Update the position using Equation (7) |
|
|
else |
|
|
Update the position using Equation (8) |
|
|
end if |
|
|
%
|
|
|
if
|
|
|
Update the position using Equation (3) |
|
|
else |
|
|
Update the position using Equation (8) |
|
|
end if |
|
|
Calculate the fitness value of each butterflies |
|
|
Find the best fitness
|
|
|
end for |
|
|
end for |
|
|
Update the value of power exponent c and parameter using Equations (11) and (12) |
|
|
|
|
|
end while |
|
|
Output the best fitness |