Research Article

PS-FW: A Hybrid Algorithm Based on Particle Swarm and Fireworks for Global Optimization

Algorithm 1

Generating explosion sparks by the explosion operator of PS-FW.
(1) Input: particles sorted in ascending order according to their fitness.
(2) Initialize the location of fireworks: , .
(3) for to do
(4)  Calculate the explosion amplitude of th firework by using (3).
(5)  Calculate the number of explosion sparks of th firework by using (4).
(6)  Update the number of explosion sparks of th firework by using (5).
(7)  if do
(8)   Update the explosion amplitude of th firework by using (11) and (12).
(9)  else do
(10)  Randomly select a firework around the current optimal firework.
(11)   Update the explosion amplitude of th firework by using (13).
(12)  end if
(13) end for
(14) Initialize the total number of explosion sparks .
(15) for to do
(16)  for to do
(17)   Initialize the location of the th explosion spark: .
(18)    for to do
(19)     Calculate the offset by using (14).
(20)    Update the value of th dimension of th explosion spark by using (15).
(21)     if or do
(22)      Update the by using (17).
(23)     end if
(24)    end for
(25)   
(26)  end for
(27) end for
(28) Output: explosion sparks.