Research Article

An Effective Hybrid Algorithm Based on Particle Swarm Optimization with Migration Method for Solving the Multiskill Resource-Constrained Project Scheduling Problem

Algorithm 2

M-PSO.
Input: nmax: the threshold to find local extremal, tmax: number of evolution generations.
Output: the best solution gbest
(1) Begin
(2)  Pall ← Init data from iMOPSE dataset and create population.
(3)  t = 0
(4)  nf = 0
(5)  while (t < tmax)
(6)   t = t + 1
(7)   for i = 1 to size (Pall) do
(8)    Calculate the objective value: f (Pi)
(9)   end for
(10)   for i = 1 to size (Pall) do
(11)    if f (Pi) < f (fitnessi) then
(12)     pbesti = Pi
(13)     f (pbesti) = f (Pi)
(14)    end if
(15)   end for
(16)   for i = 1 to size (Pall) do
(17)    if (f (Pi) < f (gbest)) then
(18)     gbest = Pi
(19)     f (gbest) = f (Pi)
(20)    end if
(21)    if f(Pi)!=f(Pi-1) then
(22)     nf=0
(23)    else
(24)     nf + = 1
(25)    end if
(26)   end for
(27)   for i = 1 to size (Pall) do
(28)    update velocity vector
(29)    update position vector
(30)   end for
(31)   if (nf=nmax)
(32)    Pall ← Migration (Pall)
(33)    nf = 0
(34)   end if
(35)  end while
(36)  return gbest
(37) end
f: objective function