Skip to main content
. 2019 Jun 1;19(11):2515. doi: 10.3390/s19112515
Algorithm 1 Pseudo code of the dynsTGA metaheuristics
Initialization. Generate random initial population, set the iteration counter t to 1, the value of maximum iteration number (MaxIter), and the initial values of θ and N3 control parameters
while t<MaxGen do
  Evaluate all solutions in the population and sort them according to their fitness value
  for all solutions in N1 do
   Conduct local search by utilizing Equation (6)
   Apply greedy selection mechanism to choose between the old and the new solution
  end for
  for all solutions in N2 do
   Move solutions towards the closest best solutions in N1 by using Equations (7)–(9)
   Apply greedy selection mechanism to choose between the old and the new solution
  end for
  Remove N3 worst solutions from the population and replace them with randomly solutions from the search domain
  Generate N4 randomly distributed solutions and modify each solution in respect to the best solutions in N1 by using the mask operator
  Evaluate all solutions in the population and sort them according to their fitness value
  Choose N best solutions as initial population for the next iteration
  Recalculate the values of θ and N3 along with N2 and N1 control parameters
end while
return The best solution from the population