lecture 8 sep23
TRANSCRIPT
-
8/3/2019 Lecture 8 Sep23
1/31
QMB 4701:
Managerial Operations Analysis I
NETWORK MODELING
-
8/3/2019 Lecture 8 Sep23
2/31
LAST CLASS
Network flow problems
y Three types of nodes
y Xij = the amount being shipped (or flowing) from node
ito
nodej
y Numberof decision variables
y Numberofconstraints
Minimumcost networkflow problems
y If Total Supply > Total Demand
y Then Inflow-Outflow >= Supply or Demand
Excel:
y SUMIF(range,criteria,sum_range)2
-
8/3/2019 Lecture 8 Sep23
3/31
THE SHORTEST PATHPROBLEM
Many decision problems boil down to determining theshortest (or least costly) route or path through a
network.
y Ex. Emergency Vehicle Routing
This is a special case of a transshipment problem where:y There is one supply node with a supply of -1
y There is one demand node with a demand of +1
y All other nodes have supply/demand of +0
-
8/3/2019 Lecture 8 Sep23
4/31
THEAMERICAN CAR
ASSOCIATION
B'hamAtlanta
G'ville
Va Bch
Charl.
L'burg
K'ville
A'ville
G'boro Raliegh
Chatt.
12
3
4
6
5
7
8
9
10
11
2.5 hrs
3 pts
3.0 hrs4 pts
1.7 hrs4 pts
2.5 hrs
3 pts
1.7 hrs5 pts
2.8 hrs7 pts
2.0 hrs8 pts
1.5 hrs2 pts
2.0 hrs
9 pts
5.0 hrs9 pts
3.0 hrs4 pts
4.7 hrs
9 pts
1.5 hrs3 pts 2.3 hrs
3 pts
1.1 hrs3 pts
2.0 hrs4 pts
2.7 hrs4 pts
3.3 hrs5 pts
-1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
4
-
8/3/2019 Lecture 8 Sep23
5/31
SOLVING THEPROBLEM
There are two possible objectives for this problem
y Finding the quickest route (minimizing travel time)
y Finding the most scenic route (maximizing the scenic
rating points)
Define the decision Variable
Xij =1,chooseto leave nodei fornodej
0, dontchoosethe arc from nodei fornodej
Numberof decision variables?
-
8/3/2019 Lecture 8 Sep23
6/31
DEFINING THE OBJECTIVE FUNCTION
Min-Time objective function
Min 2.5 X12 +3 X13 +1.7 X23 +2.5X24
+1.7X35+2.8X36+2X46+1.5X47++2X56 +5X59 +3X68+4.7X69+1.5 X78
+2.3 X7,10+2X89+1.1 X8,10+3.3 X9,11
+2.7X10,11
Each flowhasits own costcoefficient.
6
-
8/3/2019 Lecture 8 Sep23
7/31
DEFINING THE CONSTRAINTS
Flow constraintsX12 X13 = 1 } node 1
+X12 X23 X24 = 0 } node 2
+X13 + X23 X35 X36 = 0 } node 3
+ X24 X46 X47 = 0 } node 4
+ X35 X56 X59 = 0 } node 5
+ X36 + X46 + X56 X68 X69 = 0 } node 6
+X47 X78 X7,10 = 0 } node 7
+ X68 + X78 X89 X8,10 = 0 } node 8
+ X59 + X69 + X89X9,11 = 0 } node 9
+X7,10 + X8,10 X10,11 = 0 } node 10
+X9,11 + X10,11 = 1 } node 11
Nonnegativity conditions
Xij >= 0for all ij
7
-
8/3/2019 Lecture 8 Sep23
8/31
IMPLEMENT
See file Fig5-7
8
-
8/3/2019 Lecture 8 Sep23
9/31
FORMULATE THE OBJECTIVE FUNCTION
WHEN YOU WANT TO MAXIMIZE THE SCENICSCORES
Max scenic score objective function
Max 3X12 +4X13 +4X23 +3X24
+5X35+7X36+8X46+2X47+
+9X56 +9X59 +4X68+9X69+3X78
+3X7,10+4X89+3X8,10+5X9,11+4X10,11
9
-
8/3/2019 Lecture 8 Sep23
10/31
CAN YOU DRAW THE NETWORK OF
MIN-TIME PROBLEM
10B'hamAtlanta
G'ville
Va Bch
Charl.
Raliegh
12
4
7
10
11
Total driving time = 11.5
-
8/3/2019 Lecture 8 Sep23
11/31
CAN YOU DRAW THE NETWORK OF
MAX-SCEN
IC-SCORE
PROBLE
M
11
Total scenic score = 35
B'hamAtlanta
Va Bch
L'burg
K'ville
A'ville
Chatt.
12
3
6
5
9
11
-
8/3/2019 Lecture 8 Sep23
12/31
PRACTICE QUESTIONS
Find the quickest route but with total 18 scenic
scores.
y Total driving time = 11.8
Find the most scenic route but with no more than13-hr total travel time.
y Total scenic score = 23
12
-
8/3/2019 Lecture 8 Sep23
13/31
SUMMARY OF SHORTEST PATH PROBLEM
1. One starting point (supply, with flow=1), oneending point (demand, with flow=+1), othernodes have net flow=0.
2. Objective: It can be min total shipping cost,
min travel time, or max scenic scores, etc.3. Constraints: For each node, (inflow outflow)
has to satisfy the demand or supplyrequirement. Other constraints may apply.
4. You want to find a path optimizing your
objective.5. You should know how to draw the result
network diagram from Excel solution.
13
-
8/3/2019 Lecture 8 Sep23
14/31
THE EQUIPMENT REPLACEMENT PROBLEM
THE COMPU-TRAIN COMPANY
The problem of determining when to replace
equipment is another common business problem.
Compu-Train provides hands-on software training.
Computers must be replaced at least every twoyears.
It can also be modeled as a shortest path problem
14
-
8/3/2019 Lecture 8 Sep23
15/31
THE COMPU-TRAIN COMPANY
Two lease contracts are being considered:y Each equipment requires $62,000 initially
y Contract 1:
Prices increase 6% per year
60% trade-in for 1 year old equipment15% trade-in for 2 year old equipment
y Contract 2:
Prices increase 2% per year
30% trade-in for 1 year old equipment
10% trade-in for 2 year old equipment
You want to minimize total cost
Each contract can be modeled as a shortest pathproblem 15
-
8/3/2019 Lecture 8 Sep23
16/31
NETWORK FOR CONTRACT 1
1 3 5
2 4
-1 +1
+0
+0 +0
$28,520
$60,363
$30,231
$63,985
$32,045
$67,824
$33,968
y Net cost = Initial investment trade-in valuey Cost of trading after 1 year: 1.06*$62,000-0.6*$62,000 = $28,520
y Cost of trading after 2 years: 1.062*$62,000-0.15*$62,000 = $60,363
y etc, etc.16
-
8/3/2019 Lecture 8 Sep23
17/31
SOLVING THE PROBLEM
See data file Fig5-12
Tips:
For each contract, you formulate a LPminimization problem in solver. Then you compare
the costs in two contracts.
17
-
8/3/2019 Lecture 8 Sep23
18/31
TRANSPORTATION & ASSIGNMENT PROBLEMS
Some network flow problems dont have transshipment nodes;only supply and demand nodes.
Mt. Dora1
Eustis
2
Clermont
3
Ocala1
Orlando
2
Leesburg
3
Distances (in miles)CapacitySupply
275,000
400,000
300,000 225,000
600,000
200,000
GrovesProcessing
Plants
21
50
40
3530
22
55
25
20
18
-
8/3/2019 Lecture 8 Sep23
19/31
FORMULATION
Let Xij be the amount from grove i to plant j
19
11 12 13 21 22 23 31 32 33
11 12 13
21 22 23
31 32 33
11 21 31
12 22 32
13 23
min 21 50 40 35 30 22 55 20 25
s.t. 275
400
300
200
600
x x x x x x x x x
x x x K
x x x K
x x x K
x x x K
x x x K
x x x
e
e
e
e
e
33 225
0, , 1, 2,3ij
K
x i j
e
u !
These problems are implemented more effectively in a matrix format
in Chapter 3.
-
8/3/2019 Lecture 8 Sep23
20/31
TRANSPORTATION & ASSIGNMENT PROBLEMS
What if the problem is not fully interconnected?
Mt. Dora
1
Eustis
2
Clermont
3
Ocala
1
Orlando
2
Leesburg
3
Distances (in miles)CapacitySupply
275,000
400,000
300,000 225,000
600,000
200,000
GrovesProcessing
Plants
21
50
30
22
55
25
20
20
-
8/3/2019 Lecture 8 Sep23
21/31
GENERALIZED NETWORKFLOW PROBLEMS
In some problems, a gain or loss occurs in flows
over arcs.
y Oil or gas shipped through a leaky pipeline
y
Imperfections in raw materials entering a productionprocess
y Spoilage of food items during transit
y Theft during transit
y Interest or dividends on investments
These problems require some modeling changes.
21
-
8/3/2019 Lecture 8 Sep23
22/31
COAL BANKHOLLOW RECYCLING
A firm is doing business from transferring from
paper materials to pulp.
There are four materials, two processors, and three
types of pulps. The yields for each of processing materials and
making pulps are less than one.
The firm wants to find the best processes to satisfy
the requirement and minimize the cost.
22
-
8/3/2019 Lecture 8 Sep23
23/31
COAL BANKHOLLOW RECYCLING
Material Cost Yield Cost Yield Supply
Newspaper $13 90% $12 85% 70 tons
Mixed Paper $11 80% $13 85% 50 tons
White Office Paper $9 95% $10 90% 30 tons
Cardboard $13 75% $14 85% 40 tons
Process 1 Process 2
Pulp Source Cost Yield Cost Yield Cost Yield
Recycling Process 1 $5 95% $6 90% $8 90%Recycling Process 2 $6 90% $8 95% $7 95%
Newsprint Packaging Paper Print Stock
Demand 60 tons 40 tons 50 tons
23
-
8/3/2019 Lecture 8 Sep23
24/31
NETWORK FOR RECYCLING PROBLEM
Newspaper
1
Mixed
paper
2
3
Cardboard
4
RecyclingProcess 1
5
6
Newsprint
pulp
7
Packingpaperpulp
8
Print
stock
pulp
9
-70
-50
-30
-40
+60
+40
+50
Whiteofficepaper
Recycling
Process 2
$13
$12
$11
$13
$9
$10
$14
$13
90%
80%
95%
75%
85%85%
90%
85%
$5
$6
$8
$6
$7
$8
95%
90%
90%
90%
95%
95%+0
+0
24
-
8/3/2019 Lecture 8 Sep23
25/31
DEFINING THE DECISIONVARIABLE AND
OBJECTIVE FUNCTION
M
inimize total cost.
MIN: 13X15 + 12X16 + 11X25 + 13X26
+ 9X35+ 10X36 + 13X45 + 14X46 + 5X57
+ 6X58 + 8X59 + 6X67 + 8X68 + 7X69
25
Xij= # tons of paper shipping from node i to node j
-
8/3/2019 Lecture 8 Sep23
26/31
DEFINING THE CONSTRAINTS-I
Raw Materials
-X15 -X16 >= -70 } node 1
-X25 -X26 >= -50 } node 2
-X35 -X36 >= -30 } node 3
-X45 -X46 >= -40 } node 4
26
-
8/3/2019 Lecture 8 Sep23
27/31
DEFINING THE CONSTRAINTS-II
Recycling Processes
+0.9X15+0.8X25+0.95X35+0.75X45- X57- X58-X59 = 0 } node 5
+0.85X16+0.85X26+0.9X36+0.85X46-X67-X68-X69 = 0 } node 6
27
-
8/3/2019 Lecture 8 Sep23
28/31
DEFINING THE CONSTRAINTS-III
Paper Pulp
+0.95X57 + 0.90X67 >= 60 } node 7
+0.90X57 + 0.95X67 >= 40 } node 8+0.90X57 + 0.95X67 >= 50 } node 9
28
-
8/3/2019 Lecture 8 Sep23
29/31
IMPLEMENTING THE MODEL
See data file Fig 5-17
Draw the result network diagram.
29
-
8/3/2019 Lecture 8 Sep23
30/31
IMPORTANT MODELING POINT
In generalized network flow problems, gains and/or
losses associated with flows across each arc
effectively increase and/or decrease the available
supply.
This can make it difficult to tell if the total supplyis adequate to meet the total demand.
When in doubt, it is best to assume the total supply
is capable of satisfying the total demand and use
Solver to prove (or refute) this assumption.
30
-
8/3/2019 Lecture 8 Sep23
31/31
PRACTICE: ASSIGNMENT PROBLEM
ASSIGNING SCHOOL BUSES TO ROUTS
Comp
any
Route
1
2 3 4 5 6 7 8
1 8200 7800 5400 3900
2 7800 8200 6300 3300 4900
3 4800 4400 5600 3600
4 8000 5000 6800 6700 4200
5 7200 6400 3900 6400 2800 3000
6 7000 5800 7500 4500 5600 6000 4200
31
Objective: To use a network model to assign companies to
bus routes so that each route is covered at minimum cost
and no company is assigned to more than two routes