Monte-Carlo simulations can be used in dynamic project scheduling to measure the sensitivity of project activities as described in “Schedule Risk Analysis: How to measure your baseline schedule’s sensitivity?” or to evaluate the accuracy of forecasting methods used in Earned Value Management (see “Predicting project performance: Evaluating the forecasting accuracy”). In this article, the underlying principle used during these simulations is briefly explained and illustrated on a small example. In the example, the baseline duration of an activity must be replaced by a number generated from a predefined distribution function. For more information on the use of distribution functions, see “Project risk: Statistical distributions or single point estimates?”. A simple simulation approach consisting of 8 special simulation scenarios is proposed in “Monte-Carlo simulations: Linking critical path schedules to project control”.
A Monte-Carlo simulation run generates a duration for each project activity given its predefined uncertainty profile, as follows:
-
Generate a random number from the interval [0,1[
-
Generate a number using a cumulative distribution function
-
Add the new number to the baseline schedule
Figure 1 displays the general three step approach of Monte-Carlo simulation as an illustration to replace the single point duration estimate of activity 2 by a randomly generated number drawn from a statistical distribution.
Step 1. Random number generation
A random number generator is a computerized device designed to generate a sequence of numbers that lack any pattern, i.e. appear random. The uses of computational algorithms to produce long sequences of apparently random results, which are in fact completely determined by a shorter initial value, known as a seed value, are called pseudorandom number generators. The use and quality of various pseudorandom number generators is a widely studied problem in the computer science literature and is outside the scope of this article.
In figure 1, this first step is represented by a Monte-Carlo wheel labeled with a number between 0 (inclusive) and 1 (exclusive) which enables the user to generate random numbers from that wheel with an equal probability. In Microsoft Excel, this random wheel function is called RAND() for which each turn on the wheel (F9 in MS Excel) provides the user with a number from the [0,1[ interval.
Step 2. Cumulative distribution function
The random number is used to generate the number from a predefined distribution. The left part in the second step of figure 1 displays a discrete distribution function with 4 possible values (4, 5, 6 or 7) and their corresponding probabilities. The cumulative distribution function on the right of figure 1 can be used to generate numbers from that distribution function by generating a sequence of random numbers between 0 and 1.
Suppose that the random number is equal to 0.73, then this will result in a generated number 6 from the probability distribution. Indeed, since 0.73 > 0.70 and 0.73 < 0.75, the number corresponds to the number 6 on the X axis. Multiple generations will lead to different random numbers on the Y-axis, but the generated numbers on the X axis will have a probability of being generated equal to the probability function of the figure. This simple example is illustrated in the “
MS Excel file: generating a number from a distribution”.
Step 3. Add the new number to the baseline schedule
The generated numbers will be used to replace the baseline duration with the newly generated value to simulate fictitious project progress, as described in “
Schedule Risk Analysis: How to measure your baseline schedule’s sensitivity?”. In doing so, the activities will experience a faster execution or a delay compared to their baseline duration, resulting in a shift of the successor activities and a decrease/increase in the total project duration. In the third step of figure 1, activity 2 experiences a delay resulting in an overall project delay.
Although this Monte-Carlo simulation approach is illustrated on the activity duration estimates, estimates of other project parameters can also be subject to variability. Consequently, this approach can also be repeated for other parameters than the activity duration, such as the activity cost, the time-lag between project activities (see “
Activity links: How to add precedence relations between activities?”) and many more.
?Figure 1. The Monte-Carlo simulation approach in project scheduling