Skip to main content
. 2023 Jun 25;23(13):5881. doi: 10.3390/s23135881
Algorithm 4 EHO main steps
  • Define Ne and NGmax

  • t: = 1

  • while (tNGmax) and (solution not yet found) do

  •    for ci: = 1,,Nclan do

  •      for j: = 1,,Nci do

  •         Update xci,j

  •         Generate xnew,ci,j=xci,j+α·(xbest,cixci,j)·r

  •         if xci,j=xbest,ci then

  •           Update xci,j

  •           Generate xnew,ci,j

  •           Compute xcenter,ci=1nci·j=1nci(xci,j)

  •           Generate xnew,ci,j=β·xcenter,ci

  •         end if

  •      end for

  •    end for

  •    for ci: = 1,,Nclan do

  •      Replace worst solution xworst,ci=xmin+(xmaxxmin+1)·rand

  •    end for

  •    t: = t + 1

  • end while

  • Return best solution