Research Article

Localization of Large-Scale Wireless Sensor Networks Using Niching Particle Swarm Optimization and Reliable Anchor Selection

Algorithm 3

Niching PSO-based localization algorithm.
Input: unknown node and the set of selected neighbour references
Output: estimated position of
 Initialize the search space , and divide into disjoint parts
 Evaluate the distances of to each
 Generate a group of particles in each region
 Evaluate the fitness values of all particles
 Evaluate   of all particles, and   of particles group
, ,
,
for    to    do
  for    to    do
   if    then
    Update particles of group
    Re-evaluate the fitness of these particles
    Update and
    if  then
     return  
    else  if    then
     
    else
     
    end if
    if    then
     
    end if
   end if
   end for
   if    then
    return  
   end if
  end for
  return