Sub topic 1
Activities, Durations and Dependencies in a Schedule Network
Prerequisites
This chapter assumes you already have the following:
- Basic project management vocabulary: scope, schedule, cost and resources.
- Some practice reading a simple activity network or Gantt chart.
- Comfort with arithmetic on durations and costs, such as adding days along a chain.
- For the code examples, basic Python (dictionaries, loops and functions). Python 3.9 or later is needed for the
graphlibmodule.
You do not need to know what the critical path is. The next chapter introduces it. This chapter builds the model that the critical path, crashing and fast-tracking all work on.
Why start with the network
Schedule compression means shortening a project's duration without cutting scope. Every compression technique changes something in the schedule network: an activity's duration (crashing) or a dependency between activities (fast-tracking). You cannot judge whether a change helps unless you can read the network and compute the finish date it implies.
A schedule network has three ingredients:
- Activities, the units of work.
- Durations, how long each activity takes.
- Dependencies, the rules about which activity must wait for which.
Activities
An activity is a piece of work with a clear start and finish, an owner and a duration. "Design the database schema" is an activity. "Do the backend" is too vague, because nobody can say when it is done. Activities usually come from decomposing the work breakdown structure (WBS), the hierarchical list of all deliverables, down to work packages and then to schedulable tasks.
Good activities have these properties:
- They are specific enough to estimate.
- They have a definite completion condition, so progress can be judged.
- They are small enough to track, but not so small that the schedule becomes unmanageable.
Some activities are milestones. A milestone has zero duration and marks a point in time, such as "design approved". Milestones matter in a network because they often anchor external commitments.
Durations
A duration is the elapsed time an activity takes, from its start to its finish. Three points about durations cause many errors.
Duration is not effort. Effort is the amount of work, measured in person-days or person-hours. Duration is the time on the calendar. If a task needs 10 person-days of work and two people work on it full time, the duration is about 5 days. This distinction is the reason crashing is possible at all. Adding people changes duration while effort stays roughly constant.
Durations are estimates. A single number such as "5 days" hides uncertainty. Many teams use three-point estimates (optimistic, most likely, pessimistic). In this tutorial we treat each duration as one deterministic number so the arithmetic stays clear. Keep in mind that real durations vary.
Time units must match the calendar. A 5-working-day activity that starts on a Thursday finishes the following Wednesday, not Monday. Scheduling tools use calendars to convert working days to dates. The examples here count working days from day 0 and ignore weekends.
The timeline convention used here
We treat time as points on a line. An activity that starts at time 0 with duration 3 finishes at time 3. A successor that must wait for it can start at time 3. Under this convention, finish = start + duration, and no extra "+1" appears. Some tools count whole days (day 1 to day 3). If you mix conventions, you get off-by-one errors in your totals.
Dependencies
A dependency is a rule that constrains when one activity can start or finish relative to another. The activity that comes first is the predecessor. The one that is constrained is the successor.
The most common dependency is finish-to-start (FS). The successor cannot start until the predecessor finishes. "Pour the foundation" must finish before "erect the walls" can start.
Dependencies have different sources, and the source tells you how much room you have to change them:
| Kind | Meaning | Example | Can it be changed? |
|---|---|---|---|
| Mandatory (hard logic) | Required by the nature of the work or by contract | Code must exist before it can be tested | Rarely |
| Discretionary (soft logic) | Chosen by the team as a preferred practice | Finish the whole design before any build starts | Often |
| External | Depends on something outside the project | Waiting for a supplier delivery or a permit | Usually not by the team |
| Internal | Depends on another activity inside the project | Testing waits for development | Depends on the type |
Discretionary dependencies are the main opportunity for fast-tracking. A team that chose to finish all design before starting any build made a choice, and they can reverse it. Chapter 9 covers this in detail. A mandatory dependency, such as "the concrete must cure", usually cannot be overlapped without breaking the work itself.
The four dependency types
Finish-to-start is the default, but there are three other relationships. Later chapters cover them in more depth, so this is only a preview.
| Type | Rule | Example |
|---|---|---|
| Finish-to-start (FS) | Successor starts after predecessor finishes | Build starts after design finishes |
| Start-to-start (SS) | Successor starts after predecessor starts | Writing documentation starts once coding starts |
| Finish-to-finish (FF) | Successor finishes after predecessor finishes | Testing finishes after coding finishes |
| Start-to-finish (SF) | Successor finishes after predecessor starts | Rare. The old shift cannot end until the new shift begins |
A lead lets a successor start before the predecessor finishes (an FS relationship with a negative offset). A lag forces a delay after the predecessor finishes. Concrete curing time is a lag. Both are covered in the dependency types chapter.
Drawing the network
A network diagram shows activities as nodes and dependencies as arrows. Here is the four-activity network used throughout this tutorial.
| Activity | Duration (days) | Predecessors |
|---|---|---|
| A | 3 | none |
| B | 5 | A |
| C | 4 | A |
| D | 3 | B, C |
Three structural features appear in almost every real network:
- Parallel branches. B and C can run at the same time because neither depends on the other.
- A merge point. D has two predecessors, so it must wait for the later of the two. A merge is where the shorter branch stops mattering for the finish date.
- A single start and a single end. A has no predecessor, and D has no successor. If a real network has several start or end activities, add a zero-duration start or finish milestone.
Computing when each activity can start
The earliest an activity can start is the latest finish among all its predecessors. If it has no predecessors, it starts at time 0. Its earliest finish is its earliest start plus its duration. Working from the start of the network to the end like this is called a forward pass.
Applied to the example:
- A has no predecessors. It starts at 0 and finishes at 3.
- B and C both wait for A, so both start at 3. B finishes at 8 and C at 7.
- D waits for both B and C. The later of 8 and 7 is 8, so D starts at 8 and finishes at 11.
The project duration is 11 days. Notice that C finishes a day before D can start, because D is waiting on B. This idle gap is the idea behind float, which a later chapter covers.
The same procedure in Python:
from graphlib import TopologicalSorter
activities = {
# name: duration in days, predecessors
"A": {"dur": 3, "preds": []},
"B": {"dur": 5, "preds": ["A"]},
"C": {"dur": 4, "preds": ["A"]},
"D": {"dur": 3, "preds": ["B", "C"]},
}
# TopologicalSorter takes {node: predecessors} and yields
# predecessors before successors. It raises CycleError on a loop.
graph = {name: a["preds"] for name, a in activities.items()}
order = list(TopologicalSorter(graph).static_order())
early_start = {}
early_finish = {}
for name in order:
a = activities[name]
early_start[name] = max((early_finish[p] for p in a["preds"]), default=0)
early_finish[name] = early_start[name] + a["dur"]
for name in sorted(early_start):
print(f"{name}: start {early_start[name]}, finish {early_finish[name]}")
print("duration", max(early_finish.values()))The output is:
A: start 0, finish 3
B: start 3, finish 8
C: start 3, finish 7
D: start 8, finish 11
duration 11The sort step matters. Listing activities by hand "in dependency order" works for four activities but breaks easily when someone adds an activity at the end of a long list. A topological sort removes that assumption.
Common errors
These mistakes appear often when people build or read a network.
- Adding every duration. Parallel work does not add. Only activities on the same chain of dependencies add up.
- Missing dependencies. If a real dependency is left out, the network shows an earlier finish than the project can achieve. Walk each activity and ask: "What must be true before this can start?"
- Redundant or invented dependencies. Linking activities that do not need to be linked makes the schedule longer than necessary. Check each arrow against the mandatory/discretionary table above. This is also where fast-tracking opportunities are hidden.
- Circular logic. If A waits for B and B waits for A, no schedule exists. The topological sort in the code raises
CycleErrorin this case, which is better than silently producing wrong dates. - Treating resource limits as dependencies, or ignoring them. If B and C need the same person, they cannot truly run in parallel even though the network says they can. The network describes logic only. Resource constraints are applied separately, and they can lengthen the schedule beyond what the forward pass shows.
- Confusing effort with duration. Doubling the team does not always halve the duration. The crash limits chapter covers why.
How this connects to compression
Everything compression does can be stated in terms of this chapter's three ingredients:
- Crashing changes durations. It pays to reduce an activity's duration, usually by adding resources.
- Fast-tracking changes dependencies. It overlaps activities that were planned in sequence.
- Neither changes the scope, which is the set of activities that must be done.
The forward pass is also how you check a change. After you shorten a duration or relax a dependency, recompute the project duration. If the number does not drop, the change cost something and bought nothing. The next chapter shows which activities can actually move the finish date.
Exercise
A project has activities P (4 days, no predecessors), Q (6 days, after P), R (2 days, after P), and S (3 days, after Q and R). Using the forward pass and the convention that finish = start + duration, what is the earliest start of S and the project duration? Why is the answer not 15 days?
Show answer
P starts at 0 and finishes at 4. Q starts at 4 and finishes at 10. R starts at 4 and finishes at 6. S has two predecessors, so it starts at the later of 10 and 6, which is 10. S finishes at 13. The earliest start of S is 10 and the project duration is 13 days. The total of all durations is 4 + 6 + 2 + 3 = 15, but Q and R run in parallel after P, so R's 2 days are hidden behind Q's 6 days and do not add to the finish date.
Exercise
Your team's plan says "Build cannot start until the whole design is finished." A colleague asks whether this dependency could be overlapped to save time. What two questions do you ask to decide, using the dependency kinds from this chapter?
Show answer
First, is the dependency mandatory or discretionary? If it is a hard logic requirement (for example, a contract term or a physical constraint), it cannot be overlapped. If it was a team preference, it is discretionary and can be reconsidered. Second, is it internal or external? An internal dependency is within the team's control. An external one, such as waiting for a supplier or approval, usually is not. Only a discretionary, internal dependency is a clear candidate for fast-tracking.