Research Article

A Novel Compact Particle Swarm Optimization for Optimizing Coverage of 3D in Wireless Sensor Network

Algorithm 3

The pseudocode of ncPSO.
Initialize the and of
Initialize the by uniform distribution
Initialize the by uniform distribution
Initialize the , , ,
whiledo
   = novlel_compact(,) according to Equations (7) and (8)
  
   = compare(fitness(),fitness())
  Calculate the of the
  Update and of each particle according to Equations (1) and (2)
  Calculate the fitness of the new
  []=compare(fitness(),fitness())
  Update and according to Equations (10) and (11)
  
  
  Randomly choose a dimension
  Gaussian perturbation for the dimension of by Equation (9)
  Calculate the fitness of the new
  ifthen
   
   
  end if
  
end while