What-if delay and recovery engine for a live P6 schedule
Which delay would hurt the finish date most, and what is the best way to win the time back? A Python engine answers both questions for every driving activity, in seconds, and shows the answers in Power BI.
The problem
In a project review, the question is always the same: "If this activity slips, what happens to the finish date, and how do we recover?"
Answering it in P6 by hand is slow. One what-if scenario means copying the project, adding the delay, rescheduling and comparing against the baseline. That takes 15 to 20 minutes. Testing 5, 10, 20 and 40 days on 20 driving activities is 80 scenarios, which is several days of work.
Recovery is worse. It takes hours, so planners often go with the first option that looks good instead of the one that recovers the most time.
Approach
- Read the schedule straight from the XER. Activities, logic, lags, calendars and constraints come from the P6 export, with no manual copying.
- Run CPM independently and check it against P6. The engine calculates its own early and late dates and float, and its results are compared with P6 before anything is trusted.
- Pre-compute every delay. For each driving activity, delays from 0 to 60 days are scheduled in full, so the effect on milestones and the finish date is ready before anyone asks.
- Test every recovery option. The recovery engine finds the driving path, tries each option (overlap, shorter duration, reduced lag) with a full reschedule, and builds the best step-by-step recovery plan.
What was built
Two Python engines feed three Power BI pages:
- Delay Simulator: pick an activity, move the slider, and see the finish date, milestones and float change.
- Delay Scenarios: saved multi-delay scenarios compared with the baseline, including liquidated damages exposure.
- Recovery Options: the recovery actions ranked by days recovered, and the combined plan that brings the date back.
The monthly routine is three steps: export the XER, run two commands, refresh Power BI.
Walkthrough
Demo data. The recovery figures in the animation are illustrative.
Result
The review meeting moves from "what happened?" to "this is why the date moved, and this is the fastest way to recover it."