# An Efficient Particle Swarm Optimizer with Application to Man-Day Project Scheduling Problems

Authors: Ruey-Maw Chen; Frode Eika Sandnes
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The multimode resource-constrained project scheduling problem (MRCPSP) has been confirmed to be an NP-hard problem. Particle swarm optimization (PSO) has been efficiently applied to the search for near optimal solutions to various NP-hard problems. MRCPSP involves solving two subproblems: mode assignment and activity priority determination. Hence, two PSOs are applied to each subproblem. A constriction PSO is proposed for the activity priority determination while a discrete PSO is employed for mode assignment. A least total resource usage (LTRU) heuristic and minimum slack (MSLK) heuristic ensure better initial solutions. To ensure a diverse initial collection of solutions and thereby enhancing the PSO efficiency, a best heuristic rate (HR) is suggested. Moreover, a new communication topology with random links is also introduced to prevent slow and premature convergence. To verify the performance of the approach, the MRCPSP benchmarks in PSPLIB were evaluated and the results compared to other state-of-the-art algorithms. The results demonstrate that the proposed algorithm outperforms other algorithms for the MRCPSP problems. Finally, a real-world man-day project scheduling problem (MDPSP)—a MRCPSP problem—was evaluated and the results demonstrate that MDPSP can be solved successfully.


---

## Body

## 1. Introduction

The well-known resource-constrained project scheduling problem (RCPSP) is a combinatorial optimization problem where activities are scheduled such that themakespan is minimized, while satisfying given precedence constraints between the activities and resources. However, a more realistic project scheduling model termed multimode resource-constrained project scheduling problem (MRCPSP) is studied herein. The term multimode indicates that the project scheduling problem has varying operation modes available for each activity; each mode includes combinations of resource requirements and processing durations. Thus, different operation mode assignments for activities would yield different project scheduling results. The MRCPSP is subjected to precedence and resources constraints. Hence, the scheduling target of MRCPSP is to find an adequate mode assignment for each activity and determine a satisfactory activity priority while satisfying the constraints, thus minimizing the makespan.Scheduling problems such as job-shop, flow-shop, and vehicle routing have been studied intensively, and are confirmed to be NP-complete in their general forms. Both RCPSP and MRCPSP have also been proved to be NP-hard [1]. Therefore, many studies have attempted solving scheduling problems using neural networks [2], metaheuristics based algorithms including Tabu search (TS) [3, 4], simulated annealing (SA) [5], genetic algorithms (GA) [6], ant colony optimization (ACO) [7], and particle swarm optimization (PSO) [2, 8, 9].Several metaheuristics have been proposed for solving MRCPSP. Ranjbar et al. [10] solved small scale instances of MRCPSP based on a scatter search algorithm. Combinational particle swarm optimization (CPSO) was proposed by Jarboui et al. [11]. Additionally, Zhang et al. [12] applied two conventional PSOs to construct solutions for MRCPSP. PSO is a promising and applicable methodology for a variety of combinatorial problems and diverse scheduling problems as well as other applications. Particle swarm optimization (PSO) was first proposed by Kennedy and Eberhart [13]. Many derivatives of PSO have since been examined to significantly improve functionality, of which standard PSO [14] is probably the best known. Another variation called discrete PSO (DPSO) was proposed by Kennedy and Eberhart [13]. Solving MRCPSP is regarded as solving two subproblems (mode assignment and activity priority determination); hence, dual PSOs (based on constriction) are proposed to cope with these two subproblems. A discrete PSO is adopted to decide the discrete mode.Moreover, conventional PSOs with global communication topologies usually lead to premature convergence in local optima. Hence, a modified global best experience on the basis of local communication topology to ensure stable convergence was introduced [14], and yet the convergence is slow. Therefore, a swarm communication topology with random links (rand-link communication topology) is presented herein to increase the PSO efficiency. Restated, a trade-off mechanism between local exploitation and global exploration abilities is proposed. Additionally, two heuristics, least total resource usage (LTRU) and the minimum slack (MSLK), are used to further enhance effectiveness. The two heuristics are used to achieve better initial solutions and thus speed up the search. However, an initial set of diverse solutions would increase the chances of finding better results. Hence, a heuristic rate (HR) is explored.To improve the effectiveness and efficiency of the proposed scheme, the largest scale scheduling case of MRCPSP in PSPLIB [15] was tested to find optimal parameters. To verify the performance of the proposed scheme, all cases of the MRCPSP benchmark instances were evaluated. Performance comparisons between algorithms were conducted. Finally, the experimental results demonstrate that the proposed scheme outperforms other schemes and is efficient in solving MRCPSP class problems. In South East Asia, project managers often use man-day as a project scheduling and management unit. Different man-day combinations are considered as a different operation modes. Hence, this man-day project scheduling problem (MDPSP) can be regarded as a MRCPSP problem. A real-world MDPSP case was finally tested; the optimal operation mode for every task is provided and the minimum completion time of the project is also given. The project manager is then able to adjust the manpower based on the results. The remainder of the paper is organized as follows. Section 2 provides descriptions on MRCPSP and MDPSP. Section 3 introduces particle swarm optimization, discrete particle swarm optimization, and standard particle swarm optimization. The proposed dual PSO approach with heuristics and rand-link communication topology to solve scheduling problems is also presented in Section 3. In Section 4, experimental results and comparisons are demonstrated. Finally, the study is summarized in Section 5.


## 2. Scheduling Problems

### 2.1. MRCPSP

A MRCPSP instance includes precedence and resource constraints based on an operation mode where different combinations produce different schedules. The multimode scheduling problem is defined as follows.The MRCPSP includesn activities to be scheduled and two dummy activities represent the start and the end of the project. Let J be a set consisting of all activities, denoted J={0,…,n+1}. Accordingly, the project can be characterized by an activity-on-node (AON). MRCPSP involves precedence and resource constraints; some tasks in MRCPSP are partially ordered. For tasks without precedence constraint, different execution sequences would result in different schedules and hence the different completion times. Meanwhile, each activity j has Mj available operation modes. The set Modej  ={1,…,Mj} includes the available modes of activity j, and the operation mode of activity j is denoted mj,mj∈Modej. Moreover, each mode involves a required processing time (pj,mj) and different resource types needed for completing the activity. Hence, a task with different operation modes would yield a different schedule. When the jth activity performs n mode mj, the start time of activity is sj and processing time is pj,m. Hence the finish time of the activity is denoted by fj=sj+pj,mj.MRCPSP provides two types of resources: renewable resources and nonrenewable resources. For each renewable resource, a fixed amount of resources are provided during each time period. The available amount of each nonrenewable resource is constant throughout the entire project. The amount of renewable resourcesK required by activity j at mode mj is denoted by rj,mK and the required nonrenewable resource q by activity j at mode mj is represented by nj,mq. However, all consumed renewable resources at any time period should not exceed what is provided by the system; that is, ∑j∈A(t)rj,mjk≤Rk,RK  is the available amount of renewable resource type K, and A(t) denotes the set in which activities are being processed at time t; all used nonrenewable resources in the whole project should not be more than system-supplied; that is, ∑j∈Jnj,mjq≤Nq,Nq is the available amount of the qth nonrenewable resource. A simple example of MRCPSP in PSPLIB is given in Table 1 and Figure 1.Table 1
Five activity instances of MRCPSP in PSPLIB.
(a)
Activity
#Modes
#Successors
Successors
0
0
2
1
2
1
1
2
3
4
2
1
1
5
3
1
1
6
4
1
1
6
5
3
1
6
6
1
0
(b)
Activity
Mode
Duration
Renewable
Nonrenewable
0
0
0
0
0
1
1
1
2
4
2
1
3
2
5
3
1
4
1
1
4
1
3
3
5
5
1
1
3
6
2
2
2
5
3
3
1
4
6
0
0
0
0
Available resources
4
20Figure 1
Activity on node (AON).The schedule is said to befeasible when situations of both resources and precedence constraints are met; otherwise, the schedule isinfeasible. For example, a project schedule with the activity priority list {1,5,2,3,4} isinfeasible since it violates a precedence constraint. Meanwhile, a project schedule with tasks’ operation mode list {1,1,1,1,1} is alsoinfeasible because the overall amount of consumed nonrenewable resources exceeds the amount provided by the system. Moreover, the project schedules with the same activity priority list, say {1,2,3,4,5}, but different operation mode lists {1,1,1,1,3} and {1,1,1,1,2} would yield differentmakespans,namely, 8 and 7, respectively. The project schedules with the same operation mode list, say {1,1,1,1,2}, but different activity priority lists {1,3,4,2,5} and {1,2,3,4,5} would also result in differentmakespans, that is, 9 and 7, respectively. Therefore, different combinations of mode list and priority list would result in different project schedules. To obtain a near optimal solution, the project requires a satisfactory activity priority list and an adequate mode list. In other words, the target of this investigation for solving multimode project scheduling is to find the optimal combination of these two lists so as to minimize themakespan. Overall, favourable mode and activity lists yield good solutions.


### 2.2. MDPSP

The man-day project scheduling problem (MDPSP) is common in South East Asia. In MDPSP, one man-day is utilized as a management unit in estimating and planning a project, for example, a project manager may estimate that a project task requires four man-days. Thus, the task may need four people to work for one day, two people to work for two days, or one person to work for four days. Every man-day combination is considered as an operation mode; every task has different operation modes. Therefore, this man-day project scheduling problem (MDPSP) can be regarded as a MRCPSP problem. Similarly, the MDPSP also involves precedence constraints; that is, a task can be executed only if all its predecessor tasks have been completed, and every task is nonpreemptive. Moreover, the people in the work team are considered renewable resources. The nonrenewable resource is supposed to be enough. A real-world MDPSP example is shown in Figure2—a real network construction project. Figure 2(a) lists the required task items and man-days needed for every task; Figure 2(b) displays the corresponding AON.A real-world MDPSP example.
(a)
Task items in the real-world project
(b)
Corresponding AON


## 2.1. MRCPSP

A MRCPSP instance includes precedence and resource constraints based on an operation mode where different combinations produce different schedules. The multimode scheduling problem is defined as follows.The MRCPSP includesn activities to be scheduled and two dummy activities represent the start and the end of the project. Let J be a set consisting of all activities, denoted J={0,…,n+1}. Accordingly, the project can be characterized by an activity-on-node (AON). MRCPSP involves precedence and resource constraints; some tasks in MRCPSP are partially ordered. For tasks without precedence constraint, different execution sequences would result in different schedules and hence the different completion times. Meanwhile, each activity j has Mj available operation modes. The set Modej  ={1,…,Mj} includes the available modes of activity j, and the operation mode of activity j is denoted mj,mj∈Modej. Moreover, each mode involves a required processing time (pj,mj) and different resource types needed for completing the activity. Hence, a task with different operation modes would yield a different schedule. When the jth activity performs n mode mj, the start time of activity is sj and processing time is pj,m. Hence the finish time of the activity is denoted by fj=sj+pj,mj.MRCPSP provides two types of resources: renewable resources and nonrenewable resources. For each renewable resource, a fixed amount of resources are provided during each time period. The available amount of each nonrenewable resource is constant throughout the entire project. The amount of renewable resourcesK required by activity j at mode mj is denoted by rj,mK and the required nonrenewable resource q by activity j at mode mj is represented by nj,mq. However, all consumed renewable resources at any time period should not exceed what is provided by the system; that is, ∑j∈A(t)rj,mjk≤Rk,RK  is the available amount of renewable resource type K, and A(t) denotes the set in which activities are being processed at time t; all used nonrenewable resources in the whole project should not be more than system-supplied; that is, ∑j∈Jnj,mjq≤Nq,Nq is the available amount of the qth nonrenewable resource. A simple example of MRCPSP in PSPLIB is given in Table 1 and Figure 1.Table 1
Five activity instances of MRCPSP in PSPLIB.
(a)
Activity
#Modes
#Successors
Successors
0
0
2
1
2
1
1
2
3
4
2
1
1
5
3
1
1
6
4
1
1
6
5
3
1
6
6
1
0
(b)
Activity
Mode
Duration
Renewable
Nonrenewable
0
0
0
0
0
1
1
1
2
4
2
1
3
2
5
3
1
4
1
1
4
1
3
3
5
5
1
1
3
6
2
2
2
5
3
3
1
4
6
0
0
0
0
Available resources
4
20Figure 1
Activity on node (AON).The schedule is said to befeasible when situations of both resources and precedence constraints are met; otherwise, the schedule isinfeasible. For example, a project schedule with the activity priority list {1,5,2,3,4} isinfeasible since it violates a precedence constraint. Meanwhile, a project schedule with tasks’ operation mode list {1,1,1,1,1} is alsoinfeasible because the overall amount of consumed nonrenewable resources exceeds the amount provided by the system. Moreover, the project schedules with the same activity priority list, say {1,2,3,4,5}, but different operation mode lists {1,1,1,1,3} and {1,1,1,1,2} would yield differentmakespans,namely, 8 and 7, respectively. The project schedules with the same operation mode list, say {1,1,1,1,2}, but different activity priority lists {1,3,4,2,5} and {1,2,3,4,5} would also result in differentmakespans, that is, 9 and 7, respectively. Therefore, different combinations of mode list and priority list would result in different project schedules. To obtain a near optimal solution, the project requires a satisfactory activity priority list and an adequate mode list. In other words, the target of this investigation for solving multimode project scheduling is to find the optimal combination of these two lists so as to minimize themakespan. Overall, favourable mode and activity lists yield good solutions.


## 2.2. MDPSP

The man-day project scheduling problem (MDPSP) is common in South East Asia. In MDPSP, one man-day is utilized as a management unit in estimating and planning a project, for example, a project manager may estimate that a project task requires four man-days. Thus, the task may need four people to work for one day, two people to work for two days, or one person to work for four days. Every man-day combination is considered as an operation mode; every task has different operation modes. Therefore, this man-day project scheduling problem (MDPSP) can be regarded as a MRCPSP problem. Similarly, the MDPSP also involves precedence constraints; that is, a task can be executed only if all its predecessor tasks have been completed, and every task is nonpreemptive. Moreover, the people in the work team are considered renewable resources. The nonrenewable resource is supposed to be enough. A real-world MDPSP example is shown in Figure2—a real network construction project. Figure 2(a) lists the required task items and man-days needed for every task; Figure 2(b) displays the corresponding AON.A real-world MDPSP example.
(a)
Task items in the real-world project
(b)
Corresponding AON


## 3. Particle Swarm Optimization (PSO)

Particle swarm optimization (PSO) was first proposed by Kennedy and Eberhart in 1995 [13]. PSO is a multiagent general metaheuristic and has been widely applied to many complex and NP-hard problems. PSO is initialized with a population of randomly positioned particles and searches for the position with the best fitness. The particle position is the representative of a solution or schedule correlated with fitness (makespan) in this investigation.In each generation or iteration, every particle moves to a new position guided by velocity and then the fitness of the particles is calculated. There are two experience positions used in PSO for updating the velocity: one is the global experience position of all particles, which remembers the global best solution obtained by all particles; the other is each particle’s individual experience, which remembers the best position that particle has been moved to. Formally, let anN-dimensional space have M particles. For the ith particle (i=1,…,M), its position consists of N components Xi={Xi1,…,XiN}, where Xij is the jth component of the position. The velocity of particle i is Vi={Vi1,…,ViN} and the particle’s individual experience is Li={Li1,…,LiN}. Additionally, G={G1,…,GN} represents the global best experience shared among all the particles. The velocity and position update rules used in the original PSO are displayed as follows:
(1)Vijnew=w×Vij+c1×r1×(Lij-Xij)+c2×r2×(Gj-Xij),Xijnew=Xij+Vijnew,
where w is an inertia weight used to determine the influence of the previous velocity on the new velocity. The c1 and c2 are learning factors used to guide how close to the individual or global experience position, respectively. Moreover, the r1 and r2 are random numbers uniformly distributed in the interval [0,1], influencing the tradeoff between the global (swarm’s best experience) and local (particle’s best experience) exploration abilities during search. The velocity update rule and the position update rule are regarded as crossover and mutation operations of evolutionary computation, respectively. The velocity updating plays an important part in PSO while searching for a solution with better fitness. Therefore, several derivatives of PSO have been proposed to update the velocity vector. One of them is discrete version of PSO developed by Kennedy and Eberhart [22]. Another is the standard PSO proposed by Bratton and Kennedy [14]. In this work, the velocity update rule of standard PSO is the basis of our proposed dual PSO mechanism. The discrete PSO is further introduced for solving mode assignment.


### 3.1. Solution Encoding Scheme

The aim of the mode assignment subproblem is to generate a mode listXM={X1M,…,XjM} (J activities), which determines the operation mode for each activity, that is, determining each activity’s duration and resources. The  XjM  is the mode for activity j which has bitj binary values. The aim of the activity priority determination subproblem is to generate the activity list Pr = {0,…,n+1} which is obtained from activity listXJ. Hence, the solution vector X is composed of two position vectors corresponding to the mode listXM and activity listXJ; that is,  X=XM∪XJ.


### 3.2. Standard Particle Swarm Optimization

In PSO, the balance between the global exploitation and local exploration processes is mainly controlled by the inertia weights. A suitable selection of the inertia weightw can provide a balance between the global and local exploration processes and thus requires less iteration on average to find the optimum. In this investigation, the named standard PSO (or constriction version PSO) is applied to mode assignment and activity priority determination. The standard PSO involves a constriction factor to replace inertia weight in the velocity update rule as follows:
(2)Vijnew=χ×(Vij+c1×r1×(Lij-Xij)+c2×r2kk×(Gj-Xij)),
where χ is the constriction factor used for controlling the movement velocity. This velocity update rule is suggested for its stability as indicated in [14].


### 3.3. Discrete PSO Encoding Scheme for Mode Assignment

For the discrete PSO, the velocity update rule of the standard PSO is as in (2). The Xij is thejth  component of XMposition vector. The value of Xij is either 0 or 1. The value of individual experience PSO (Lij, thejth component of particlei) or global experience PSO (Gn, the nth component) is also either 0 or 1; that is, Xi,n,Li,n,Gi,n∈{0,1}. However, the values of the velocity components are still real numbers since r1 and r2 are random numbers. In this work, they are limited to the interval [-Vmax⁡,Vmax⁡]. Each particle moves to a new position according to its new velocity. However, the new position generation of the discrete PSO is not the same as in the original PSO. Kennedy and Eberhart [22] advocated that the higher the velocity, the more likely to choose 1 for the corresponding position component, and low velocity favors a position value of 0. Hence, a sigmoid function is used as the probability function as shown in (3). S(Vijnew) is defined as representing the probability of Xijnew to be set to 0 or 1. To avoid the value of S(Vijnew) approaching 0 or 1, a constant Vmax⁡ is used to limit the range of Vijnew. The resulting position value Xijnew, either 1 or 0, is determined by S(Vijnew) and a uniform distribution random variable rand in [0,1] as defined in (4). The component number of position vector for activityj(XjM) is determined based on Mj. If the corresponding position bits for activity j is XjM={010}, then mj=2; that is, activity j is assigned to execution in operation mode 2 as follows:
(3)S(Vijnew)=11+exp⁡(-Vijnew),(4)Xijnew={1,rand<S(Vijnew)0,otherwise.


### 3.4. Determining Activity Priority

Activity processing order greatly affects themakespan while meeting the given precedence constraints. Therefore, determining satisfactory activity priority is important for solving MRCPSP.Suppose that the position vector XJ corresponds to the activity list Pr with J components, and then each component represents the activities’ precedence relations. The activity list is a priority list, that is, a permutation without repeating values. Therefore, the encoding mechanism for mode list XM is not applicable. Instead, a random key scheme is applied to determine the activity priority; each component ofXJ is associated with an integer key. The component values ofXJ are sorted in ascending order. Next, the key is used as the activity priority, then the activity list Pr is produced. An example of a random key scheme is displayed in the following equation:
(5)Prioritylis0.30.33.20.90.91.4Key12345PrioritylisXJ={0.33.20.92.61.4}Sortinginascentorder↓PrioritylisXJ′={0.30.91.42.63.2}Sortinginascentorder↓PrioritylistPr={13542}.Notably, the MRCPSP has precedence constraints; hence, the produced activity priority list Pr may result in an infeasible solution. The repair mechanism can be applied to correct activity priority list Pr to Pr′ (repaired priority list).


### 3.5. New Swarm Communication Topology

There have been two commonly used swarm communication topologies for the standard PSO, namely, thegBest (global best) topology and the lBest (local best) topology. The gBest topology is the most widely examined and is based on the global topology of the network, in which every particle is able to share information with each other quickly and performs better because of its global communication ability. However, for more complex problem, the global communication ability of gBest usually leads to premature convergence and becomes trapped in local optima. Hence, the lBest topology was addressed and has recently attracted the researchers’ attention. The structure is based on the local topology of the network such as ring or star. The feature of lBest is its limited communication; every particle just communicates with a portion of the swarm. Obviously, lBest has a slower rate of convergence than gBest.A new swarm communication rand-link topology is proposed. The rand-link topology is applied to avoid both slow convergence and premature convergence. It is based on the ring topology with some additional random links. The rand-link topology combineslBest topology (determined by Xi+1,Xi,Xi-1) and R random selected particles.


### 3.6. Heuristics Rate for Initial Solutions

By starting the search from a better position, the probability of finding a near optimal solution and more rapid convergence is increased. A heuristic is an experience-based strategy or technique, the aim of which is usually to give better quality solutions over time. In PSO, randomly assigned initial particle position may reduce the efficiency of the algorithm. Hence, to effectively solve the problem, most studies would consider how to generate a good initialization population of the particles. In this study, two heuristics based on priority rules [23] are applied for generating two initial position vectorsXM andXJ, namely, the least total resource usage (LTRU) heuristic and the minimum slack (MSLK) heuristic. The LTRU heuristic is based on the mode priority rule, which determines each mode i ofjth activity with a priority value 1/vj(i); the definition of vj(i) is listed in (6) as follows:
(6)vj(i)=∑k=1K(rj,ik×pj,i).According to (6), an operation mode requesting more renewable resources (k) and requiring longer processing time would have a larger vj(i) value and thus have a lower mode priority.In the activity priority determination problem, the activity priority rule assigns a priority value for each activityj; the MSLK is used in this work. The activity priority value is determined by 1/p(j), the definition of p(j) is displayed below in (7) as follows:
(7)p(j)=(LSj-ESj),
where LSj and ESj are the latest start time and the earliest start time of activityj, respectively; these are obtained by the critical path method in this study. Therefore, the latest start time close to the earliest start time has the higher activity priority. However, applying this heuristics in full to the initial solutions would lead to premature convergence. To avoid this problem, diverse initial solutions are ensured by proposing a heuristic rate (HR) to decide the ratio of the initial solutions generated by heuristics. The design is as follows:
(8)initialsolutions={particles×HR,heuristicsgeneratedparticles×(1-HR),randomgenerated.


### 3.7. Fitness Design

The scheduling target of MRCPSP is to find an adequate schedule while following constraints and thus minimizing themakespan,that is,minimizing the completion time of the dummy activity (n+1). The fitness of a solution is defined as the reciprocal of themakespan, as indicated in (9) as follows:
(9)fitness=(makespan)-1.An obtained schedule violate constraint is an infeasible solution. Therefore, a penalty mechanism is designed for infeasible solution. Consider that the resource requirement (np) of each activity (j) is based on the predefined operation modes (mj∈Modej) and that the amount of the given available resources is Np. Therefore, the penalty mechanism is designed to assign a nonzero penalty value on infeasible solutions. The penalty value is calculated based on the degree to which the resource constraints are exceeded; hence, the penalty value (PV) calculation is designed as follows:
(10)PV=∑p∈Nmax⁡{0,∑j∈Jnj,mj∈Modejp-Np}.The fitness function involving the penalty value, PV, is then redefined as follows:(11)fitness=1(makespan+PV).The proposed particle swarm optimization is summarized in Algorithm1.Algorithm 1:The proposed dual PSO.
Initialize particles’ positions(X=XM∪XJ) by applying heuristics: LTRU (for XM) and MSLK (for XJ).
Iteration Loop
For each particlei in the swarm do:
Update the velocity vectorViM and position vector XiM
according to (2) and (4), respectively.
Update the velocity vectorViJ and position vector XiJ
according to (2)
Calculate the mode list vectorM based on XiM (4).
Calculate the activity list vector Pr by applying the random
key scheme to and constructing a new feasible
precedence for the process orderPr′ by repair mechanism.
Calculate the particle’s fitness (based on vectorM and vector Pr′).
UpdateLi.
UpdateG(gBest, lBest or rand-link).
Until the End condition is reached, return solution.


## 3.1. Solution Encoding Scheme

The aim of the mode assignment subproblem is to generate a mode listXM={X1M,…,XjM} (J activities), which determines the operation mode for each activity, that is, determining each activity’s duration and resources. The  XjM  is the mode for activity j which has bitj binary values. The aim of the activity priority determination subproblem is to generate the activity list Pr = {0,…,n+1} which is obtained from activity listXJ. Hence, the solution vector X is composed of two position vectors corresponding to the mode listXM and activity listXJ; that is,  X=XM∪XJ.


## 3.2. Standard Particle Swarm Optimization

In PSO, the balance between the global exploitation and local exploration processes is mainly controlled by the inertia weights. A suitable selection of the inertia weightw can provide a balance between the global and local exploration processes and thus requires less iteration on average to find the optimum. In this investigation, the named standard PSO (or constriction version PSO) is applied to mode assignment and activity priority determination. The standard PSO involves a constriction factor to replace inertia weight in the velocity update rule as follows:
(2)Vijnew=χ×(Vij+c1×r1×(Lij-Xij)+c2×r2kk×(Gj-Xij)),
where χ is the constriction factor used for controlling the movement velocity. This velocity update rule is suggested for its stability as indicated in [14].


## 3.3. Discrete PSO Encoding Scheme for Mode Assignment

For the discrete PSO, the velocity update rule of the standard PSO is as in (2). The Xij is thejth  component of XMposition vector. The value of Xij is either 0 or 1. The value of individual experience PSO (Lij, thejth component of particlei) or global experience PSO (Gn, the nth component) is also either 0 or 1; that is, Xi,n,Li,n,Gi,n∈{0,1}. However, the values of the velocity components are still real numbers since r1 and r2 are random numbers. In this work, they are limited to the interval [-Vmax⁡,Vmax⁡]. Each particle moves to a new position according to its new velocity. However, the new position generation of the discrete PSO is not the same as in the original PSO. Kennedy and Eberhart [22] advocated that the higher the velocity, the more likely to choose 1 for the corresponding position component, and low velocity favors a position value of 0. Hence, a sigmoid function is used as the probability function as shown in (3). S(Vijnew) is defined as representing the probability of Xijnew to be set to 0 or 1. To avoid the value of S(Vijnew) approaching 0 or 1, a constant Vmax⁡ is used to limit the range of Vijnew. The resulting position value Xijnew, either 1 or 0, is determined by S(Vijnew) and a uniform distribution random variable rand in [0,1] as defined in (4). The component number of position vector for activityj(XjM) is determined based on Mj. If the corresponding position bits for activity j is XjM={010}, then mj=2; that is, activity j is assigned to execution in operation mode 2 as follows:
(3)S(Vijnew)=11+exp⁡(-Vijnew),(4)Xijnew={1,rand<S(Vijnew)0,otherwise.


## 3.4. Determining Activity Priority

Activity processing order greatly affects themakespan while meeting the given precedence constraints. Therefore, determining satisfactory activity priority is important for solving MRCPSP.Suppose that the position vector XJ corresponds to the activity list Pr with J components, and then each component represents the activities’ precedence relations. The activity list is a priority list, that is, a permutation without repeating values. Therefore, the encoding mechanism for mode list XM is not applicable. Instead, a random key scheme is applied to determine the activity priority; each component ofXJ is associated with an integer key. The component values ofXJ are sorted in ascending order. Next, the key is used as the activity priority, then the activity list Pr is produced. An example of a random key scheme is displayed in the following equation:
(5)Prioritylis0.30.33.20.90.91.4Key12345PrioritylisXJ={0.33.20.92.61.4}Sortinginascentorder↓PrioritylisXJ′={0.30.91.42.63.2}Sortinginascentorder↓PrioritylistPr={13542}.Notably, the MRCPSP has precedence constraints; hence, the produced activity priority list Pr may result in an infeasible solution. The repair mechanism can be applied to correct activity priority list Pr to Pr′ (repaired priority list).


## 3.5. New Swarm Communication Topology

There have been two commonly used swarm communication topologies for the standard PSO, namely, thegBest (global best) topology and the lBest (local best) topology. The gBest topology is the most widely examined and is based on the global topology of the network, in which every particle is able to share information with each other quickly and performs better because of its global communication ability. However, for more complex problem, the global communication ability of gBest usually leads to premature convergence and becomes trapped in local optima. Hence, the lBest topology was addressed and has recently attracted the researchers’ attention. The structure is based on the local topology of the network such as ring or star. The feature of lBest is its limited communication; every particle just communicates with a portion of the swarm. Obviously, lBest has a slower rate of convergence than gBest.A new swarm communication rand-link topology is proposed. The rand-link topology is applied to avoid both slow convergence and premature convergence. It is based on the ring topology with some additional random links. The rand-link topology combineslBest topology (determined by Xi+1,Xi,Xi-1) and R random selected particles.


## 3.6. Heuristics Rate for Initial Solutions

By starting the search from a better position, the probability of finding a near optimal solution and more rapid convergence is increased. A heuristic is an experience-based strategy or technique, the aim of which is usually to give better quality solutions over time. In PSO, randomly assigned initial particle position may reduce the efficiency of the algorithm. Hence, to effectively solve the problem, most studies would consider how to generate a good initialization population of the particles. In this study, two heuristics based on priority rules [23] are applied for generating two initial position vectorsXM andXJ, namely, the least total resource usage (LTRU) heuristic and the minimum slack (MSLK) heuristic. The LTRU heuristic is based on the mode priority rule, which determines each mode i ofjth activity with a priority value 1/vj(i); the definition of vj(i) is listed in (6) as follows:
(6)vj(i)=∑k=1K(rj,ik×pj,i).According to (6), an operation mode requesting more renewable resources (k) and requiring longer processing time would have a larger vj(i) value and thus have a lower mode priority.In the activity priority determination problem, the activity priority rule assigns a priority value for each activityj; the MSLK is used in this work. The activity priority value is determined by 1/p(j), the definition of p(j) is displayed below in (7) as follows:
(7)p(j)=(LSj-ESj),
where LSj and ESj are the latest start time and the earliest start time of activityj, respectively; these are obtained by the critical path method in this study. Therefore, the latest start time close to the earliest start time has the higher activity priority. However, applying this heuristics in full to the initial solutions would lead to premature convergence. To avoid this problem, diverse initial solutions are ensured by proposing a heuristic rate (HR) to decide the ratio of the initial solutions generated by heuristics. The design is as follows:
(8)initialsolutions={particles×HR,heuristicsgeneratedparticles×(1-HR),randomgenerated.


## 3.7. Fitness Design

The scheduling target of MRCPSP is to find an adequate schedule while following constraints and thus minimizing themakespan,that is,minimizing the completion time of the dummy activity (n+1). The fitness of a solution is defined as the reciprocal of themakespan, as indicated in (9) as follows:
(9)fitness=(makespan)-1.An obtained schedule violate constraint is an infeasible solution. Therefore, a penalty mechanism is designed for infeasible solution. Consider that the resource requirement (np) of each activity (j) is based on the predefined operation modes (mj∈Modej) and that the amount of the given available resources is Np. Therefore, the penalty mechanism is designed to assign a nonzero penalty value on infeasible solutions. The penalty value is calculated based on the degree to which the resource constraints are exceeded; hence, the penalty value (PV) calculation is designed as follows:
(10)PV=∑p∈Nmax⁡{0,∑j∈Jnj,mj∈Modejp-Np}.The fitness function involving the penalty value, PV, is then redefined as follows:(11)fitness=1(makespan+PV).The proposed particle swarm optimization is summarized in Algorithm1.Algorithm 1:The proposed dual PSO.
Initialize particles’ positions(X=XM∪XJ) by applying heuristics: LTRU (for XM) and MSLK (for XJ).
Iteration Loop
For each particlei in the swarm do:
Update the velocity vectorViM and position vector XiM
according to (2) and (4), respectively.
Update the velocity vectorViJ and position vector XiJ
according to (2)
Calculate the mode list vectorM based on XiM (4).
Calculate the activity list vector Pr by applying the random
key scheme to and constructing a new feasible
precedence for the process orderPr′ by repair mechanism.
Calculate the particle’s fitness (based on vectorM and vector Pr′).
UpdateLi.
UpdateG(gBest, lBest or rand-link).
Until the End condition is reached, return solution.


## 4. Experimental Results and Comparisons

To evaluate the performance of the proposed scheme, a test on a benchmark was conducted prior to solving real-word man-day project scheduling problems. Test instances in the well-known project scheduling problem library (PSPLIB) [15] were simulated. Simulation instances in the interested PSPLIB include scheduling problems with 10, 12, 14, 16, 18, 20, and 30 nondummy activities cases (denoted by J10 through J30); each case has 640 instances. However, some instances have no feasible solutions. Therefore, every case has a different number of feasible instances (ex. 536, 547, 551, 550, 552, 554, and 552 instances for the J10, J12, J14, J16, J18, J20, and 552 instances, resp.). To compare algorithm performance, the algorithm was tested with 5000 evaluations as the stop condition. Meanwhile, the solution quality is measured by evaluating the ratio of optimal solutions (OPT) found which is calculated using (12); “besti” represents the best solution found for instance i. If the close to optimalmakespans for instances are known, then the “best” is the close to optimal solution (J10 to J20) provided in PSPLIB. However, close to optimalmakespans for some instances are unknown, and then lower bounds (the best known solution found for J30) are used instead as the “best” solution as follows:
(12)OPT=(∑i∈instancesbesti|instances|)×100%.To determine the close to optimal heuristics rate (HR) and random links, tests were performed on the largest case (J30). Too many or too few random links would approach global or local communication topologies; hence, the best random links has to be determined. To obtain diverse initial solutions, the best HR was obtained through tests. The simulation results demonstrated that 4 random links yield good results while HR = 20% gives the best results, as illustrated in Tables2 and 3. Initial solutions generated without heuristics yield fewer close to optimal solutions. A high HR may therefore lead to a local optimum since the algorithm converges prematurely.Table 2
Comparison of different random links.
Random links
Total
OPT
2
283/552
51.27%
3
291/552
52.72%
4
304/552
55.07%
5
290/552
52.54%
6
298/552
53.97%Table 3
Comparison of 0%–100% HR.
HR
Total
OPT
0%
304/552
55.07%
10%
322/552
58.33%
20%
337/552
61.05%
30%
324/552
58.70%
40%
326/552
59.06%
50%
323/552
58.51%
60%
320/552
57.97%
70%
313/552
56.70%
80%
319/552
57.79%
90%
317/552
57.43%
100%
322/552
58.33%Accordingly, the parameter settings applied for performance comparison arec1=c2=2.0, χ=0.73, HR=20%, and Random-links = 4 for 20 particles with 5000 schedules. Table 4 shows the simulation results of all 552 instances of the J30 case. In Table 4, “Dev. BKS (%)” shows the average deviation from the best known solutions (BKS). However, as comparison of “Dev. BKS” is not always possible, the percentage increase of the project duration above the critical path (CP) is also indicated, “Incr. CP (%).” In the last two columns (“Equal (%)” and “Worse (%)”) of the table, the percentages of instances which result in equal and worse results than the best known solution are shown. The “Dev. BKS” and “Incr. CP” are defined as listed in (13) and (14), respectively. Consider the following:
(13)Dev.BKS=∑i∈instances(((fitnessi-besti)/besti)×100%)|instances|,(14)Incr.CP=∑i∈instances(((fitnessi-CPi)/CPi)×100%)|instances|.Table 4
Comparison of algorithms on J30.
%
Dev. BKS
Incr. CP
Worse
Equal
This work*
0.96
13.45
26.45
73.30
Peteghem and Vanhoucke [16]
1.08
13.75
29.00
71.00
Chiang et al. [17]
2.60
N/A
27.36
72.64
Jo´zefowska et al. [18]
11.76
N/A
74.40
25.60Meanwhile, a comparison of the different algorithms on the J10 to J20 datasets of PSPLIB was made. Table5 displays the simulation results of all instances of the J10 to J20 cases, with average deviations provided. In the second part of the table, the percentage of optimal solutions found for each case is also presented.Table 5
Comparison of algorithms on J10 to J20.
Dev. BKS (%)
Instance set
J10
J12
J14
J16
J18
J20
This work*
0.01
0.07
0.15
0.15
0.34
0.35
Wauters et al. [19]
0.05
0.08
0.23
0.30
0.53
0.70
Peteghem and Vanhoucke [16]
0.01
0.09
0.22
0.32
0.42
0.57
Lova et al. [20]
0.06
0.17
0.32
0.44
0.63
0.87
Ranjbar et al. [10]
0.18
0.65
0.89
0.95
1.21
1.64
Jarboui et al. [11]
0.03
0.09
0.36
0.44
0.89
1.10
Chiang et al. [17]
0.34
N/A
N/A
N/A
N/A
1.79
Alcaraz et al. [21]
0.24
0.73
1.00
1.12
1.43
1.91
Jo´zefowska et al. [18]
1.16
1.73
2.60
4.07
5.52
6.74
Optimal (%)
This work*
99.81
98.35
96.19
95.64
90.76
90.25
Peteghem and Vanhoucke [16]
99.63
98.17
94.56
92.00
88.95
85.74
Chiang et al. [17]
99.81
N/A
N/A
N/A
N/A
88.27
Jo´zefowska et al. [18]
85.60
80.30
66.40
54.70
43.05
35.7Table4 shows that the proposed scheme yields mean deviation of 0.96% from the best known solutions, a 13.45% average increase of the project duration above the minimal critical path, and 73.3% of the best known solutions found for solving the largest case, J30. Meanwhile, the proposed scheme gives mean deviations of 0.01%, 0.07%, 0.15%, 0.15%, 0.34%, and 0.35% from the optimal solutions for J10, J12, J14, J16, J18, and J20, respectively, as listed in Table 4.According to the simulation results, the proposed particle swarm optimizer efficiently finds near optimal solutions to the MRCPSP problem; hence, a real-world MDPSP example (Figure2) was further investigated. In this real-world example, every task has different operation modes. For example, task 4f claims 8-man-day operation, there are 4 modes for task 4f, that is, 8/1, 4/2, 2/4 and 1/8 (man/day), corresponding to modes 1, 2, 3, and 4, respectively. The available renewable resource (manpower) in the project includes an eight-people work team. Task 2b claims 16-man-day operation, there are 1/16, 2/8, 4/4, 8/2, and 16/1 (man-day) modes. However, 16/1 operation mode requires 16 people to finish the task; it violates the available manpower resource. Therefore, 16/1 operation mode is excluded in the implementation. The simulation results are shown in a Gantt chart (see Figure 3(a)) and the best operation mode (see Figure 3(b)). In Figure 3, every task is associated with an operation mode and displayed by task/mode; for example, 4d/M7 represents task 4d executes in mode 7. These simulation results indicate that to finish the network construction project with an eight-people work team, the minimum completion time is 34 days. The project manager can adjust the required manpower based on the resulting schedule. Figures 4(a) and 5(a) display the resulting Gant charts based on the nine-people and ten-people work team alternatives. The corresponding project schedule can be shrunk to 30 or 27 days, respectively, when one or two more workers are involved into the work team. Restated, the project can be completed ahead when workers increase. Moreover, the corresponding operation mode for each task would be different accordingly as displayed in Figures 4(b) and 5(b).Resulting Gantt chart and operation mode of the eight-people work team project.
(a)
Gantt chart
(b)
Task/mode assignmentResulting Gantt chart and operation mode of the nine-people work team project.
(a)
Gantt chart
(b)
Task/mode assignmentResulting Gantt chart and operation mode of the ten-people work team project.
(a)
Gantt chart
(b)
Task/mode assignment


## 5. Conclusions

MRCPSP has been confirmed to be an NP-hard optimization problem. The MRCPSP is treated as a two-part problem comprising the mode assignment subproblem and the activity determination subproblem. Therefore, this study proposes a dual PSO scheme based on the standard PSO to efficiently solve the MRCPSP. In the proposed scheme, a random link topology was suggested to help avoid slow and premature convergence, and 4 random links yield the best results. Meanwhile, the suggested dual PSO scheme also involves the LTRU and MSLK heuristics to generate good initial particle positions. Moreover, the best heuristics rate (HR) 20% is verified. The performance comparisons between different algorithms are demonstrated in Tables4 and 5. Table 4 shows that the proposed scheme yields minimum Dev. BKS (0.96%) and minimum Incr. CP (13.45%), and maximum percentage of the best known solutions can be found (73.30%) for the J30 case. Meanwhile, minimum Dev. BKS for J10 to J20 (0.01%, 0.07%, 0.15%, 0.15%, 0.34%, and 0.35%) is provided as listed in Table 5. Accordingly, the experimental results demonstrated that the proposed scheme for solving MRCPSP outperforms other schemes in the literature. A real-world MDPSP was successfully solved; the optimal operation mode for each task is provided and the minimum completion time of the project can be obtained as indicated in Figures 3, 4, and 5. These resulting outcomes offer important information to project managers to make adjustment on the project.



---

*Source: 519414-2014-05-06.xml*