Skip to main content
. 2023 Feb 9;25(2):317. doi: 10.3390/e25020317
Algorithm 2 Pseudo-code of the DE.
  • Input: 

    N: population size; Dim: problem dimension; Tmax_iter: maximum number of iterations; F: scaling factor; CR: crossover probability;

  • Output: 

    The position of the best individual and its fitness value;

  •   1:

    Initialize the population X randomly;

  •   2:

    Calculate the fitness value of X;

  •   3:

    while stopping condition is not met do

  •   4:

          for xit do

  •   5:

             The mutation vector vit is generated using the mutation operation shown in Equation (22) for individual xit;

  •   6:

          end for

  •   7:

          for xit do

  •   8:

             A test vector tri,jt is generated for individual xit and variance vector vit using the crossover operation shown in Equation (25);

  •   9:

          end for

  • 10:

          Calculate the fitness value of the function for each trial vector tri,jt;

  • 11:

          for xit do

  • 12:

             Generate the next generation of individuals xit+1 using the selection operation for individual xit and trial vector tri,jt;

  • 13:

          end for

  • 14:

    end while