Skip to main content
. 2020 Jul 22;20(15):4065. doi: 10.3390/s20154065
Algorithm 2 Adaptive restart GWO
  • 1:

    Initialize the number of iterations for optimization Niter

  • 2:

    Initialize the positions of n grey wolves Xi, i=1,2,,N

  • 3:

    Calculate the fitness value of each grey wolf

  • 4:

    Choose the best three grey wolves as Xα, Xβ, Xδ base on there fitness

  • 5:

    t0.

  • 6:

    fitnessN the best fitness calculated from initialized wolves

  • 7:

    whilet<Niter+1do

  • 8:

        Update the position of the each wolf using Equation (6)

  • 9:

        Update α, A, and C

  • 10:

      Update x1, x2, and x3 using Equations (12)–(14) or get the position vector of each wolf

  • 11:

      Transform each wolf’s position into a binary vector using Equation (11) and x1, x2, x3 or Equation (15) and wolf’s original position vector.

  • 12:

        Calculate the fitness of each Wolf

  • 13:

        fitnessLfitnessN

  • 14:

        fitnessN best fitness in iteration t

  • 15:

        if fitnessNfitnessL then

  • 16:

            calculate Nrestart using Equation (17).

  • 17:

            select Nrestart wolves randomly from all search agents to reinitialize

  • 18:

        end if

  • 19:

        Update the first three grey wolves Xα, Xβ, Xδ base on fitness

  • 20:

        tt+1.

  • 21:

    end while

  • 22:

    returnbestfitness,Xα