2017 2nd International Conference on Computer Science and Technology (CST 2017) ISBN: 978-1-60595-461-5
An Integrated Simulation-Genetic Algorithm for the Stochastic
Multi-Mode Resource Constrained Project Scheduling Problem
Yan LI
1,a*1College of Engineering, Shanghai Polytechnic University, Shanghai, 201209, China
*Corresponding author
Keywords: Resource-constrained project scheduling, Multi-mode; Stochastic activity duration, Genetic algorithm, Simulation.
Abstract. This paper presents a simulation-genetic algorithm for the stochastic multi-mode resource-constrained project scheduling problem (SMRCPSP), in which multiple execution modes are available for each of the activities with random durations. A genetic algorithm combined with nonrenewable resource feasibility checking and topological sort procedure to find a near optimal sequence of tasks to be performed. Simulation is employed to evaluate the performance (makespan) of the sequence under stochastic duration conditions. Computational results for the SMRCPSP reveal that the proposed algorithm is effective in solving the problem.
Introduction
The basic type of the resource-constrained project scheduling problem (RCPSP) is to find a precedence- and resource-feasible schedule that minimizes the makespan of a project. The multi-mode problem (MRCPSP) is a generalized version of the RCPSP, where each activity can be performed in one out of a set of modes, with a specific activity duration and resource requirements. In the real-world scheduling environment, the exact task duration is often unknown at the point when the scheduling decision is made, giving rise to the stochastic RCPSP (SRCPSP). Similarly, the stochastic MRCPSP (or SMRCPSP) is the stochastic version of MRCPSP.
Various techniques have been proposed to solve MRCPSP. Nevertheless, [1] have shown that exact methods cannot solve problems with more than 20 tasks executed on three modes and highly resource-constrained. Hence, in practice, heuristic algorithms to generate near-optimal schedules for larger projects are of special interest. [2]Proposed a genetic algorithm based on a priority rule encoding. [3]Presents a genetic algorithm with a local search extension to improve the schedules found by the basic genetic algorithm. [4] developed an improved genetic algorithm for solving it and its effectiveness was verified by compared with the exact algorithm. Recently [5] splits the problem type into a mode assignment and a single mode project scheduling step. The mode assignment step is solved by satisfiability (SAT) problem solver and returns a feasible mode selection to the project scheduling step. The project scheduling step is solved using an efficient meta-heuristic procedure from literature to solve the resource-constrained project scheduling problem (RCPSP). To solve these problems, non-domination based genetic algorithm (NSGA-II) is employed to search for the non-dominated solutions considering total project time, cost, and resources moment deviation as three objectives.
describe the problem. Then a preprocessing method is introduced. The proposed algorithm and its elements are presented. The computational results are presented later. Finally, conclusions are given.
Problem Description
The Deterministic MRCPSP
The MRCPSP can be stated as follows. The project is represented as an
activity-on-the-node network ( , ), where is the set of activities and is the set of
pairs of activities between which a finish- start precedence relationship with a minimal
time lag of 0 exists. A set of activities, numbered from 1 to | | with a dummy start node
0 and a dummy end node | | + 1, is to be scheduled on a set of renewable and of
nonrenewable resource types. Each activity ∈ is performed in a mode , which is
chosen out of a set of | | different execution modes = {1, ⋯ , | |}. The duration of
activity , when executed in mode , is . Each mode requires renewable
resource units ( ∈ ). For each renewable resource ∈ , the availability is
constant throughout the project horizon. Activity , executed in mode , will also use
nonrenewable resource units ( ∈ ) of the total available nonrenewable resource
. A schedule is defined by a vector of activity start times and a vector denoting its corresponding execution modes . A schedule is said to be feasible if all precedence and renewable and nonrenewable resource constraints are satisfied. The objective of the MRCPSP is to minimize the makespan of the project. The MRCPSP can be conceptually formulated as follows[6]:
. (1)
s.t. + ≤ ∀( , ) ∈ (2)
≤
∈ ( ) ∀ ∈ , ∀ ∈ (3)
≤ | |
∀ ∈ , ∀ ∈ (4)
∈ ∀ ∈ (5)
= (6)
∈ (7)
Where ( ) denotes the set of activities in progress in period [ − 1, [, ∈ {1, ⋯ . The
objective function (1) minimizes the total makespan of the project. Constraint set (2) takes the finishstart precedence relations with a minimal time lag of zero into account. Constraints (3) and (4) take care of the renewable and nonrenewable resource limitations, respectively. Each activity has to be performed in exactly one mode (constraint (5)). Constraint (6) forces the project to start at time instance zero and constraint (7) ensures that the activity start times assume nonnegative integer values.
The Stochastic MRCPSP (SMRCPSP)
In the SMRCPSP, the duration of activity , , when executed in mode , is a
random variable; the random vector ( , , ⋯ , ) is denoted by . For the
activities = 0, we have [ = 0] = 1; for the remaining activities ∈ \{0, } we
assume that [ < 0] = 0 (where [ ] represents the probability of event ). The
A solution to the SMRCPSP is no longer a schedule but rather a scheduling policy (or strategy), which generates a schedule as time progresses and knowledge about the processing-time realizations unfolds. Fernandez et al. (1998)[7] view a policy as a dynamic decision process: it provides a decision rule that determines which activities are started at given decision times. These decision times are typically time 0 (the start of the project) and the completion times of activities. A decision at time can only use information that has become available before or at time ; this requirement is often referred to as the “non-anticipativity constraint”. A schedule is thus constructed gradually through time.
A realization of is written as ; we will use the terms realization, sample and scenario interchangeably throughout the text. Stork (2001)[8] proposes to view a policy
as a function: a policy Π is a function ↦ that maps given samples of activity
durations to feasible starting-time vectors (schedules) = Π( ) ∈ . For a given
scenario and policy Π, the value [Π( )] is the makespan of the resulting schedule
(where [·] represents the ( + 1)th component of the vector between square brackets,
since our indexing starts from 0). The project completion time [Π( )] is a random
value, and the objective for the SRCPSP is to select a policy Π∗ that minimizes
E[[Π( )] ] within a specific class, with E[∙] the expectation operator with respect to .
Preprocessing
Before the execution of the GA itself, the project data is adapted by preprocessing in order to reduce the search space. The reduction procedure has been introduced by [9]in order to accelerate a branch-and-bound algorithm for the MRCPSP. We briefly summarize the definitions and results: a mode is non-executable if its execution would violate the renewable or nonrenewable resource constraints in any schedule. A mode is called inefficient if its duration is not shorter and its resource requests are not less than those of another mode of the same activity. A nonrenewable resource is called redundant if the sum of the maximal requests of the activities for this resource does not exceed its availability. Clearly, redundant nonrenewable resources as well as non-executable and inefficient modes may be deleted from the project data without affecting the optimal makespan.
The project data is adapted as follows: first, all non-executable modes are deleted. Second, all redundant nonrenewable resources and, subsequently, all inefficient modes are removed. The second step is repeated until no redundant nonrenewable resources are left. The result of this modification is a reduction of the number of feasible as well as infeasible solutions, that is, a smaller search space.
Genetic Algorithm Approach
Schedules and Individuals
An individual is represented by a vector λ of priority values and a mode list μ. Each priority value in the vector λ is linked to an activity and based on these values, the sequence in which the activities will be scheduled is assigned. Next to the vector λ, each population element has also a mode execution list μ. This mode list μ assigns a mode
to each activity ( ∈ ) and determines if the schedule will be feasible with respect to
1 2 3 4 5 6 7 position: activity ID 3 7 1 6 4 5 2 vector λ: priority value 1 1 3 2 1 3 2 mode list μ: mode
Figure 1. Priority-base encoding.
How to produce encoding that can treat the precedence constraint efficiently is a critical step and conditions for all subsequent steps. Following [10] a priority-based encoding method is proposed to handle this difficulty, based on the concepts of a directed acyclic graph model. Recall that a gene contains two kinds of information: the locus, the position of a gene located within the structure of a chromosome, and the allele, the value taken by the gene. Thus there are two possible ways to represent an activity: using the locus and using the allele. Here the position is used to denote an activity ID, and the value is used to denote the priority associated with the activity, as shown in Figure 1.
The value of a gene is an integer exclusively within [1, ]. The larger the integer, the
higher the priority.
Let be the iteration index of the procedure, the set of all nodes, the set of all
direct successors of activities , [∙] the array for storing topological sorts, CUT [i] the
number of edges incident to node in the cut, and be the set of eligible nodes at step .
Initial Population
The genetic algorithm is started by building an initial population. First, the random key
λ is generated randomly. Second, for each activity , ∈ {1, … , | |}, an execution mode
is randomly selected. To preclude infeasible solutions in the initial population, a procedure checking nonrenewable resource feasibility is applied. The procedure
chooses an activity and for that activity, a different mode is chosen. If the ( )
remains the same or decreases, the mode for that activity is changed. This step is
repeated until the mode assignment is feasible ( ( ) = 0). Based on the random key λ
and the mode list μ, a schedule is constructed with the extended serial generation scheme.
Evaluation
Once the initial population has been generated, each of the schedules must be evaluated. Therefore, a fitness value is calculated for each individual. In the single-mode RCPSP, the fitness value normally equals the makespan of the project . It is a good measure for sequencing the different individuals according to their contribution to the objective of the problem. Therefore, we use the makespan as fitness value for the multi-mode RCPSP.
During each generation, chromosomes are evaluated using some measure of fitness. The following four major steps are included in the evaluation phase:
Step 1. Convert chromosomes to topological sorts. Step 2. Generate schedules from the topological sorts. Step 3. Calculate objective values for each schedule. Step 4. Convert objective values into fitness values
Figure 2. Evaluation steps.
Crossover
crossover operators. However, the so-called one-point crossover revealed the best results. In the one-point crossover, an integer number r is randomly selected. All data left from that point, both from the activity list and from the mode list, is copied from the father’s chromosome. Beyond the point, the data of the mother is copied.
Position-Based Crossover. The nature of the proposed encoding can be viewed as a type of permutation encoding. A number of recombination operators have been investigated for permutation representation. The position based crossover operator was adopted as shown in. Essentially, it takes some genes from one parent at random and ills vacuum positions with genes from the other parent by a left-to-right scan.
Simulations
Since the activity durations are randomly distributed, the overall project duration is also a random variable. Given a particular feasible sequence, we follow[11] to compute the expected project duration:
Step 1. Generate a feasible sequence by genetic algorithm.
Step 2. One activity duration for each activity is drawn randomly from one of the five distributions.
Step 3. Given the feasible sequence and the randomly generated activity durations, the project duration is calculated.
Figure 3. Description of the sampling algorithm.
In other words, the feasible sequence is determined using the expected durations, and then the average performance of the given sequence is determined.
Computational Experiment
The proposed algorithm is implemented in C++ on a DELL Optiplex 780 PC with XP SP3 V6.2, Intel® Core™ 2 Duo CPU E8400 @3.00GHz 2.99 GHz processors and 512 RAM.
The assumptions about stochastic task durations follow those in the literature [12, 13]). We test the algorithm on one set of PSPLIB [14] instances c15.mm with 18 tasks respectively. The size of 2755 and 1085 instances are generated but, for some instances, no feasible solution exists, therefore these instances are excluded from consideration. Hence, the solutions of PSPLib have 2728 instances with c15.mm data sets.
[image:5.612.127.489.598.714.2]We record results of CPUTime and MSP (computation time and makespan from PSPLib), myCPUTime, generations (GA algorithm experienced), myMakespan (results of determined MRCPSP by the proposed GA algorithm), ERNDMSP (results of SMRCPSP by random sequence) and ERNDGAMSP (results of SMRCPSP by the proposed GA algorithm).
Table 1. descriptive statistics of c15.mm makespan (rand Type =0:4, test Simulations = 100).
n mean sd median min max skew kurtosis se
CPUTime 2755 19.97 71.31 1 0.03 828.1 6.72 55.33 1.36
myCPUTime 2755 10.09 0.05 10.09 10.02 10.23 0.25 -0.88 0
generations 2755 64.94 3.98 65 54 77 0.32 0.05 0.08
MSP 2755 23.93 6.65 23 9 48 0.65 0.3 0.13
myMSP 2755 49.54 9.99 48 30 85 0.7 0.44 0.19
ERNDMSP 2728 43.15 13.35 40.86 11.7 124 0.98 1.67 0.26
Table 1 shows that since the stopping criteria is runtime no more than 10s or generation no more than 100, the average of myCPUTime is far more less than that of CPUTime for all the five distributions and for both data sets, which partially contributes to the increase of myMSP compared with MSP. The mean of ERNDGAMSP is 13.44% and 9.39% improved for the tow data sets respectively which show that the propose GA algorithm is effective.
Conclusions
In this paper, we present a genetic algorithm for the stochastic multi-mode resource-constrained project scheduling problem (SMRCPSP), in which multiple execution modes are available for each of the activities of the project. To solve the problem, we apply a hybrid genetic algorithm, which makes use of nonrenewable resource feasibility checking procedure, topological sort procedure and simulation method. We present detailed computational results for the MRCPSP, which reveal that our approach is effective in solving the problem.
Acknowledgements
This work was financially supported by Innovation Program of Shanghai Municipal
Education Commission (No. 13YS121) and Academic Development Program of
Shanghai Second Polytechnic University (Mechanical Engineering, No. XXKZD1603).
References
[1] Sprecher, A. and A. Drexl. Multi-mode resource-constrained project scheduling by a simple, general and powerful sequencing algorithm. European Journal of Operational Research, 1998. 107(2): 431-450.
[2] Ozdamar, L. A genetic algorithm approach to a general category project scheduling problem. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions on, 1999. 29(1): 44-59.
[3] Hartmann, S. Project scheduling with multiple modes: A genetic algorithm. Annals of Operations Research, 2001. 102(1): 111-135.
[4] Wuliang, P. and W. Chengen. A multi-mode resource-constrained discrete time–cost tradeoff problem and its genetic algorithm based solution. International Journal of Project Management, 2009. 27(6): 600-609.
[5] Coelho, J. and M. Vanhoucke. Multi-mode resource-constrained project scheduling using RCPSP and SAT solvers. European Journal of Operational Research, 2011. 213(1): 73-82.
[6] Peteghem, V.V. and M. Vanhoucke. A genetic algorithm for the preemptive and non-preemptive multi-mode resource-constrained project scheduling problem. European Journal of Operational Research, 2010. 201(2): 409-418.
[8] Stork, F.. Stochastic resource-constrained project scheduling. 2001.
[9] Sprecher, A., S. Hartmann, and A. Drexl. An exact algorithm for project scheduling with multiple modes. OR Spectrum, 1997. 19(3): 195-203.
[10] Gen, M. and R. Cheng. Genetic algorithms and engineering optimization. 2000: Wiley-interscience.
[11] Tsai, Y.-W. and D. D. Gemmill. Using tabu search to schedule activities of stochastic resource-constrained projects. European Journal of Operational Research, 1998. 111(1): 129-141.
[12] Stork, F.. Stochastic resource-constrained project scheduling. 2001, Technische Universit t Berlin, Universit tsbibliothek (Diss.-Stelle).
[13] Ballestín, F. and R. Leus. Resource-Constrained Project Scheduling for Timely Project Completion with Stochastic Activity Durations. Production and Operations Management, 2009. 18(4): 459-474.