Decision 1:: Critical Path Analysis
Transcript of Decision 1:: Critical Path Analysis
1:: Algorithms
Sorting and bin packing.
4:: Route inspection
Find the shortest route which travels along all roads
2:: Graphs and networks
What is a graph and how they represent things.
5:: The Travelling Salesman
Find the shortest route which visits all places.
3:: Algorithms on graphs
What algorithms do I need to be able to apply?
6:: Linear Programming
How to find an optimal solution graphically
7:: The simplex algorithm
How to find an optimal solution algebraically.
8:: Critical path analysis
How to plan a project.
Decision 1 Overview
Modelling a project
A precedence table, or dependence table, shows which activities must be completed before others are started.
If you are building a house, there are several activities which must be completed, some of them can’t be started until others are finished.
A) Apply for planning permission.B) Plan the budget.C) Get the finances in place.D) Buy the land.E) Dig the foundations.F) Build the walls.G) Construct the roof.H) Put in the windows/doors.I) Plumbing.J) Electrics.K) Build internal walls.L) Decorating.
ActivityDepends
on
A -
B -
C B
D C
E D
F E
G F
H F
I K
J K
K G
L I, J
You can’t buy the land until you have planned the budget and got the finances in place, but you don’t show B again, you only show the immediate dependence.
Note – there is some room for negotiation, on the above dependences, exam questions are always clear and won’t rely on judgement about when you can put in the windows!
Test your understanding
Getting ready for a party involves many tasks, construct a precedence table for the following information.
A) R.S.V.PB) Purchase outfitC) Check if your friends are goingD) Get hair cutE) ShowerF) Put on underwearG) Put on outfitH) Put on shoesI) Travel to partyJ) Enter party
ActivityDepends
on
A C
B C
C -
D C
E D
F E
G B, F
H G
I H
J A, I
Note – there is some room for negotiation, on the above dependences, exam questions are always clear and won’t rely on judgement about if you can travel before you have got dressed!
Activity networks
For this course we will always use ‘activity on arc networks’. The activities are represented by arcs and the completion of those activities, known as events, are shown as nodes.
• Each arc is labelled with an activity letter. The beginning and end of an activity are shown at the ends of the arc and an arrow is used to define the direction. The convention is to use straight lines for arcs.
• The nodes are numbered starting from 0 for the first node, which is called the source node.
• Number each node as it is added to the network.• The final node is called the sink node.
Draw an activity network for the example on the previous slide - it’s a good idea to do it in rough first.
O 1
32 54 6 87
C
A
B
DE F G H I J
B
A
Pearson Decision 1, Page 225
Exercise 8A
Note – this section may seem trivial, but in my experience students find it REALLY hard, I suggest you do all the questions in this section, and even seek out some more before you move on.
Dummy activities
Consider the following precedence table and attempt to draw the corresponding activity network.
ActivityDepends
on
A – put key in ignition -
B - put on seatbelt -
C – drive away A, B
D – turn radio on* A
Activities A and B do not depend on any other activities so they are linked to the source node.
The problem here is how to represent activity C which depends on both activity A and activity B, to resolve this you introduce a dummy activity. Its purpose is to show that activity C depends on A as well as B.
O
1
3
2B
A D
Du
mm
y
We can’t put activity C coming out of event 1 (because C depends on B), event 2 (because C depends on A) or event 3 (because C doesn’t depend on D).
To resolve this we introduce a dummy between events 1 and 2 to show “C depends on activity A as well as activity B”.
This last bit is the answer to a common exam question. Explain the purpose of the dummy in this activity network.
C
* In my old Peugeot I can’t put the radio on until I put the key in.
Test your understanding
(3)
ActivityImmediately
precedingactivities
A
B
C
D
E
F
G
H
Unique representation in terms of events
Consider the following precedence table and attempt to draw the corresponding activity network.
ActivityDepends
on
A – put on socks -
B – put on trousers -
C – put on shoes A, B
You might quite reasonably attempt to draw the activity network for this precedence table as follows.
O 1 2
A
B
C Wrong Button
A double edge, however, is not allowed because of the following quote from the text book.
Every activity must be uniquely represented in terms of its events. This requires that there can be at most one activity between any two events.
The solution is to use a dummy as follows.
O
1
32B
A
Du
mm
y
C
Right Button
Test your understanding
Pearson Decision 1, Page 225
Exercise 8B
Note – this section may seem non-trivial, but in my experience students find it REALLY, REALLY hard, I suggest you do all the questions in this section, and even seek out some more before you move on.
Early and late event times
Activities within a project typically take different lengths of time to complete.• The length of time an activity takes is known as its duration. Weights are added
to the arcs in an activity network to represent these times.• The early event time is the earliest time of arrival at the event allowing for the
completion of all preceding activities.• The late event time is the latest time that the event can be left without
extending the time needed for the project.• The early event times are calculated starting from 0, and working towards the
sink node. This is called a forward pass or forward scan.• The late event times are calculated starting from the sink node and working
backwards towards the source node. This is called a backward pass or backward scan.
B(3)
A(2)D(3)
Du
mm
y
C(1)
0
0
3
4
2
2
5
5
Activity networks now look like this.
Duration
Early event times
Late event times
I(9)
H(1)
Forward pass
A forward pass is used to calculate the early event times. The largest value is always taken when calculating early times, because it is not possible to get to that event until all preceding activities have been completed.
0
5
5
12
11
21
14
30
A(3)
B(5)
C(6)
D(7)
E(3)G(2)
F(10)
Largest of:3 &5 + 0
Largest of:5 + 7 &5 + 3
Largest of:21 + 9 &14 + 1
Largest of:11 + 10 &12 + 0
I(9)
H(1)
Backward pass
A backward pass is used to calculate the late event times. The smallest value is always taken when calculating late times, because if you left the event later than that the project would be delayed.
0
0
5
5
5
5
12
21
11
1121
21
14
29
30
30
A(3)
B(5)
C(6)
D(7)
E(3)G(2)
F(10)
Smallest of:21 − 0 &29 − 2
Smallest of:11 − 6 & 21 − 7
Smallest of:21 − 3 &5 − 0
The sink node always has the same early and late time.
The source node always has 0 early and late times.
Test your understanding
Pearson Decision 1, Page 231
Exercise 8C
Answer templates available here.https://www.activeteachonline.com/default/player/document/id/763128/external/0/uid/1258
Critical activities
An activity is critical if any increase in its duration results in a corresponding increase in the duration of the whole project.
If you have ever watched Grand Designs with Kevin McCloud on C4 you will know all about Critical Activities.
Generally the critical activities are getting the windows in and getting the roof on, if there are delays with these jobs (and their always is) the whole project is put back.
• A path from source to sink which entirely follows critical activities is called a critical path.
• At each node on a critical path the early event time is equal to the late event time.
Critical events are ones where the early time is equal to the late time. Critical activities are those between critical events, and…Event Time A + Activity Time = Event Time B
B(3)
A(2)D(3)
E(4
)
C(1)
0
0
6
6
2
2
7
7
Identifying critical activities
B(5)
A(2) D(3)
E(4
)
C(1)
0
0
6
6
2
2
7
7
B(3)
A(2)D(3)
E(5
)
C(1)
0
0
7
7
2
2
8
8
B(3)
A(2)D(3)
E(4
)
C(2)
0
0
6
6
2
2
8
8
B(3)
A(3)D(3)
E(4
)
C(1)
0
0
7
7
3
3
8
8
Identify which activities are critical in the (green) network below by performing a forward and backward pass on each and identifying which changes change the overall duration.
You find that A, E and C are all critical activities in the original network.
B(3)
A(2)D(4)
E(4
)
C(1)
0
0
6
6
2
2
7
7
C(8)
B(3)
0
0
6
6
3
10
Identifying critical activities eg. (text book)
13
13
14
15
19
20
22
22
27
28
29
29
7
14
A(6)D(7)
F(5) I(8)
G(9)
J(2)
L(7)
K(1)
E(4)H(8)
Perform a forward and backward pass and identify the critical activities.
The critical activities are A, D, G and L.
Explore in Geogebra
https://www.geogebra.org/m/newwqrmg#material/vdmpqkxx
Can you make every activity critical?
F(5)B(3)
0
0
6
6
3
3
More than one critical path?
A(6)
13
13
11
11
16
16
31
31
25
25D(7)
C(8)
E(3)G(9)
H(3)
I(6)
Find the critical paths in this activity network and identify the critical activities.
The critical paths are ADEGI and BCFGI.
The critical activities are A, D, E, B, C, F, G, I.
Pearson Decision 1, Page 234
Exercise 8D
Answer templates available here.https://www.activeteachonline.com/default/player/document/id/763129/external/0/uid/1258
Float of an activity
The float of an activity is the amount of time that its start may be delayed without affecting the duration of the project.• Total float = latest finish time – duration – earliest start time• I like to think ‘bottom right’ – ‘middle’ – ‘top left’The total float of any critical activity is zero.
I(9)
H(1)
0
0
5
5
5
5
12
21
11
11 21
21
14
29
30
30
A(3)
B(5)
C(6)
D(7)
E(3)
G(2)
F(10)
Activity
Late
Du
rati
on
Earl
y
Flo
at
A 5 3 0 2
B 5 5 0 0
C 11 6 5 0
D 21 7 5 9
E 21 3 5 13
F 21 10 11 0
G 29 2 12 15
H 30 1 14 15
I 30 9 21 0
Reveal Critical
Path Back to slide 26
Test your understanding
Pearson Decision 1, Page 237
Exercise 8E
Gantt (Cascade) Charts
A Gantt (Cascade) chart provides a graphical way to represent the range of possible start and finish times for all activities on a diagram.
Gantt charts are a favourite tool of project managers, but, since their design in 1910-1915 they have suffered from a lack of coverage in the mainstream media.
All this briefly changed in 2015, when @TonyRoddUK made it to the Masterchef final and proudly displayed his Gantt charts along with his cooking skills – Tony Rodd is my Gantt chart hero.
• The numbers along the top show elapsed time, the first hour is shown between 0 and 1, 2nd hour between 1 and 2, etc.
• The critical activities are shown along the top row (Tony didn’t get this quite right).
I(9)
H(1)
0
0
5
5
5
5
12
21
11
11 21
21
14
29
30
30
A(3)
B(5)
C(6)
D(7)
E(3)
G(2)
F(10)
Gantt Charts eg.
0
B C F IA
DE
GH
Looking back to our float activity from slide 22.
Construct a Gantt Chart for the given activity network.
The critical activities all go on the top row.
A(2) could start at 0 and has a float of 2
D(7) could start at 5 and has a float of 9
E(3) could start at 5 and has a float of 13
G(2) could start at 12 and has a float of 15
H(1) could start at 14 and has a float of 15
0
Gantt Charts ctd.
Gantt charts can be used to determine which activities must be happening at any given time and those that may be happening at a given time.
The given Gantt chart represents a project that must be completed within 20 days.
a) Determine 2 activities that must be happening at midday on the ninth day.b) Determine 2 additional activity that may be happening at midday on the ninth day.
0
A B D E
C
F
G
a) B and F must be happening at midday on day 8.
b) C and G could be happening at midday on day 8.
Note the 1st
day is 0 − 1 so the 9th day is 8 − 9.
Pearson Decision 1, Page 239 & 240
Exercise 8F
A resource histogram shows the number of workers that are active at any given time. The convention is to assume that each activity starts at the earliest time possible, however it may be possible to use the diagram to identify which activities may be delayed to minimise the number of workers.
Resource Histograms (A2 Content)
• No worker can do more than one job at a time.• Once a worker or workers have started an activity, they must complete it.• Once a worker has finished an activity they immediately become available to start another.
This section is about considering how many workers are required to complete a project in the minimum time.
In some cases, the number of workers available is less than the number required to complete the project in the minimum possible time, in this case the start and finish times of some activities may need to be delayed to meet this constraint.
The process of adjusting the start/finish times is called resource levelling.
An activity requiring 11 workers…
Resource Histograms eg. (from text book)
This is the Gannt chart from Q2 of 8G.
A C F H
B
D
E
G
Activity No. of workers
A 2
B 1
C 1
D 2
E 1
F 1
G 2
H 1
0-3
, AB
, 3
3-7
, AD
E, 5
7-9
, CD
E, 4
9-1
1, C
EG, 4
11
-13
, FEG, 4
13
-14
, FG, 3
14
-18
, F, 1
18
-26
, H, 1
Work out how many workers are required for each day of the project, and which activities are happening – assuming each activity starts as early as possible.
A C F H
B
D
E
G
Days
Wo
rker
sW
ork
ers
Resource levelling
A C F H
B
D
E
G
Days
Wo
rker
s
Notice that we appear to need 5 workers to complete the project in 26 days, but we could do it with 4 workers if we delay the start of activity E by 4 days.
Days
Wo
rker
s
A A A A A A A C C C C F F F F F F F H H H H H H H H
A A A A A A A D D E E E E G
B B B D D D D D D G G G G G
D D D D E E G G G G
E E E E
A A A A A A A C C C C F F F F F F F H H H H H H H H
A A A A A A A D D E E E E G E E E
B B B D D D D D D G G G G G
D D D D E E G G G G E
Redraw the histogram assuming E is delayed by 4 days.
Wo
rker
s
Could the project still be completed in 26 days with 4 workers if E was delayed by 5 days rather than 4?Yes – 3 workers would be required on the 8th day, and 2 on the 18th day, H could still start on 19th day.
Going directly from activity network to resource histogram
AD H
BC E
FJJJ
Next
I III
GGG
Note – because thisis an old OCR question the early/late boxes are horizontal.
Test your understanding
Pearson Decision 1, Page 247-249
Exercise 8H
Scheduling diagrams
Assigning workers to activities is called scheduling. You may assume that each activity requires only one worker.
• You should always use the first available worker.• If there is a choice of activities for a worker, assign the one with smallest late finish
time, (the one that must be completed first out of the two).*
https://tilosamericas.com/linear-scheduling-method/
I’ll check the scheduling diagram…..
I can’t make it to the site next week, is this a
problem?
Text book error – P249 says “if there is a choice of activities for a worker, assign the one with the lowest value for its late time”. This doesn’t make much sense, because activities don’t have early/late times, they have durations.
*”This advice is only advice, in that it generally is the more successful choice.There are more complicated algorithms for scheduling, but these are beyond the scope of this syllabus.” Pearson Edexcel.
Scheduling diagramsSchedule the activities to be completed in the critical time by the minimum number of workers.
A C F H
B
D
E
G
I
One worker is required to schedule the critical activities.
Worker 2 starts with activity B, then when finished starts E, they start E rather than D because E has a late finish time of 12, where D has a late finish time of 13.
Worker 2 then starts activity D because it has a smaller late finish time than G
Worker 2 then starts activity G
Worker 2 then starts activity I at the earliest start time.
Shading indicates any periods of inactivity.
A C F H
B DE G I
All activities have now been assigned, so the scheduling diagram is complete.
Lower bound for the number of workersIn the previous example, a minimum of 2 workers were required to complete the project within 25 days. We can calculate a lower bound for the number of workers by considering the sum of the activity times.
Activity Duration
A 7
B 3
C 4
D 6
E 3
F 7
G 5
H 8
I 5
The lower bound for the number of workers required to complete a project within the critical time is the smallest integer greater than or equal to:
sum of all the activity times
critical time of the project
The sum of all the activity times is 48 days. The critical time is 25 days, this gives a lower bound as the smallest
integer greater than or equal to 48
25= 1.92 so the lower
bound is 2.
In general, it is not always going to be possible to complete the project in the critical time with the lower bound number of workers, depending on the dependency conditions more may be required.
Test your understanding
The network shows the activities that need to be undertaken to complete a project. The early and late event times are to be shown at each vertex and some have been completed for you.
a) Calculate the missing early and late times and complete the diagram.
b) List the two critical paths for this network.c) Explain what is meant by a critical path.d) Calculate a lower bound for the number of workers
required to complete the project in the minimum time. You must show your working.
e) List the activities that must be happening on day 20.f) Comment on your answer to part (e) with regard to
the lower bound you found in part (d). g) Schedule the activities, using the minimum number of
workers, so that the project is completed in 30 days.
Pearson Decision 1, Page 252-253
Exercise 8I