Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER 5
NETWORK ANALYSIS
4.1. Network Basics
4.2. Shortest Path Problems
4.2.1. Dijkstras Algorithm
4.2.2. Direct Approach
4.3. Maximum Flow Problems
4.3.1. LP Solution
4.3.2. Augmented Path Algorithm
4.4. Minimum Spanning Tree Problems
4.5. Critical Path Method (CPM)
4.6. Project Evaluation and Review Technique
(PERT)
Network Models
Many important optimization problems can be solved
by means of graphical or network representation
Specific network models:
Shortest Path Problems
Maximum Flow Problems
Critical Path Method (CPM) & Project
Evaluation and Review Technique (PERT)
Project Scheduling Models
Minimum Spanning Tree Problems
Minimum Cost Network Flow Problems
(MCNFPs)
Basic Definitions
GRAPH or NETWORK
NODES: A set of points or vertices (V)
ARCS: A set of arcs (A)
An Arc consists of an ordered pair of
vertices and represents a possible
direction of motion that may occur
between vertices
2 3
V = {1, 2, 3, 4}
A = {(1, 2), (2, 3), (3, 4), (4, 3), (4, 1)}
For an arc (j, k), node j is the initial node of the arc
and node k is the terminal node of the arc.
Basic Definitions
CHAINS: A sequence of arcs such that
every arc has exactly one vertex in
common with the previous arc is called a
chain.
PATH: A path is a chain in which the
terminal node if arc is identical to the
initial node of the next arc.
For example in previous example
Chain but not a path: (1, 2), (2, 3), (4, 3)
Chain and a path: (1, 2), (2, 3), (3, 4) represents
a travel from node 1 to node 4.
4.1. Network Basics
4.2. Shortest Path Problems
4.2.1. Dijkstras Algorithm
4.2.2. Direct Approach
4.3. Maximum Flow Problems
4.3.1. LP Solution
4.3.2. Augmented Path Algorithm
4.4. Minimum Spanning Tree Problems
4.5. Critical Path Method (CPM)
4.6. Project Evaluation and Review Technique
(PERT)
Shortest Path Problems
Assuming that each arc in the network
has a length associated with it.
Suppose we start at a particular node the
problem of finding the shortest path (path
of minimum length) from node 1 to any
other node in the network is called a
shortest path problem.
Example 1: Shortest Path Problem
3
2 4
4
2
Plant 1 1 2
6 City
3
2
3 3 5
Substations
2 $4,000 $6,000
3 $5,000 $2,000
4 $9,000 $1,000
5 $12,000 $0
Solution 2: Shortest Path Problem
Our network will have 6 nodes
Node i is the beginning of year i
For i<j, an arc (i, j) corresponds to purchasing a
new car at the beginning of year i and keeping it
until the beginning of year j
The length of arc (i, j) (call it cij) is the total net
cost incurred in owning and operating a car from
the beginning of year i to the beginning of year j
if a new car is purchased at the beginning of
year i and this car is traded in for a new car at
the beginning of year j.
Solution 2: Shortest Path Problem
cij = maintenance cost incurred during years i, i+1, ..j-1
+ cost of purchasing car at the beginning of year i
- trade-in value received at beginning of year j
12 21
3
2
3 3 5
Substations
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
A
7 T
2 2 5
O 5 B 4 D
3 1 7
4 1
C 4 E
n Solved Nodes Closest Total nth Minimum Last
Directly Connected Distance Nearest Distance Connection
Connected to Unsolved Involved Node
Unsolved Nodes Nodes
1 O A 2 A 2 OA
Example 5
A
7 T
2 2 5
O 5 B 4 D
3 1 7
4 1
C 4 E
n Solved Nodes Closest Total nth Minimum Last
Directly Connected Distance Nearest Distance Connection
Connected to Unsolved Involved Node
Unsolved Nodes Nodes
1 O A 2 A 2 OA
2, 3 O C 4 C 4 OC
A B 2+2 = 4 B 4 AB
Example 5
A
7 T
2 2 5
O 5 B 4 D
3 1 7
4 1
C 4 E
n Solved Nodes Closest Total nth Minimum Last
Directly Connected Connected Distance Nearest Distance Connection
to Unsolved Nodes Unsolved Involved Node
Nodes
1 O A 2 A 2 OA
2, 3 O C 4 C 4 OC
A B 2+2 = 4 B 4 AB
4 A D 2+7=9
B E 4+3=7 E 7 BE
C E 4+4=8
Example 5
A
7 T
2 2 5
O 5 B 4 D
3 1 7
4 1
C 4 E
n Solved Nodes Closest Total nth Minimum Last
Directly Connected Distance Nearest Distance Connection
Connected to Unsolved Involved Node
Unsolved Nodes Nodes
4 A D 2+7=9
B E 4+3=7 E 7 BE
C E 4+4=8
5 A D 2+7=9
B D 4+4=8 D 8 BD
E D 7+1=8 D 8 ED
Example 5
2 7 T
2 5
5 4
O B D
7
3 1
1
4
4
C E
Solution 5
n Solved Nodes Closest Total nth Minimum Last
Directly Connected Distance Nearest Distance Connection
Connected to Unsolved Involved Node
Unsolved Nodes Nodes
1 O A 2 A 2 OA
2, 3 O C 4 C 4 OC
A B 2+2 = 4 B 4 AB
4 A D 2+7=9
B E 4+3=7 E 7 BE
C E 4+4=8
5 A D 2+7=9
B D 4+4=8 D 8 BD
E D 7+1=8 D 8 ED
6 D T 8+5=13 T 13 DT
E T 7+7=14
Solution 5
Shortest path from the destination to the
origin
TDEBAO OR
TDBAO
Therefore, two alternatives for the
shortest path from the origin to the
destination
OABEDT OR
OABDT
4.1. Network Basics
4.2. Shortest Path Problems
4.2.1. Dijkstras Algorithm
4.2.2. Direct Approach
4.3. Maximum Flow Problems
4.3.1. LP Solution
4.3.2. Augmented Path Algorithm
4.4. Minimum Spanning Tree Problems
4.5. Critical Path Method (CPM)
4.6. Project Evaluation and Review Technique
(PERT)
MAXIMUM FLOW PROBLEMS
The arcs may be thought of as having a capacity
that limits the quantity of a product that may be
shipped through the arc.
It is desired to transport the maximum amount of
flow from a starting point (source) to a terminal
point (called sink).
Such problems are called maximum flow
problems.
Linear programming and Ford-Fulkerson (1962)
method are used for solving maximum flow
problems.
Examples of Maximum Flow Problems
Maximize the flow through a companys
distribution network from its factories to its
customers
Maximize the flow through a companys supply
network from its vendors to its factories
Maximize the flow of oil through a system of
pipelines
Maximize the flow of water through a system of
aqueducts
Maximize the flow of vehicles through a
transportation network
LP Solution of Maximum Flow
Problems
Sunco Oil wants to ship the maximum possible
amount of oil (per hour) via pipeline from node so
to node si. On its way from node so to node si, oil
must pass through some or all of stations 1, 2,
and 3. The various arcs represents pipelines of
different diameters. The maximum number of
barrels of oil (millions of barrels per hour) that
can be pumped through each arc is shown in
table. Each of these numbers is called an arc
capacity. Formulate an LP that can be used to
determine the maximum number of barrels of oil
per hour that can be sent from so to si.
Example 6: Sunco Oil
4
3 1
2 3 2
so 1 2 si
(0) 3
(xo) 2
e.g.
xso,1 = 2; x1,3 = 0; x1,2 = 2; x3,si = 0; x2,si = 2; xsi,so = 2; xso,2 = 0
44
MINE 332
LP SOLUTION 6: Sunco Oil
Let xo be the flow through the artificial arc
xo = total amount of oil entering into the sink
Max z = xo
s.t. OPTIMAL SOLUTION
xso, 1 2 (arc capacity constraints) z=3
xso, 2 3 xso,1 = 2
x12 3 x13 = 1
x2,si 2
x12 = 1
x13 4
xso,2 = 1
x3,si 1
xo = xso,1 + xso,2 (node so flow constraint)
x3,si = 1
xso,1 = x12 + x13 (node 1 flow constraint) x2,si = 2
x2,si = xso,2 + x12 (node 2 flow constraint) xo = 3
x13 = x3,si (node 3 flow constraint)
xo = x3,si + x2,si (node si flow constraint)
Xij 0
Augmented Path Algorithm
Identifying an augmented path by finding some
directed path from the source to the sink in the
residual network such that every arc on this path
has strictly positive residual capacity
If no augmented path exists, the net flows already
assigned constitute an optimal flow pattern
Identify the residual capacity c* of this augmented
path by finding the minimum of residual capacities
of the arcs on this path
Increase the flow in this path by c*
Decrease by c* the residual capacity of each arc on
this augmenting path. Increase by c* the residual
capacity of each arch in the opposite direction on
this augmenting path.
Example: Seervada Park
0 A 3
1 0 T
0
5 0 9
0 4 0
O 7 B D
2 5 0
4 0 7
0 1
0 C 0
E
4 0 6
5
Iteration 1: O B E T
Residual Capacity = min {7, 5, 6} = 5
3
0 A
1 0 T
5 0 9 5
4 0
O 2 5 B D 5
5 2 0 0
4 0
0 5 1
0 C E 1
4 0
Iteration 2: O A D T
Residual Capacity = min {5, 3, 9} = 3
8
Iteration 2: O A D T
Residual Capacity = min {5, 3, 9} = 3
0
3 A
1 3 T
2 0 3 6 5
O 2 5 B 4 0 D 8
8 2 0
4 0
0 5 1
0 C E 1
4 0
Iteration 3: O A B D T
Residual Capacity = min {2, 1, 4, 6} = 1
9
Iteration 3: O A B D T
Residual Capacity = min {2, 1, 4, 6} = 1
0
4 A
0 4 T
1 1 5 5
3
O 2 5 B 3 D 9
9 2 0 1
4 0
0 5 1
0 C E 1
4 0
Iteration 4: O B D T
Residual Capacity = min {2, 3, 5} = 2
11
11
Iteration 4: O B D T
Residual Capacity = min {2, 3, 5} = 2
0
4 A
0 6 T
1 1 3 5
3
O 0 7 B 1 D 11
11 2 3
0 0
4
0 5 1
0 C E 1
4 0
Iteration 5: O C E D T
Residual Capacity = min {4, 4, 1, 3} = 1
11
11
12 12
Iteration 5: O C E D T
Residual Capacity = min {4, 4, 1, 3} = 1
0
4 A
0 7 T
1 1 2 5
3
O 2 5 B 4 D 12
12 2 0
0 1
3
0 5 0
1 C E 1
3 1
Iteration 6: O C E T
Residual Capacity = min {3, 3, 1} = 1
12
12
13
13
Iteration 6: O C E T
Residual Capacity = min {3, 3, 1} = 1
0
4 A
0 7 T
1 1 2 6
3
O 0 7 B 1 D 13
13 2 3
0 1
2
0 5 0
2 C E 0
2 2
Iteration 7: O C E B D T
Residual Capacity = min {2, 2, 5, 1, 2} = 1
13
13
14
14
Iteration 7: O C E B D T
Residual Capacity = min {2, 2, 5, 1, 2} = 1
0
4 A
0 8 T
1 1 1 6
3
O 0 7 B 0 D 14
14 2 4
1 1
1
0 4 0
3 C E 0
1 3
There are no more augmenteing paths , so the
current flow is optimal.
4 3 T
1 8
O 7 B 4 D 14
14 6
2 4 1
3
C E
3
4.1. Network Basics
4.2. Shortest Path Problems
4.2.1. Dijkstras Algorithm
4.2.2. Direct Approach
4.3. Maximum Flow Problems
4.3.1. LP Solution
4.3.2. Augmented Path Algorithm
4.4. Minimum Spanning Tree Problems
4.5. Critical Path Method (CPM)
4.6. Project Evaluation and Review Technique
(PERT)
Minimum Spanning Tree (M.S.T.)
Problems
Suppose that each arc (i,j) in a network
has a lenght associated with it and that
arc (i,j) represents a way of connecting
node i to node j.
In many applications, we wish to
determine the set of arcs in a network that
connect all nodes such that the sum of
the length of the arcs is minimized.
Such group of arcs should contain no
loop.
Some M.S.T. Applications
Design of telecommunication networks (fiber-
optic networks, computer networks, leased-line
telephone networks, cable television networks,
etc.)
Design of a lightly used transportation network
to minimize the total cost of providing the links
(rail lines, roads, etc.)
Design of a network of high-voltage electrical
power transmission lines
Design of a network of wiring on electrical
equipment (e.g., a digital computer system) to
minimize the total length of the wire
Design of a network of pipelines to connect a
number of locations
Illustrations of M.S.T. Concept
A spanning tree.
Example: M.S.T. Problem
12
1 2
4
7 (1,2) (2,3) (3,1) is a loop
(1,3) (2,3) is a spanning tree
(1,2) (2,3) is a spanning tree
(1,2) (1,3) is a spanning tree
3
4
2
3
2
6
5 2 3
4
5
4
Solution: M.S.T. Problem
1
Iteration 1: Following 1 2
the M.S.T. algorithm,
we arbitrarily chose 4
2
to begin at node 1. 2 3
The closest node to
node 1 is node 2. 6
Now C={1, 2}, 5 2 3
C={3,4,5}, and arc
(1,2) will be in the 4
minimum spanning 5
tree.
C={1,2}
C={3,4,5}
4
Solution: M.S.T. Problem
Iteration 2: Node 5 is 1
1
2
the closest to C.
Since node 5 is two 4
blocks from node 1 2
3
and from node 2, we 2
may include either
arc (2,5) or arc (1,5) 6
5 2 3
in the minimum
spanning tree. We
arbitrarily chose to 4
include arc (2,5). 5
Then C={1,2,5},
C={3,4}. C={1,2,5}
C={3,4}
4
Solution: M.S.T. Problem
1
Iteration 3: Since 1 2
node 3 is two
4
blocks from node 2
3
5, we may include 2
4
Example: Seervada Park M.S.T.
The Seervada Park management needs to determine
under which roads telephone lines should be installed
to connect all stations with a minimum total length of
line.
A
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 1:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 2:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 3:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 4:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 5:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Solution: Seervada Park M.S.T.
STEP 6:
2 7 T
2 5
5 4
O B D
3 7
1 1
4
4 E
C
Class Exercise
A 2 G
7
3 F
6
1 15
B
16
11 E 5
D
17 4 10 H
8 12
I
18 13
C
9
J
Answer: Class Exercise
A 2 G
7
3 F
6
1 15
B
16
11 E 5
D
17 4 10 H
8 12
I
18 13
C
9
J
Total Length: 48
4.1. Network Basics
4.2. Shortest Path Problems
4.2.1. Dijkstras Algorithm
4.2.2. Direct Approach
4.3. Maximum Flow Problems
4.3.1. LP Solution
4.3.2. Augmented Path Algorithm
4.4. Minimum Spanning Tree Problems
4.5. Critical Path Method (CPM)
4.6. Project Evaluation and Review Technique
(PERT)
Ciritical Path Method (CPM)
Network models can be used as an aid in the
scheduling of large complex projects that
consist of many activities.
If the duration of each activity is known with
certainty, the critical path method can be used
to determine the length of time required to complete
a project.
to determine how long each activity in the project can
be delayed without delaying the completion of a
project
CPM was developed in the late 1950s by
researchers at DuPont and Sperry Rand
Applications Examples of CPM/PERT
Mine Planning and Scheduling
Scheduling construction projects such as
buildings, highways, and airports...
Installing new computer systems
Designing corporate mergers
Building ships
Developing countdown and hold procedure
for the launching of space crafts
Six Steps Common to CPM/PERT
1. Define the project and all significant activities
2. Develop relationships among the activities.
Identify precedence relationships
3. Draw the network
4. Assign time and/or cost estimates to each
activity
5. Compute the longest time path (critical path)
through the network
6. Use the network to help plan, schedule,
monitor, and control the project.
Questions Addressed by CPM/PERT
When will the project be completed?
What are the critical activities or tasks in the
project?
Which are the non-critical activities?
What is the probability that the project will be
completed by a specific date?
Is the project on schedule, ahead of schedule, or
behind of schedule?
Is the project over or under the budgeted amount?
Are there enough resources to finish the project on
time?
If the project must be finished in less than the
scheduled amount of time, what is the best way to
accomplish this at least cost?
Advantages of CPM/PERT
Useful at several stages of project management
Straightforward in concept, not mathematically complex
Uses graphical displays employing networks to help user
perceive relationships among practical activities
Critical path and slack time analyses help pinpointing
activities that is needed to be closely watched
Networks generated provide valuable project documentation
and graphically point out who is responsible for various
project activities
Applicable to a wide variety of projects and industries
Useful in monitoring not only schedule, but costs as well
Limitations of CPM/PERT
Project activities must be clearly defined,
independent, and stable in their relationships
Precedence relationships must be specified and
networked together
Time activities in PERT are assumed to follow the
beta probability distributionmust be verified
Time estimates tend to be subjective, and are
subject to fudging by managers
There is inherent danger in too much emphasis
being places on the ciritical path
Utilization of CPM/PERT
To apply CPM or PERT, we need a set of activities
that make up the project
The project is considered to be completed when
all activities have been completed
For each activity there is a set of activities (called
the predecessors of the activity) that must be
completed before the activity begins
A project network (project diagram) is used to
represent the predecence relationships between
activities (AOA representation of a project)
How to construct AOA representation of a
project?
Node 1 represents the start of the project. An arc
should lead from node 1 to represent each activity that
has no predecessors.
A node (called the finish node) representing the
completion of the project should be included in the
network.
Number the nodes in the network should be such that
the node representing the completion time of an
activity always has a larger number than the node
representing the beginning of the activity.
An activity should not be represented by more than
one arc in the network.
Two nodes can be connected by at most one arc.
Example: Widgetco
Widgetco is about to introduce a new product (product 3).
A list of activities and their predecessors and of the
duration of each activity is given. Draw a project network
for this project.
D (7)
1 Dummy E (10)
B (9)
2 4
Activity Predecessors Duration (days)
A: train workers - 6
B: purchase raw materials - 9
Node 1: Start node C: produce product 1 A, B 8
3
5
ET(i)s for Widgetco
ET(3) = 9 ET(5) = 26
8 12
3 5 6
6 ET(6) = 38
7
1 0 10
ET(1) = 0
9
2 4
ET(2) = 9 ET(4) = 16
7
LT(i)s for Widgetco
LT(3) = 9 LT(5) = 26
8 12
3 5 6
6 LT(6) = 38
7
1 0 10
ET(1) = 0
9
2 4
LT(2) = 9 LT(4) = 16
LT(3) = 9 LT(5) = 26
3 8 5 12 6
6 LT(6) = 38
1 7
0 10 Activity B: TF(1,2) = LT(2) - ET(1) - 9 = 0
ET(1) = 0 Activity A: TF(1,3) = LT(3) - ET(1) - 6 = 3
9 Activity D: TF(3,4) = LT(4) - ET(3) - 7 = 0
2 4 Activity C: TF(3,5) = LT(5) - ET(3) - 8 = 9
LT(2) = 9 LT(4) = 16 Activity E: TF(4,5) = LT(5) - ET(4) - 10 = 0
Activity F: TF(5,6) = LT(6) - ET(5) - 12 = 0
Dummy activity: TF(2,3) = LT(3) - ET(2) - 0 = 0
TF(i,j)s for Widgetco
Activity B: TF(1,2) = LT(2) - ET(1) - 9 = 0
Activity A: TF(1,3) = LT(3) - ET(1) - 6 = 3
Activity D: TF(3,4) = LT(4) - ET(3) - 7 = 0
Activity C: TF(3,5) = LT(5) - ET(3) - 8 = 9
Activity E: TF(4,5) = LT(5) - ET(4) - 10 = 0
Activity F: TF(5,6) = LT(6) - ET(5) - 12 = 0
Dummy activity: TF(2,3) = LT(3) - ET(2) - 0 = 0
3 5 6
1
TF(1,2) = 0
TF(1,3) = 3
TF(2,3) = 0
TF(3,4) = 0
2 TF(3,5) = 9
4 TF(4,5) = 0
TF(5,6) = 0
A Problem Definition - 3
B Preliminary study of costs and constraints A 3
C Analysis of problems in existing building A 3
D Incorporation of requirements in new building C 5
E Detailed drawings of new building B, C 6
F Contractor building a prototype D, E 9
G Cost analysis E 5
H Engineers reviewing feasibility G 3
I Contractor building the factory G, F 5
J Building inspection I, H 6
K Final plant layout J 4
Class Exercise: CPM
E G
3 5 7
6 5
B H
3 3
A J K
1 2 9 10 11
3 6 4
3 I
C
5
D F
4 6 8
5 9
D (4, 6) 5 6 12 12 12 6 5 = 1 - 12 6 5 = 1
E (3, 5) 6 6 12 12 12 6 6 = 0 Yes 12 6 6 = 0
F (6, 8) 9 12 21 21 21 12 9 = 0 Yes 21 12 9 = 0
G (5, 7) 5 12 21 17 21 12 5 = 4 - 21 12 5 = 4
H (7, 9) 3 17 26 26 26 17 3 = 6 - 26 17 3 = 6
I (8, 9) 5 21 26 26 26 21 5 = 0 Yes 26 21 5 = 0
114
Source: http://demonstrations.wolfram.com/ExploringTheTailsOfTheNormalDistribution/
PERT
Properties of Beta Distribution: It is used for modeling events that occur in a range of
a minimum and maximum value.
For this reason, the Beta distribution is used extensively in PERT, CPM and other
project planning/control systems to describe the time to completion of a task.
Source:http://www.brighton-webs.co.uk/distributions/beta.asp 115
MINE 332
PERT
PERT requires the assumption that the durations of all
activities are independent.
In this case, the mean and variance of the time to complete
the activities on any path are given by:
( i , j ) path
E (Tij )
( i , j ) path
VAR(Tij )
Activity a b m
(1,2) 5 13 9
(1,3) 2 10 6
(3,5) 3 13 8
(3,4) 1 13 7
(4,5) 8 12 10
(5,6) 9 15 12
Calculate the expected completion time and the
variance of the project.
Solution: Modified Widgetco
E(T12) = (5+13+9*4)/6 = 9 VAR(T12) = (13-5)2 /36 = 1.78
E(T13) = 6 VAR(T13) = 1.78
E(T35) = 8 VAR(T35) = 2.78
E(T34) = 7 VAR(T34) = 4
E(T45) = 10 VAR(T45) = 0.44
E(T56) = 12 VAR(T56) = 1
E(T23) = 0 VAR(T23) = 0
8 12
6
3 5 6 (38,38)
(9,9)
(26,26)
1 Critical path: 1-2-3-4-5-6
7 10
0 E(CP)=9+0+7+10+12 = 38
(0,0) 9 VAR(CP)=1.78+0+4+0.44+1=
7.22
4 Standard Deviation for CP
2 (9,9) (16,16)
= (7.22)1/2 = 2.69
Class Exercise: PERT
Draw a PERT network diagram for a construction project with the activity
information given below:
Duration (Weeks)
Activity Immediate Optimistic (a) Most Likely (m) Pessimistic (b)
Predecessor(s)
A - 7 16 28
B A 4 19 25
C A 10 16 37
D B 7 13 37
E B, C 13 19 33
F B 19 22 33
G D, E 4 7 19
H F, G 13 19 49
I B, C 13 25 37
J I, H 7 13 19
Class Exercise: PERT
Activity (i, j) Expected Time, E(Di,j) Varince, i,j2
A B F
1 2 3 6
16,5 17,5 23,33
D
G
16 8,5
C
H 23
5
18,5
E
20,33
I J
4 7 8
25 13
CRITICAL PATHS: A, C, E, G, H, J