Review Article

Dragonfly Algorithm and Its Applications in Applied Science Survey

Visual 4

Pseudocode for MHDA [26].
Initializing the set of parameters:
Maximum iteration (Max-iter), maximum number of search agents (N max) number of search agents (N), number of dimensions (d), upper bound and lower bound of variables. Initialize the dragonflies’ populations (X). Initialize the step vectors (ΔX)
while maximum iterations not done
For each dragonfly calculate fitness value
  If Fitness Value < DA-pbest
   In this iteration move the current value to DA-pbest matrix
  End if
  if fitness value < DA-
   set current value as DA-
  End if
End
For each dragonfly
 Update the food source and enemy
 Update , s, a, c, f, and e
 Calculate S, A, C, F, and E using Equtaions (2)–(6)
 Update neighbouring radius
If a dragonfly has at least one neighbouring dragonfly
  Update velocity vector using equation (8) Update
  position vector using equation (9)
Else
  Update position vector using equation (10)
End if
 Check and correct new positions based on boundaries of variables
End
------------------End of DA and Start of PSO------------------
For each particle
 Initialize particle with DA-pbest matrix Set PSO-as DA-
End
while maximum iterations or minimum error criteria is not attained
For each particle
  Calculate fitness value
  If fitness value < PSO-pbest in history
   set current value as the new PSO-pbest
  End if
End
 Choose the particle with the best fitness value of all the
 particles as the PSO-
For each particle
  Calculate particle velocity according to equation (12)
  Update particle position according to equation (13)
End
End while