Stochastic Scheduling

Stochastic Scheduling

There are two approaches for project planning and scheduling: Deterministic and Stochastic. Each has advantages and downsides. Stochastic scheduling gives much more accurate prediction but requires specific tools and knowledge. Deterministic planning is significantly simpler but unable to predict project outcomes accurately.

Let’s review the following case:
Project SMEs provided the duration of project activities considering uncertainties (3-point estimation: Optimistic, Expected, and Pessimistic) and activity logic. PERT estimations are calculated.

Deterministic Planning

Most projects would only collect single expected estimations and calculate the schedule based on this information. As you will see below, such a schedule is highly inaccurate and likely to drive wrong project decisions.

Flaw of Averages

The Flaw of Averages states that a plan based on the assumption that average conditions will occur is wrong on average.

In this case, if the deterministic Critical Path Method (CPM) is applied, we can find that all activities except Activity E belong to the Critical Path. Expected project duration is 14 days.

Expected Schedule: 14 days
Critical Paths: ABCDFGHI

PERT Schedule

An alternative approach would be to collect activity duration uncertainties and calculate a weighted deterministic schedule. PERT requires that each activity is estimated with three perspectives: Optimistic, Expected, and Pessimistic. PERT durations are calculated considering these parameters: (Opt+4*Exp + Pes) / 6

PERT Schedule: 16 days
Critical Paths: ADH

PERT analysis suggests that two additional days are needed.

Optimistic and Pessimistic Schedules

Additional data also allows us to calculate two extremes: the best and worst scenarios.

Optimistic Schedule: 9 days
Critical Paths: ABDEFHI

Pessimistic schedule: 27 days
Critical Paths: BEH

Four perspectives gave us knowledge about possibilities:

  • Overall duration varies between 9 and 27 days. The expected delivery duration is 14 days, but considering the weighting (PERT), it is 16 days;
  • The project has a substantial difference between the weighted and the worst-case durations (11 days or 69%);
  • Project critical path has high volatility. For example, activity A belongs to the critical path in optimistic and pessimistic scenarios but not in expected scenarios;
  • Expected and PERT scenarios have different critical paths;
  • Non-critical activities have a small Total Float.

Additionally, in each scenario, I have calculated Activity Drags to identify activities where optimisation is possible. Each scenario has different activities with positive Activity Drag! How can we decide which activities are the best candidates for acceleration when activity Drag is unstable? I will cover this in a separate post. Here, I want to note that Activity Drags have volatility that matters.

Stochastic Scheduling

An advanced approach would be calculating a probabilistic delivery plan based on the Monte Carlo Simulation (MCS) method. It allows us to calculate the Criticality Index (CI).

Criticality Index

The Criticality Index is defined as the ratio of the number of times a particular activity is on a critical path to the total number of instances, which for that activity corresponds to the probability to be critical.

The criticality index shows that:

  • Any activity in this scheduling fragment has a chance to be critical.
  • Activities are likely to be critical in this order:

The CI gives a much better understanding of how uncertainties impact the delivery model, but it is essential to remember that absolute numbers don’t mean much. There are reasons why CI may be different for the same model:

  • Random nature of the MCS method;
    Each simulation attempt produces a different result. This could be mitigated by the increased number of iterations, but it negatively impacts simulation time.
  • Applied distribution curves;
    The lack of historical data requires subjective decisions about the appropriate distribution curves.
  • Different Implementation of distribution curves in risk simulation tools.
    For example, Triangle distributions are based on a strict formula, but Beta distributions depend on their implementation in a particular risk simulation tool.

Changes in activity distribution curves may impact the CI. Calculation of the same model based on different distribution curves give the following result:

For effective decisions, we need a sense of criticality, not absolute numbers. In any case, it is significantly more accurate than the CPM predictions.

Expected Project Duration

The Monte Carlo Simulation analysis can be used to calculate the probability of project duration.

Conditions: Beta distribution

The probability of finishing the project in 14 days (expected estimations) is less than 5%, and the chance of finishing the project in 16 days (PERT estimations) is less than 40%.

  • 50%: 17 days
  • 80%: 18 days

The same model simulated based on Triangle or Log-normal distributions gives different probabilities.

Another aspect is a simulation of secondary uncertainties. In the “Monte Carlo Simulation Challenges. Simulating the true source of uncertainty” post, I demonstrated that the simulation of secondary factors (activity durations) instead of primary root causes might result in noticeably different probabilities.

As we can see, predictions based on CPM and PERT methods are highly inaccurate:

– An activity that doesn’t belong to the current critical path might contain more risks (more likely to be critical) than activity on the critical path;
– Project durations based on expected and PERT-weighted estimations have low probability. 

Manage Uncertainties

Accurate prediction is important, but the most significant advantage of stochastic scheduling is the ability to manage uncertainties and reduce overall duration and cost!

After the initial schedule analysis is completed, the next step would be to analyse uncertainties and identify:

  • Which of them CAN BE reduced?
  • Which of them SHOULD BE reduced?

In general, uncertainty can be manageable or not. Epistemic uncertainty arises from a lack of knowledge, but Aleatory arises from the inherent randomness of natural phenomena. So, we may gain the knowledge to reduce epistemic uncertainties only.

Activity duration uncertainty can be epistemic, aleatory or both.

As already mentioned, activity duration uncertainty results from the primary uncertainties (volume of work, resource productivity rate, resource calendars, etc.) Some of them can be epistemic, and some aleatory.

Epistemic uncertainties can be reduced, but for that, we need to gain knowledge, and it may not be free.

Before spending an effort (and money) to reduce uncertainties, we need to understand what effect such reductions have on project objectives.  

Summary

Stochastic scheduling is a powerful alternative to deterministic scheduling. It gives more accurate predictions and helps project teams reduce project duration and cost.

At the same time, developing a reliable delivery model that can be used for Stochastic scheduling is a complex task that requires a deep understanding of data modelling principles and reliable data modelling tools.

Alex Lyaschenko

PMO | Portfolio Planning & Delivery | PMP | P3O Practitioner | AgilePM Practitioner | Six Sigma

Critical path method challenge: Activity duration estimation

Critical path method challenge: Activity duration estimation

The critical path method includes several standard steps. While there are different recommendations in which order these steps need to be performed, it is a general acceptance that one step is important: the duration of each activity has to be accurately estimated.

The activity estimation is a process itself. The process could be very simple.

“Using past experience or the knowledge of an experienced team member, you must now estimate the time required to complete each activity.”
www.smartsheet.com/critical-path-method

or more complex:

“The duration is an estimate of how long it will take to accomplish the work involved in the activity. In many cases, the number of resources that are expected to be available to accomplish an activity, together with the productivity of those resources, may determine the activity’s duration. A change to driving resource allocated to the activity will have an effect on the duration, but this is not a simple “straight-line” relationship. Other factors influencing the duration are the type or skill level of the resources available to undertake the work, resource calendars, and the intrinsic nature of work. Some activities will take a set amount of time to complete regardless of the resource allocation.”
Practical Standard for Scheduling, PMI

How can an estimator/s accurately provide estimates for the duration of ONE activity? Is it actually possible?

Firstly, they need to understand the work represented by the activity in the schedule. Ideally, the Definition of Done (DoD) for each activity has to be developed, but it is rarely the case. Usually, estimators rely on activity and WBS names only.

Example: “Complete Design” could mean:

  • 1st draft available
  • Design reviewed
  • Design updated
  • Design submitted for review board
  • Design endorsed
  • Design fully approved

Then, estimators need to understand the level of uniqueness of this activity. It may vary from ‘exactly the same work was done before many times’ to ‘this work is completely new to us’.

Then, estimators need to think about matters that may impact the duration:

  • What is the Volume of work to be achieved?
  • Which skills are needed?
  • Which resources have these skills?
  • Could additional skilled resources be hired?
  • What is the minimum (technically) required number of resources?
  • What is the maximum (technically) possible number of assigned resources?
  • What productivity (volume units per hour) does each resource with the required skill have?
  • If more than one skill is required, which skill has the primary impact on the duration?
  • When could the activity be (technically) performed?
  • How may external work impact the availability of resources?
  • How may other project activities impact the availability of resources?
  • What type of materials are required?
  • How may materials supply impact the duration?
  • How may project’s environmental factors impact the duration?
  • How may external factors impact the duration?

Translating these questions to a scheduling language: there are project parameters that may impact activity duration. Some of these parameters could be well-known or they may have avoidable (epistemic) or unavoidable (aleatory) uncertainties (U). Also, some of these parameters are interrelated (I) with other activities.

  • Volume of work (U)
  • Skills (resource pool)
  • Renewable (Labour and Equipment) Resource Quantity (U, I)
  • Consumable (Materials) resources quantity (U, I)
  • Resource Productivity (U)
  • Activity Calendar (U)
  • Resources Calendars (U)
  • Resource availability (A)
  • Technical constraints (U)
  • Threats (I)
  • Opportunities (I)
  • Shift calendars (U)
  • Shift quantity (U)

It is usually easy to understand how each parameter impacts the activity duration but it is not easy to understand the cumulative effect. The human brain is simply not able to handle so many parameters simultaneously. If George A. Miller’s statement is correct#, our brains can handle only 7 (+/-2) objects simultaneously.

# The Magical Number Seven, Plus or Minus Two: Some Limits on our Capacity for Processing Information http://psychclassics.yorku.ca/Miller/

It is important to mention that not all activities have all mentioned above parameters, or a value could be obvious and even ignored:

  • Activities may not include any materials
  • Only one resource with standard working hours is required
  • An activity technically could be performed at any time.

There are different project techniques that could help with estimations:

  • Top-Down
  • Bottom-Up
  • Expert judgment
  • Comparative (or analogous)
  • Parametric model
  • Three-point

These techniques help to get accurate estimations but they have to be applied to primary parameters that impact durations, not directly to durations.

Example:

Our project received a new bulldozer. It differs from other bulldozers used in organisations, so we don’t have any statistical data to understand the productivity rate. Project decided to use comparative analysis (or Expert judgment) as a planned rate and calculate activity durations based on this rate. When they receive actuals, they can update the productivity rate and recalculate all future activities with the assigned of this bulldozer. Also, if the productivity rate is stored in Corporate Reference Book, they could update other projects where this bulldozer is planned or use the findings for future assignments.

If activity durations were collected instead, it would be very difficult to recalculate and update all related activities, as they would need to be done individually. Also, historical data is (almost) useless. While we know that actuals were different from planned durations, there is no data in the schedule that tells us “why”, and it is hard to reuse historical data for future projects.

Expert judgment

Expert judgment often is only available for project teams as an estimation technique.

Unfortunately, expert judgment is not a reliable method. Daniel Kahneman in his book “Thinking Fast And Slow” explained that when people need to find a solution to very complex problems, they are likely to use a “fast thinking system” that could give them quick but not necessarily accurate answers. What is even worse, the answers are inaccurate and inconsistent. If the same expert provides activity estimations in a week, it is likely that his estimations would not be the same. Different cognitive biases may impact their opinion. In some cases, provided estimations are going to be very conservative. In other situations, they will be too optimistic.

What is the alternative

Stop asking estimators to provide most likely activity durations and ask them to provide parameters that impact this duration instead.

If a parameter has an uncertainty, usually it is much easier to provide a range or 3 points (optimistic, probable, pessimistic) rather than a single number.

Then all available data could be used to calculate the optimistic, probable, pessimistic and planned durations!

This approach has some advantages:

  • Easier identification of why an activity wasn’t performed as planned
  • Collected actuals could be used for planning for future activities even if the activities are not exactly the same:

    * Activity requires the same skill but has a different volume of work.

    * Activity has the same volume of work and skills but will be performed by different resources.

    • Some of the activity parameters are applicable to many activities, so once collected the data could be used for many activities
    • While a project may have thousands of activities, it doesn’t require thousands of skills. Even a project-driven portfolio has a small and stable list of required skills.
    • Easier identification of project and portfolio skills bottleneck
    • Each resource has a very limited number of skills. It could be beneficial to help critical resources gain a new appropriate skill or improve already existing skill
    • 3 points estimations could be used for more sophisticated probabilistic methods: Monte Carlo Simulation, ‘3 scenarios’, etc.
    • Result of the Monte Carlo Simulation depends on the simulation parameter. The result of the simulation is more accurate when primary uncertainties are used instead of the secondary parameters (like duration and cost)
    • Structured low-level data could be used for AI
    • It addresses some cognitive biases. Just a few to mention:

    * Optimism bias

    * Representativeness bias

    * Confirmation bias

    * Framing effect

    * Parkinson Law

    * Availability heuristic

    Alex Lyaschenko

    PMO | Portfolio Planning & Delivery | PMP | P3O Practitioner | AgilePM Practitioner | Six Sigma

    Resource vs activity calendars issue

    Resource vs activity calendars issue

    Correct application of the Critical Path Method requires consideration of ALL constraints. A calendar is a ‘type of constraint’ that defines when work can and cannot be performed.

    There are two main calendar types Activity Calendar and Resource Calendar.

    Activity Calendar

    Activity Calendar defines when work technically could be performed.

    • A low noise restriction
    • Production Freeze period 
    • SteerCo calendar

    Resource Calendar

    Resource calendar defines the availability of the assigned resource.

    Part-time specialist is available 9 am – 5 pm Monday – Wednesday.

      Work could be completed when both conditions are met.

      Let’s review a simple example with one activity and one resource only:

        If a two-day activity could only be performed on weekends (Saturday & Sunday) and the assigned resource only works Fridays & Saturdays, this activity only could be performed on Saturdays. The required effort is two days, activity duration is eight days (Saturday – Saturday).

          Not all scheduling tools can simulate scenarios with different activity and resource calendars correctly.

            Microsoft Project

            Microsoft Project correctly calculates the duration, start and finish dates (Saturday to Saturday). However, in the activity Gantt chart, it is unclear on which days the work is planned (only by Saturdays, not Sunday to Friday).

              Spider Project

              Spider Project correctly calculates duration, Start and Finish dates (Saturday to Saturday). Additionally, detailed scheduling in the activity Gannt chart shows exact dates (if needed, time as well) when the task is planned to be executed (Saturday + Saturday).

                Primavera

                Primavera also allows having activities and resource calendars. However, it is impossible to calculate the schedule with both calendars simultaneously.
                If the activity type is specified as “Task Dependent”, the schedule incorrectly shows that the activity could be performed on Sunday and Saturday:

                  If the Activity type is specified as “Resource Dependent”, the schedule incorrectly shows that the activity could be performed on Saturday and Friday.

                    Regardless of the Primavera setting, Duration, Start and Finish Dates will be incorrect.

                    In CA Clarity and Project on the Web also would not be able to simulate work for this mini-project correctly. These tools only support Resource Calendars, not activity calendars.

                    Apart from Activity and Resource Calendars project plan may require other calendar types:

                    • Project Calendar
                    • Team Calendar
                    • Shift Calendar
                    • Activity Lag Calendar

                     

                    Alex Lyaschenko

                    PMO | Portfolio Planning & Delivery | PMP | P3O Practitioner | AgilePM Practitioner | Six Sigma

                    Monte Carlo Simulation challenges. Level of details challenge.

                    Monte Carlo Simulation challenges. Level of details challenge.

                    As discussed in the previous posts, applying the Monte Carlo Simulation (MCS) CORRECTLY for a large project may take many hours. As a workaround, some risk consultants recommend running simulations based on a high-level schedule, known as a control schedule and a ‘Level 3’ schedule.

                    The results of MCS performed based on the detailed schedule and high-level schedule are likely to be different, sometimes significantly different! There are a few reasons for that. In this post, we review one of them: the missing level of complexity.

                    Work packages are the smallest unit of work that a project can be broken down into when creating your Work Breakdown Structure.

                    In this post, the term ‘Work package’ (WP) represents ‘A group of activities’. It could be the smallest unit of work or a group of units.

                    When WP in a high-level schedule is represented by a single activity (or a few activities), the schedule misses a level of complexity of each WP. Without this information, the result of the simulation could be dramatically different.

                    Let’s review a simple example: A project has two WPs. Each of them has five 10-day activities, but in 1st WP all activities are consecutive, and in 2nd WP, all activities are concurrent.

                    If we decide to create a high-level schedule, we could simplify it to two linked ‘50 days’ and ‘10 days’ activities. The overall duration of both schedules and the logic between WPs will be the same.

                    Let’s assume each activity in our project has +/-2 days of uncertainty, which is +/-20%.

                    Detailed schedule with uncertainties:

                    High-Level schedule with uncertainties:

                    Now, we can calculate the probability of delivering this project in 60 days (the deterministic Most Likely scenario) and use both schedules as the base for the simulation. 

                    We are going to use a triangular distribution. As explained in the previous posts, the Beta / PERT distributions often better represent real-life probability, but they are unique to each risk analysis tool. I want to be sure that this experiment can be replicated with other risk analysis tools.

                    Also, due to the randomised nature of the Monte Carlo Simulation method, the result of any new simulation is always different. The more iterations performed, the less volatile results will be. I set the Spider Project to 50,000 iterations to minimise the volatility.

                    Project Probability Distribution

                    The performed simulation based on the High-Level schedule gives us the following probability distribution:

                    The performed simulation based on the Detail schedule gives us a different result:

                    There is 49.8% probability that this project could be completed in 60 days if the High-level schedule was used for this analysis and 29.2% probability if it was performed based on the Detail schedule.

                    However, project activities in both cases are going to be executed the same way, and the probability  should be the same. To understand such an anomaly, we need to go to the next level and analyse the probability of each WP separately.

                    1st WP probability distribution

                    The probability distribution of the first WP based on High-Level schedule:

                    The probability distribution of the first WP based on Detailed schedule:

                    Uncertainties in a sequence with ‘Finish-to-Start’ dependencies compensate for each other, so the result of the First WP simulation is roughly the same, regardless of the applied schedule. It is around 50%.

                    2nd WP probability distribution

                    As the second WP has only concurrent activities, the probability distribution curves are dramatically different.

                    Based on the Detailed schedule it is only ~3% chance that ALL activities could be completed in 10 days. If any activity is late (>10 days), the WP will be late.

                    In the High-level schedule, this level of complexity is lost, and the probability complete the WP in 10 days is 50%.

                    Probability distribution of the second WP based on the High-level schedule:  

                    Probability distribution of the second WP based on the Detailed schedule

                    There is a big difference between 3% and 50%! Depending on which result is presented to project decision-makers, it may lead to different actions.

                    Level of complexity

                    The analysed example above may look extraordinary. Not all projects have five linked concurrent activities. However, if we analyse any schedule, we are likely to find that there are days with more than five planned activities. All these activities are logically linked via direct or indirect logic. If these activities have large Total Floats, the effect of uncertainties should be immaterial. However, if they are on a project critical path or near a critical path, the effect will likely be noticeable.

                    Without Quantitative Risk Analysis (QRA), it may not be possible to understand the effect of uncertainties on project delivery dates.

                    Logic in real-life schedules is much more complex. WPs have other than ‘Finish-to-Start’ types of dependencies, technical and resource constraints, activity and resource calendars, lags and leads. These factors impact the level of complexity of each WP.

                    Also, logic between WPs is more complex than just a ‘Finish-to-Start’ dependency between the last activity in one WP and the first activity in another WP. On top of this, there could be more than one dependency between WPs, and these dependencies could be somewhere inside each WP, not between the end and start points:

                    Example of complex logic between WPs

                    The volatility of Critical Path

                    Another challenge is to demonstrate a Critical Path in a high-level schedule. A WP may or may not be on a critical path. If it is, it doesn’t mean that all activities in the WP are critical. The critical activities in the WP could be somewhere inside of WP. There also could be many critical fragments.

                    A scheduler may summarise critical and not critical activities in a high-level schedule. Unfortunately, there is no guarantee that the critical path is going to be stable during the life of the project. The volatility of the critical path means that a high-level schedule has to be constantly redeveloped.

                    Detailed Schedule

                    The described challenge is relevant to detailed schedules, not just to Control schedules.

                    There are no commonly accepted rules that define the correct level of detail for each schedule. While there are some recommendations, practically the level of detail depends on portfolio standards, the experience of the master schedule, the capacity of the scheduling team, applied schedule and risk analysis tools, and some other factors.

                    Two schedules developed for the same project by two different project teams are unlikely to be identical. The difference may look immaterial but may have a significant impact to the results of Monte Carlo Simulation.

                    Schedule duration paradox

                    The probability of delivering this project based on the ‘Most Likely’ durations is only 29%. This example demonstrates ‘Schedule duration paradox’:

                    Schedule based on the most likely activity durations doesn’t have the most likely duration

                    This is one of the factors why projects are late. When project SMEs provide the ‘Most Likely’ estimations for each schedule activity, and a scheduler uses them to develop a deterministic (Critical Path Method) schedule, project stakeholders often assume that such a schedule has ‘most likely’ delivery dates. Calculated dates are used as project commitments. However, due to the complexity of logic and parallel streams, the probability of meeting these commitments is likely to be less than 50%. Sometimes significantly less.

                    Monte Carlo Simulation is one of the Quantitative Risk Analysis (QRA) methods that help to calculate achievable dates, but it has to be applied correctly. A high-level schedule doesn’t have the same level of complexity as it is in a detailed schedule. It impacts the project probabilities calculated based on the Monte Carlo Simulation method. The difference could be sufficient to drive the project in the wrong direction.

                    There are many other important MCS challenges. I will continue “unwrapping” them one by one in my future posts.

                    Alex Lyaschenko

                    PMO | Portfolio Planning & Delivery | PMP | P3O Practitioner | AgilePM Practitioner | Six Sigma

                    Risk Matrix: good or bad?

                    Risk Matrix: good or bad?

                    Some project risk practitioners argue that Project Risk Matrices cannot be trusted to produce consistent and correct risk ratings and rankings, and their application has to be minimised or even avoided.

                    However, often with the unique nature of projects, reliable risk rating and ranking are not possible regardless of applied methods and techniques.

                    Proposed alternatives may be able to address some issues associated with Risk Matrices, but not all of them and have other issues that Risk Matrices don’t have!

                    Arguing that the Risk Matrix technique is wrong would be similar to saying that a hammer is not a good tool because it may be inappropriately used instead of a screwdriver.

                    Risk Matrix is just one of the tools in a project management toolbox. There are situations when it is the most appropriate tool to use, situations when another risk management tool is preferable and situations when a Risk Matrix with another risk tool gives the best result.

                    It is essential to learn the weak points of this risk evaluation method, as some issues could be mitigated when applied smartly.

                    Alex Lyaschenko

                    PMO | Portfolio Planning & Delivery | PMP | P3O Practitioner | AgilePM Practitioner | Six Sigma