2.1. Problem Description and Mathematical Model
This section describes the proposed stochastic multi-mode resource-constrained project scheduling problem, shows its complexity, and introduces the mathematical formulation to represent it.
The multi-mode resource-constrained project scheduling problem (MRCPSP) can be formally defined as the set
of project activities to be scheduled. These activities are labeled as
, where activity 0 is a dummy “start” activity, activities 1 to
I are the real project activities, and activity
is a dummy “finish” activity. The set
contains the relationships of precedence between pairs of project activities, defined as the arcs
, where
i is an immediate predecessor of
j. All of the immediate predecessors of any activity must be finished before such an activity may start. Each project activity has an activity number that is greater than those of all its predecessors, making the set
topologically ordered.
Figure 1 shows an example project involving four real activities (and the corresponding dummy activities), represented as a network diagram where the nodes represent project activities and the arrows represent relationships of precedence, which are given by
.
The execution of each activity requires a certain amount of resources, either non-renewable, renewable, or both. Non-renewable resources can be of
types, belonging to the set
, and labeled as
, while renewable resources can be of
types, belonging to the set
, and labeled as
. There is a limited availability of each type of non-renewable resource for the whole project given by the parameter
, and a limited availability of each type of renewable resource for each time period (being refilled at the beginning of the next period) given by the parameter
. There is a set
with
M different execution modes for the activities, labeled as
m = 1, …,
M, which determine the resource consumption and the duration of each activity. The amount that activity
i executed in mode
m requires of each type of non-renewable resource
is given by the parameter
, and the amount that activity
i executed in mode
m requires of each type of renewable resource
r per time period
t is given by the parameter
. The duration of activity
i executed in mode
m is given by the parameter
. Both dummy activities require no amount of resources of any type, and the duration of both is 0 time units. The parameter
provides a lower bound for the finish time of activity
i (earliest finish), and the parameter
provides an upper bound for its finish time (latest finish) [
21].
The main difference between the proposed stochastic MRCPSP and its deterministic version is that the duration of the project activities implies uncertainty. Thus, the parameter (duration of activity i in mode m), instead of being deterministic, is redefined as a stochastic parameter whose value is given by a discrete random variable with K possible realizations, each one with an associated probability of occurrence. The value of K is the same for all activities, and the values of are considered to be independent for each activity i and each mode m, resulting in independent values of , meaning that for an instance with I activities and M modes, there are possible scenarios, one for each different combination of values of .
The objective of the problem is to select the execution mode m of all activities i to minimize the expected value of the total project duration over all evaluated scenarios S. This can be obtained by scheduling the activities for each evaluated scenario , considering their durations and precedence relationships. This solution represents a baseline schedule. The decision variable takes a value of 1 if activity i is executed in mode m, and finishes at time period t in the scenario s, and a value of 0 otherwise; the parameter , duration of activity i in mode m in scenario s replaces the parameter from the deterministic version of the problem; and an auxiliary binary variable with a value of 1 if the activity i is executed in mode m, and a value of 0 otherwise is also added to the model.
The trade-off between the duration and the resource requirement of the activities makes this problem a complex one. The decision to execute an activity in its mode with the shortest duration may result in a longer duration of the complete project, since that activity would require more resources, which would leave fewer resources available for other activities, resulting in the need for delaying them or executing them in a mode with a longer duration.
The sets, parameters, and variables required for the mathematical formulation of the proposed stochastic MRCPSP with uncertain activity duration are the following:
Sets:
: project activities .
: execution modes .
: time periods .
: relationships of precedence (). Set of arcs (), meaning activity i is an immediate predecessor of activity j.
: types of renewable resources: .
: types of non-renewable resources: .
: probabilistic scenarios.
Parameters:
: earliest possible finish time of activity i.
: latest possible finish time of activity i.
: renewable resources availability.
: non-renewable resources availability.
: duration of activity i executed in mode m in scenario s.
: amount of renewable resource r required by activity i executed in mode m for each period of time t (this amount is the same for each period of time).
: amount of nonrenewable resource required by activity i executed in mode m.
: probability of scenario s.
Variables:
: binary decision variable that takes a value of 1 if activity i is executed in mode m and finishes at time t in scenario s, and a value of 0 otherwise.
: auxiliary binary variable that takes a value of 1 if activity i is executed in mode m, and a value of 0 otherwise.
The mathematical formulation for the proposed stochastic MRCPSP with uncertain activity duration (based on the deterministic formulation in [
8]) is the following:
The objective function (
1) aims to minimize the expected value for all evaluated scenarios of the completion time of a “finish” dummy activity
I+1, and therefore, the expected total project duration. Constraints set (
2) guarantee that, for each scenario, all the activities are scheduled considering an execution mode and are assigned a finish time between their
and
times. Constraints (
3) and (
4) ensure that each activity is executed in only one mode, and that the mode chosen for each activity is the same for each scenario. Constraints (
5) establish that, for each activity
j, it must start after its immediate predecessors’
i is finished. Constraints (
6) make sure that the sum of renewable resources
r being consumed at each time
t does not exceed availability
. Constraints (
7) ensure that, for each non-renewable resource
, its total consumption must not exceed their respective availability
.
The mathematical complexity of this proposed stochastic MRCPSP with uncertain activity duration is greater than that of the deterministic version, since the inclusion of the scenarios significantly increases the number of possible schedules. Specifically, in the deterministic version, there are possible different solutions, one for each combination of modes m assigned to activities i. In the case of the proposed stochastic formulation of the problem, the number of possible solutions is multiplied times the number of scenarios to evaluate, since there are possible scenarios. If all of them were evaluated, there would be possible schedules.
2.3. Computational Tests
In this section, the computational resources used for the experimentation are mentioned, then the generation of the test instances is described, then the method used to calibrate the parameters of the algorithm is explained, and finally, the different experiments performed are described.
2.3.1. Computational Resources
A computer with 16GB of RAM, an Intel core i7 processor, and a 2.9 GHz CPU was used to carry out the computational tests. To code the MS-ILS algorithm, Visual C++ 2019 was used as a programming language and Visual Studio 16.3.6 as a compiler. The mathematical models of the deterministic and stochastic versions of the MRCPSP were coded using the AMPL modeling language. The solver Gurobi was used for experiments involving solving instances with an exact method. The statistical analysis software Minitab 2019 was used to perform the required statistical analyses.
2.3.2. Test Instances
Given the lack of available libraries of benchmark instances for the proposed stochastic MRCPSP, the necessary instances for these experiments were generated during this research. We adapted benchmark instances of the deterministic MRCPSP from the MMLIB50 library [
59] and the J10MM, J20MM, and J30MM datasets from the PSPLIB library [
60]. In this case, instances up to 50 activities were selected, because given the nature of the algorithm, they will present a computational complexity that compromises the performance of our computational equipment, particularly considering that as the number of scenarios increases, the number of iterations to execute will exponentially increase.
For these instances, the original (deterministic) parameter
(duration of activity
i in mode
m) was modified into a stochastic parameter
that follows a discrete triangular distribution with
K possible realizations, each one with an associated probability
of occurrence. This distribution has been considered since it has been widely implemented for modeling the duration time for these types of activities (as mentioned in
Section 1.1). A value of
for all activities and the density function displayed in
Table 4 were used to create the test instances.
According to this discrete triangular distribution, the duration of each activity can take three possible values in each mode; the most likely one, with a probability of 0.50, is the value of the original parameter from the deterministic version. It can also take two other values: the value of the original parameter from the deterministic version plus 1 unit of time and the value of the original parameter from the deterministic version minus 1 unit of time, each with a probability of 0.25. In the case for when the value from the original deterministic version was 1, the value of the original deterministic version minus 1 unit would be 0; however, since the duration of an activity cannot be 0, in that case, it will take a value of 1. The reasoning behind selecting these lower and upper values lies in the fact that in the original instances, the values for are small. Therefore, a deviation of unit could represent relative variations up to 33% with respect to the most likely value. It is worth mentioning that all of the instances from the mentioned public libraries use only discrete values for .
The values of k are considered to be independent for each activity i and mode m, meaning that for an instance with I activities and M modes, there are possible scenarios. For example, given the proposed value of , an instance with 10 activities and 3 modes has possible scenarios. Given this large amount of possible scenarios, even for small instances, samples of scenarios were created for the test instances.
To create a sample of a certain number of scenarios for each stochastic instance, a Monte Carlo simulation procedure was carried out, generating random numbers to determine the different values of according to the described probability distribution. Once each particular scenario s is generated with a realization for each variable , with the Monte Carlo procedure, the duration of each activity in each mode for that particular scenario is denoted as . When solving an instance for a certain number of scenarios, all scenarios were considered to have the same probability of occurrence.
2.3.3. Parameter Tuning
To calibrate the number of restarts
Rs and the number of iterations
It of the metaheuristic algorithm to use in the experiments for the proposed stochastic MRCPSP, a pre-experiment was carried out. Twenty instances with 30 activities from the J30MM dataset of the PSPLIB library, and 20 instances with 50 activities from the MMLIB50 library were adapted to generate their stochastic versions with 20 scenarios according to the procedure described in
Section 2.3.2. They were solved with the proposed MS-ILS algorithm with two different configurations: 50 iterations and 3 restarts, and 100 iterations and 10 restarts. The objective function value
O.F. of the best solution found, and the computational execution time
ExecTime in seconds was obtained. The results of this pre-experiment are shown in
Table 5 and
Table 6, where
Diff. O.F is the difference in the value of the objective function obtained with the two different configurations, and
Diff ExecTime is the difference in the computational execution time in seconds obtained with the two different configurations.
As can be seen in
Table 5 and
Table 6, increasing the number of iterations from 50 to 100 and the number of restarts from 3 to 10 does not result in a significant difference in the value of the objective function, and thus, the quality of the solution obtained. In the case of instances with 30 activities, an average reduction of 0.5% was observed, and in the case of the instances with 50 activities, the reduction was 0.6%. On the other hand, the impact of the change in the parameters in the computational execution time is considerable. The time to solve instances with 30 activities increased to 498.2%, and the time to solve instances with 50 activities increased to 529.8%.
These results show that 50 iterations and 3 restarts are enough to obtain good quality solutions in a reasonable period of time. Increasing the values of those parameters does not result in significantly better solutions, and results in a considerable increase in the required computing time, which is a disadvantage when solving larger instances with several scenarios. On the other hand, reducing the values of the parameters was not deemed necessary, since the computing time is already short and the quality of the solutions could be reduced. Thus, 50 iterations and 3 restarts were the parameters chosen for the rest of the experiments of the stochastic version of the problem.
2.3.4. Computational Experiments
To test the proposed multi-start iterated local search metaheuristic method, and its capability to solve the proposed stochastic multi-mode resource-constrained project scheduling problem (MRCPSP), several computational experiments were carried out once the parameters of the MS-ILS algorithm were defined.
Experiment 1. This experiment was conducted to evaluate if the proposed method to generate scenarios provides 20 scenarios that are representative of the universe of all possible scenarios. One instance with 20 activities from the J20MM dataset of the PSPLIB library was adapted to generate its stochastic version according to the procedure described in
Section 2.3.2. Ten different sets of 20 scenarios were created and solved with the MS-ILS metaheuristic method, and the objective function values obtained for each set were compared.
Experiment 2. A stochasticity test was carried out to assess if solving the stochastic problem becomes relevant, compared with solving it only for the average scenario as a deterministic problem (which would be faster). A commonly accepted approach to evaluate the benefits of employing a two-stage stochastic programming model, instead of employing an equivalent deterministic version, consists of optimizing a deterministic model that assumes only a single scenario at the second stage (e.g., the average scenario), and then evaluating the latter solution with the two-stage stochastic model. This comparison allows for determining the benefits lost (cost increment) of discarding all stochastic information of the problem [
63,
64]. In this paper, the deterministic version consists of considering a single scenario at the second stage, which assumes the average values of processing times for each activity and at each operation mode. Then, this solution is evaluated with the stochastic version.
One instance with 20 activities from the J20MM dataset of the PSPLIB library was adapted to generate its stochastic version according to the procedure described in
Section 2.3.2. Ten different sets of 20 scenarios were created and solved as stochastic problems with the MS-ILS metaheuristic method (part A). The average scenario for each of the 20 sets was also solved as a deterministic problem (part B). Then, for each set, the solution (selection of activity modes) obtained by solving the deterministic average scenario (part B) was evaluated in the 20 scenarios, and the resulting objective function value was compared with the one obtained by solving the stochastic case for the 20 scenarios (part A).
Experiment 3. To test the performance of the proposed MS-ILS metaheuristic method to solve the proposed stochastic MRCPSP, 5 instances with 10 activities and 5 instances with 20 activities from the J10MM and the J20MM datasets of the PSPLIB library were randomly selected and adapted according to the procedure described in
Section 2.3.2, with 20 scenarios generated for each one. Each instance was solved using the proposed metaheuristic method and also with an exact linear programming method (LP) using Gurobi as the solver and AMPL as a programming language. The value of the objective function
and the computational execution time
were obtained and compared. A time limit of 5400 s was set for the exact method and once reached, the solver would stop and provide the best feasible solution found, if any, in that amount of time. A comparison with other proposed methods for solving stochastic versions of the MRCPSP was not feasible, since every author proposed different versions of the problem, with different stochastic parameters, different probability distributions and different project objectives. However, our method was compared with several other methods in Ramos et al. [
8] for solving the standard deterministic version of the problem, showing good results, especially for larger instances.
Experiment 4. To evaluate whether creating more than 100 scenarios for each instance is convenient, 5 instances with 10 activities, 5 instances with 20 activities, and 5 instances with 30 activities from the J10MM, J20MM, and J30MM datasets of the PSPLIB library were selected and adapted according to the procedure described in
Section 2.3.2. Each one was solved for 100 scenarios, 500 scenarios, and 1000 scenarios, and the differences in the values of the objective function
and in the computational execution time
were recorded. Then, for each instance, the solution (selection of activity modes) obtained by solving for the 100 scenarios was evaluated in the 500 scenarios and in the 1000 scenarios, and the resulting objective function values were compared with the ones obtained by solving for the 500 scenarios and 1000 scenarios.
The results of all these experiments are presented in
Section 3.