Sub topic 10
Dependency types, leads, and lags
This chapter assumes you can run a forward and backward pass on a finish-to-start network and compute total float. Earlier chapters covered both. Here you change the rules for how one activity constrains another, and see what that does to the critical path.
Four ways to link two activities
A dependency says when a successor may start or finish, relative to its predecessor. The default is finish-to-start. Three other types exist.
| Type | Abbreviation | Rule | Example |
|---|---|---|---|
| Finish-to-start | FS | Successor cannot start until predecessor finishes | Pour concrete, then remove formwork |
| Start-to-start | SS | Successor cannot start until predecessor starts | Start writing documentation once coding starts |
| Finish-to-finish | FF | Successor cannot finish until predecessor finishes | Testing cannot finish until the last feature is finished |
| Start-to-finish | SF | Successor cannot finish until predecessor starts | The old shift cannot end until the new shift starts |
FS covers most real links. SS and FF are common when work overlaps. SF is rare, and a schedule that uses it often should be checked for a modelling mistake.
Each type constrains one end of the successor. FS and SS limit when the successor can start. FF and SF limit when it can finish. That difference matters because the finish of an activity depends on its duration.
Lags and leads
A lag is a fixed delay added to a dependency. "Paint after plaster, with a 3-day lag for drying" is FS with a lag of 3. A lead is a lag with a negative value. "Start testing 2 days before development finishes" is FS with a lag of -2.
A lag is not an activity. It has no resources and no cost, and it appears in the schedule only as a number on a link. Use a lag for waiting that is truly passive, such as curing or approval turnaround. If someone has to do work during the wait, make it an activity.
Lags often cause errors in two ways:
- Calendar mismatch. A lag of 3 may count working days or calendar days, depending on the tool. Concrete cures on weekends, so a curing lag should usually use a calendar of 7 days a week. A review wait should use working days.
- Hidden work. A lag labelled "setup" can hold effort that nobody tracks. It will not show up in resource plans.
How the passes change
With only FS links, the forward pass takes the latest predecessor finish. With mixed types and lags, you compute a candidate for each incoming link and take the maximum. Write L for the lag and dur for the successor's duration.
| Link from P to S | Forward pass: earliest start of S is at least | Backward pass: latest finish of P is at most |
|---|---|---|
| FS | EF(P) + L | LS(S) - L |
| SS | ES(P) + L | LS(S) - L + dur(P) |
| FF | EF(P) + L - dur(S) | LF(S) - L |
| SF | ES(P) + L - dur(S) | LF(S) - L + dur(P) |
For FF and SF you first find the earliest finish the link allows. You then subtract the successor's duration to get a start. The backward pass uses the mirror image. The minimum over all outgoing links gives the latest finish.
Take the earliest start as the maximum of all candidates and zero. Take the latest finish as the minimum of all candidates and the project end date.
A worked example
The network has four activities. All durations are in days.
- A takes 4 days.
- B takes 5 days. It starts 2 days after A starts (SS with lag 2).
- C takes 3 days. It follows A (FS).
- D takes 2 days. It follows C (FS). It also cannot finish until 1 day after B finishes (FF with lag 1).
Forward pass:
- A: ES = 0, EF = 4.
- B: the SS link gives ES at least 0 + 2 = 2. So ES = 2 and EF = 7.
- C: ES = 4 (FS from A), EF = 7.
- D: the FF link requires EF(D) at least 7 + 1 = 8, so ES at least 6. The FS link from C requires ES at least 7. The maximum is 7, so ES = 7 and EF = 9.
The project takes 9 days. Backward pass, starting with LF(D) = 9:
- D: LF = 9, LS = 7.
- C: LF = LS(D) - 0 = 7, LS = 4.
- B: the FF link gives LF at most 9 - 1 = 8, so LF = 8 and LS = 3.
- A: the SS link gives LF at most LS(B) - 2 + 4 = 5. The FS link to C gives LF at most 4. The minimum is 4, so LF = 4 and LS = 0.
Total float is LS - ES. A, C and D have 0. B has 3 - 2 = 1 day. The critical path is A, C, D.
Notice that the SS link from A to B did not drive anything on the critical path. It would have driven B if B had a longer duration or a longer lag.
The same calculation in Python
This script extends the earlier forward and backward pass code. Each link carries a type and a lag. The activities are listed so that predecessors come first.
dur = {"A": 4, "B": 5, "C": 3, "D": 2}
order = ["A", "B", "C", "D"]
# (predecessor, successor, type, lag)
links = [
("A", "B", "SS", 2),
("A", "C", "FS", 0),
("B", "D", "FF", 1),
("C", "D", "FS", 0),
]
# Forward pass
es, ef = {}, {}
for t in order:
candidates = [0]
for p, s, kind, lag in links:
if s != t:
continue
if kind == "FS":
candidates.append(ef[p] + lag)
elif kind == "SS":
candidates.append(es[p] + lag)
elif kind == "FF":
candidates.append(ef[p] + lag - dur[t])
elif kind == "SF":
candidates.append(es[p] + lag - dur[t])
es[t] = max(candidates)
ef[t] = es[t] + dur[t]
end = max(ef.values())
# Backward pass
ls, lf = {}, {}
for t in reversed(order):
candidates = [end]
for p, s, kind, lag in links:
if p != t:
continue
if kind == "FS":
candidates.append(ls[s] - lag)
elif kind == "SS":
candidates.append(ls[s] - lag + dur[t])
elif kind == "FF":
candidates.append(lf[s] - lag)
elif kind == "SF":
candidates.append(lf[s] - lag + dur[t])
lf[t] = min(candidates)
ls[t] = lf[t] - dur[t]
total_float = {t: ls[t] - es[t] for t in order}
critical = [t for t in order if total_float[t] == 0]
print(end) # 9
print(total_float) # {'A': 0, 'B': 1, 'C': 0, 'D': 0}
print(critical) # ['A', 'C', 'D']The code caps every latest finish at the project end. That is a reasonable rule, and it stops an SS or SF link from pushing a latest finish beyond the end date.
What changes on the critical path
Mixed dependencies change how you read results in four ways.
Critical links, not just critical activities. With FS-only logic, a zero-float activity is critical as a whole. With SS and FF links, the constraint can sit on the link. A path can pass through the start of one activity and the finish of another. When you trace the path, follow the link that sets each earliest date. That link is the driving relationship.
Free float and total float can disagree with intuition. An activity linked by FF can have float on its start but none on its finish. Check which end of the activity the successor depends on before you decide how far it can slip.
Negative lags can produce odd results. A lead lets a successor start before its predecessor finishes. If the lead is larger than the successor's work that can safely overlap, the schedule assumes something impossible. Check that the overlap makes physical sense.
Float can go negative. If a constraint such as a fixed deadline sits earlier than the forward pass allows, LS - ES is negative. Negative float means the date cannot be met without compression, which a later chapter covers.
Common errors
- Putting a lag on a link when the wait is really an activity with resources.
- Applying FS formulas to an SS or FF link, which makes the forward pass wrong and float misleading.
- Forgetting to subtract the successor's duration on FF and SF links.
- Using a working-day calendar for a lag that runs over weekends.
- Using a negative lag to cover a poor estimate instead of changing the activity's logic.
Exercise
A (6 days) and B (4 days) are linked FS with a lag of -2. A starts on day 0. When is the earliest finish of B, and what changes if the link is SS with a lag of 2?
Show answer
With FS and lag -2, ES(B) = EF(A) + (-2) = 6 - 2 = 4, so EF(B) = 8. With SS and lag 2, ES(B) = ES(A) + 2 = 2, so EF(B) = 6. The SS link lets B start earlier, and B no longer waits for A to be nearly finished.
Exercise
Activity X (5 days) and activity Y (3 days) are linked FF with a lag of 2, and X starts on day 0. What is the earliest start of Y?
Show answer
EF(X) = 5. The link requires EF(Y) to be at least 5 + 2 = 7. Y lasts 3 days, so ES(Y) = 7 - 3 = 4. Y starts on day 4 and finishes on day 7.