Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Software Engineering
Pert and Gantt exercises
Lecturer: Giuseppe Santucci
1
Degree of freedom!
I.1 I.2
I.3a
I.3b
I.3c
I.4
3 3
2
63
6
2
Exercise’s goals
1. Draw a PERT network (AON) representing a project’s characteristics
2. Compute earliest/latest time of start (tmin/tmax) and earliest/latest time of finish (tmin_c/tmax_c) for each activity
3. Compute Critical Path(s)
4. Draw the Gantt diagram for the project
3
Project’s characteristics• A project has 10 activities, they are referred to by the letters A, B, ..., L
• Between such activities the following dependencies hold:
– A, L < C (C cannot start before A and L are complete)
– C < B
– B, E, H < D
– D, G, I < F
– L < G• Each activity is estimated to last t(X), that we consider fixed for the sake of simplicity.
• Time unit of measure is week
• Duration of activities is as follows
A B C D E F G H I L
6 8 1 2 8 13 13 21 39 2
4
Goal 1: draw the PERT network
1. Nodes:
a) An activity is represented by a node
b) There are two special nodes: s and t, meaning start and end of
the project, respectively (source, target)
2. Arcs:
a) A precedence relationship is represented by a directed arc
b) There is an arc from node s to every starting node (identified at
point 1)
c) There is an arc from every dead-end node (identified at point 1)
to node t
5
Goal 1: draw the PERT network
3. Labels:
a) Each node X is labeled with its duration t(X)
b) Nodes s and t are labeled with 0 (their duration is
conventionally 0)
6
Goal 1: draw the PERT network
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
82
13
130
A,L<C
7
Goal 2: min and max times -- Definitions
• Minimum time for starting activity A (tmin(A) ):
minimum time within is possible to finish all needed activities to
start A
• Minimum time for finishing the project:
tmin (t)
• Maximum time for starting activity A (tmax(A) ):
maximum time within it is mandatory to finish all needed
activities to start A in order to not delay the whole project
8
Goal 2: Computing tmin
Algorithm for computing tmin
Pre-condition: acyclic network
tmin(s) = 0;
1. Take a node Y such that tmin(Zi) have been
computed, with Zi predecessors of Y
2. tmin(Y) = max [tmin(Zi) + t(Zi)];
// t(Zi) is duration of Z
3. if Y != t go to step 2;
4. end
9
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
0
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
10
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
2
6
0
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
11
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
2
6
7
0
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
12
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
2
6
0
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
13
217
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
2
6
7
39
21
0
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
14
Goal 2: Computing tmin
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0
2
6
7
39
21
520
0
Z = set of predecessors of Y
tmin(Y) = max [tmin(Zi) + t(Zi)]
15
Goal 2: Computing tmax
Algorithm for computing tmax
Pre-condition: acyclic network
1. tmax(t) = tmin(t);
2. Take a node Y such that all tmax(Zi) have been
computed, with Z successors of Y
3. tmax(Y) = min[tmax(Zi)] – t(Y);
// t(Y) is duration of Y
4. if Y != s go to step 2;
5. end
16
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
24
22
16
29
0
26
28
29
39
37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
17
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
24
22
16
29
0
26
28
29
39..39
37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
18
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0
0
0..0
2..26
6
7
39..39
21..37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
19
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0..16
0..29
0..0
2..26
6
7..29
39..39
21..37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
20
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0
0
0..16
0..29
0..0
2..26
6..28
7..29
39..39
21..37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
21
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0..24
0..22
0..16
0..29
0..0
2..26
6..28
7..29
39..39
21..37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
22
Goal 2: Computing tmax
s
L
t
A
H
I
C
E
B
F
D
G
0
2
6
21
8
39
1
8
2
13
13
0..24
0..22
0..16
0..29
0..0
2..26
6..28
7..29
39..39
21..37
52..52
0
0..0
Z = set of successors of Y
tmax(Y) = min [tmax(Z)] - t(Y)
23
Goal 3: Critical path -- Definitions
• Critical activity: activity A such that tmin(A) = tmax(A)
• Critical path: s-t path compound of all critical activities
• Minimum time for completing activity A:
tmin_c(A) = tmin(A) + t(A)
• Maximum time for completing activity A:
tmax_c(A) = tmax(A) + t(A)
24
Goal 3: Critical Path
Activity A B C D E F G H I L
Duration 6 8 1 2 8 13 13 21 39 2
tmin 0 7 6 21 0 39 2 0 0 0
tmax 22 29 28 37 29 39 26 16 0 24
tmin_c 6 15 7 23 8 52 15 21 39 2
tmax_c 28 37 29 39 37 52 39 37 39 26
• I and F are critical activities
• s-I-F-t is the unique critical path25
Goal 4: Gantt Chart
Note: we can delay some activity e.g. C and E, that are not in a critical path
x
26
Comments
• From a PERT network you can always draw a Gantt Chart
– By starting all activities at their tmin, or
– By starting activities consistently with their tmin and tmax (consistently means between tmin and tmax)
• From the same PERT network I can derive severalGantt Charts
– I cannot deduce a PERT network from a Gantt Chart
27
Additional issues
• Duration of activities is a statistical variable
• Some resources can be unavailable in certain time period
28
Availability Constraints
Example: it is not possible to perform activities C and E in parallel
Possible solution: E is delayed and, consequently D
E is delayed so
it’s not in parallel
with C
As a
consequence D
is delayed
29
Availability Constraints
We have to verify that Gantt changes did not violate
any PERT precedence
Note: several commercial tools allow for checking
PERT and Gantt consistency
30
Exercise
• A simple software project has the following activities
• Requirement analysis, implies customer interview (A) and a questionnaire to be filled by old customers (B)
• Preparation of the questionnaire (C)
• Requirement analysis and conceptual design (D)
• Coding in Java (E)
• Test (F)
• The project starts at 01/01/2018.
• The team that will perform the test won’t be available during July 2018 because involved in another project
• Durations of activities (in months) are as follows
A B C D E F
1 1 1 1 2 331
Exercise’s goals
1. Draw a PERT network (AON) representing project’s characteristics
2. Compute earliest/latest time of start (tmin/tmax) for each activity
3. Compute Critical Path(s)
4. Draw the Gantt diagram for the project
5. Verify consistency between the PERT network, the Gantt Chart, and constraints. If needed, change the Gantt chart
32
Analysis
• From the description of the activities, it can be deduced that the process model applied is the waterfall model
• Requirement analysis activities can be conducted in parallel
• The other activities have to be performed in sequence as defined by the waterfall
33
Goal 1: Draw the PERT network
s t
C
A
BD
F
E
01
1
1
1
2
3
0
C<B
B<D
A<D
D<E
E<F
A customer interview
B customer questionnaire
C questionnaire preparation
D req. analysis and conc. design
E coding
F test 34
s t
C
A
BD
F
E
01
1
11
2
3
0
0..0
0..1
1..12..2 3..3
5..5
8..8
Goal 2: compute tmin and tmax
35
Activity A B C D E F
Duration 1 1 1 1 2 3
tmin 0 1 0 2 3 5
tmax 1 1 0 2 3 5
tmin_c 1 2 1 3 5 8
tmax_c 2 2 1 3 5 8
• B, C, D, E and F are critical activities
• s-C-B-D-E-F-t is the only CP
Goal 3: Critical Path
36
Goal 4: Gantt Chart
Jan Feb Mar Apr May Jun Jul Aug
A X
B X
C X
D X
E X X
F X X X
We delay
activity A
37
Goal 5: Consistency
• The Gantt chart is not considering the unavailability of the testing team
• By modifying the Gantt Chart based on tmin/tmax we cannot comply to such constraint
• We have to suspend activity F (Test) in July, meaning that it will finish in September
38
GEN FEB MAR APR MAG GIU LUG AGO SET
A X
B X
C X
D X
E X X
F X X X
Goal 5: Change the Gantt
39