Set up parameters and initialize the number of iterations to zero.
Generate a random population of particles:
Evaluate the fitness of the particles and set the local best location for each
 particle equal to its current location.
Form the Pareto front and make a list of particles belonging to the front.
Build the singular point.
Find the closest particle to the singular point and establish it as swarm leader.
While not in termination-condition, do the following:
 (a) Execute from i = 1 to number of particles.
   (i) Change the position of the particle:
       Determine the inertia parameter , according to (3.8).
    Calculate the new velocity, , for particle according to (3.4) or (3.5).
    Set a new position, , for particle according to (3.7).
    (ii) Calculate the new fitness function vector for particle in its new position.
    (iii) If the new fitness function vector for particle dominates the fitness
    function vector that the particle had before moving to the new position;
    then set the new position as the best position currently found by particle i.
    (iv) If particle is in the list of particles belonging to the Pareto front then:
       if the new fitness function vector may also be a point on the
       Pareto front and this new position has at least one of its
       neighbors located further than the minimal permissible distance
       from any of the objectives, then add a new particle j (a clone of i)
       with and located at the current position of i;
       try to add (if possible) the particle i (at its new position) to the
       Pareto front; if the particle is added, remove from the list any
       dominated solution; dominated clones are eliminated from the swarm.
    (v) If particle is closer to the singular point than any other particle in the
    swarm, then set particle as the leader of the swarm with regard to the
    singular point.
    (vi) If particle is not currently the leader of the swarm, but coincides in
   position with the leader, then re-generate particle randomly.
  (b) Increase the iteration number.
Show the Pareto front and related results.
Pseudocode 1: