Skip to main content
. 2023 Apr 21;11(4):394. doi: 10.3390/toxics11040394
Algorithm 1 Pseudocode of the HSA-SCA metaheuristics
  • Spawn a collection of starting solutions (X)

  • while   t<maxIter   do

  •    validate each individual in terms of its fitness

  •    for each individual inside (X) do

  •      if t<vs then

  •         Perform SCA search mechanism, provided by Equation (7)

  •      else

  •         if rnd<sm then

  •           Perform SCA search mechanism, provided by Equation (7)

  •         else

  •           Perform FA search mechanism, provided by Equation (8)

  •         end if

  •      end if

  •    end for

  • end while

  • return The current fittest solution determined as the global optimum