Research Article

A Novel Hybrid Bat Algorithm with Harmony Search for Global Numerical Optimization

Algorithm 2

Bat algorithm.
Begin
Step  1: Initialization. Set the generation counter ; Initialize the population of NP bats
    randomly and each bat corresponding to a potential solution to
    the given problem; define loudness , pulse frequency
    and the initial velocities ; set pulse rate .
Step  2: While the termination criteria is not satisfied or   < MaxGeneration do
    Generate new solutions by adjusting frequency, and updating velocities
    and locations/solutions [(4)–(6)]
    if (rand > ) then
     Select a solution among the best solutions;
     Generate a local solution around the selected best solution
    end if
    Generate a new solution by flying randomly
    if (rand < & < )) then
     Accept the new solutions
     Increase and reduce
    end if
    Rank the bats and find the current best
    ;
 Step  3: end while
 Step  4: Post-processing the results and visualization.
End.