Initialize swarm
Locate leader
𝑖 = 1
while   𝑖 < 𝑖 m a x or convergence do
for each particle do
  Update position using (1)/(2),  (4)
  Evaluation using  (5)
  Update pBest
end  for
 Update leader
𝑖 ++
end  while
Algorithm 1: Standard PSO algorithm.