Sub topic 3
Multiple critical paths and near-critical paths
This chapter assumes you can run a forward pass, a backward pass, and calculate total float. The code uses basic Python.
Multiple critical paths and near-critical paths
A network can have more than one path with zero float. Each one sets the project end date, so a delay on any of them delays the project. A near-critical path has small positive float, often 1 to 2 days. It can become critical after a small slip, so it adds schedule risk. A common error is treating the path with the most activities as critical. Path length in days decides it, not the activity count.
Dependency types, leads, and lags
Most links are finish-to-start: a successor starts after its predecessor finishes. A lag adds waiting time between linked tasks, such as 2 days for concrete to cure. A lead lets a successor start before its predecessor ends. Lags add to path length, so include them in the forward pass.
Shortening the schedule: crashing and fast-tracking
Crashing adds resources to a critical task to cut its duration, usually at extra cost. Fast-tracking runs dependent tasks in parallel, which raises rework risk. Compare the cost per day saved with that risk. Shorten only critical tasks, because cutting a task with float saves no time. Recheck the network after each change, since a new critical path can appear.
Uncertain durations and three-point estimates
PERT uses three estimates: optimistic, most likely, and pessimistic. The expected duration is (optimistic + 4 × most likely + pessimistic) / 6. For example, estimates of 2, 4, and 12 days give 5.0 days. Feed the expected values into the passes.
When resources break the critical path
The path math assumes unlimited resources. If one person must do two tasks at once, the real finish date lands later than the computed end. Check resource loading before you trust the end date.
Keeping the critical path current during execution
Update actual finish dates and remaining durations each reporting period, then rerun the passes. A task that finishes early or late can move the critical path to another chain. Track near-critical float too, since it shows where the next risk sits.
Computing the critical path in code
The script below computes float for each task and lists the critical and near-critical tasks.
def analyse(tasks):
es, ef = {}, {}
for t, (dur, preds) in tasks.items():
es[t] = max((ef[p] for p in preds), default=0)
ef[t] = es[t] + dur
end = max(ef.values())
succs = {t: [] for t in tasks}
for t, (dur, preds) in tasks.items():
for p in preds:
succs[p].append(t)
ls, lf = {}, {}
for t in reversed(list(tasks)):
lf[t] = min((ls[s] for s in succs[t]), default=end)
ls[t] = lf[t] - tasks[t][0]
return {t: ls[t] - es[t] for t in tasks}, end
tasks = {
"A": (3, []),
"B": (2, ["A"]),
"C": (4, ["A"]),
"D": (3, ["B", "C"]),
"E": (5, ["A"]),
}
total_float, end = analyse(tasks)
critical = [t for t in tasks if total_float[t] == 0]
near = [t for t in tasks if 0 < total_float[t] <= 2]
print(end) # 10
print(critical) # ['A', 'C', 'D']
print(near) # ['B', 'E']Exercise
In the example, how many days can task E slip before the project end moves?
Show answer
2 days. E starts at day 3 (earliest) and must start by day 5 (latest), so its total float is 2.