Skip to main content
. 2019 Jun 1;19(11):2515. doi: 10.3390/s19112515
Algorithm 2 Pseudo code of the HEHO algorithm
Initialization. Generate the individuals in population; divide population into n clans; calculate fitness for each individual; set generation counter t=1, maximum generation MaxGen, and the initial value of the limit parameter
while t<MaxGen do
  Arrange all solutions according to their fitness
  for all clans ci do
   for all solution j in the clan ci do
    Update xci,j and generate xnew,ci,j using Equation (10)
    Select and obtain better solution between xci,j and xnew,ci,j
    Update xbest,ci and generate xnew,ci,j using Equation (11)
    Select and retain better solution between xbest,ci and xnew,ci,j
   end for
  end for
  for all clans ci in the population do
   Replace the worst solution in clan ci using Equation (13)
   Replace the solutions that violate limit value by using Equation (13)
  end for
  Analyze population and calculate fitness
  Recalculate the value of the limit parameter
end while
return the best solution among all clans