5 Networks
5 Networks
1
Defining the Decision Variables
For example…
X12 = the # of cars shipped from node 1 (Newark) to node 2 (Boston)
X56 = the # of cars shipped from node 5 (Atlanta) to node 6 (Mobile)
Nonnegativity conditions
Xij >= 0 for all ij
Constraints for Network Flow Problems:
The Balance-of-Flow Rules
ILP: there is a constraint that solutions should be integers
With integrity conditions: we can’t use Simplex but “Branch and bounds”
24.10.09
LP Model for Network Model
xij = # of units of flow from node i to node j (for some pairs i-j)
9
LP Model for Network Model
Remember:
For each arc there always is one decision variable
For each node there always is one flow balancing constraint
10
Optimal Solution to the LP
+100
Boston $30
$50 2 Newark -200
120 1
20
Columbus 80
+60
3 $40
$40
40 Richmond
+80
Atlanta 4
+170 5
$45
210
70
+70 Mobile
6 J'ville -300
$50 7
LP Model in Excel
12
The Shortest Path Problem
Many decision problems boil down to determining one
shortest (or cheapest) route or path through a network.
Shortest way to drive a car from a city to another city
Fastest way for an ambulance to get to an accident
Easiest way to walk across the mountains
The Shortest Path Problem is a special case of the
Network Flow Problem:
There is one source node with 1 unit of supply (b i = –1)
There is one destination node with 1 unit of demand (b i = 1)
All other nodes do not have any supply or demand (b i = 0)
13
The American Car Association
What is the fastest way +0 L'burg 3.3 hrs
+1
to get from B’ham 9 Va Bch
to Virginia Beach? 5.0 hrs
11
2.0 hrs
1.5 hrs
+0 G'ville
4
Atlanta +0
B'ham 2 2.5 hrs
1 2.5 hrs
-1
14
+0
L'burg 5 pts +1
9 Va Bch
11
9 pts
4 pts
+0 9 pts
+0 4 pts
K'ville 3 pts
5 G'boro Raliegh
9 pts 4 pts 8 10
+0
5 pts
A'ville
6 +0 3 pts
+0 3 pts
Chatt.
3 7 pts
Charl.
8 pts 7
+0
4 pts 4 pts
24.10.09
Network for Contract
+0 +0
$63,985
2 4
$28,520 $30,231 $33,968
$32,045
-1 1 3 5 +1
$60,363 $67,824
+0
22
See file Fig5-12.xls – one model for both contracts.
Worker Assignment Problem
Three workers, Ann, Bob, and Cindy, should be assigned
jobs such that the total work time is minimized.
Three jobs are available and the work time (in hours) for
each worker on each job is given in the table below.
Jobs
Worker 1 2 3
Ann 21 50 40
Bob 35 30 22
Cindy 55 20 25
Each worker should be assigned exactly one job.
23
Assignment Model
Xij = 1 if worker i is assigned to job j, Employees Work tim e Jobs
Processing
Supply Groves Distances (in miles) Plants
Capacity
Mt. Dora
21
Ocala
These problems are
200,000
275,000
1 50 4 implemented more
40
effectively using the
35 technique described
Eustis 30 Orlando 600,000
400,000
2
22
5 Previously.
55
Clermont 20 Leesburg
300,000 225,000
3 25 6
24.10.09
Transportation Problem: Tropicsun
Transportation problem is a special case of the network flow
Xij = # of bushels shipped from node i
Processing
to node j, i=1..3, j=4..6 Supply Groves Distances (in miles) Plants
Capacity
min 21X14 + 50X15 + 40X16 + Mt. Dora
21
275,000 Ocala 200,000
35X24 + 30X25 + 22X26 + 1 50 4
40
55X34 + 20X35 + 25X36
(total bushel-miles) 35
Eustis 30 Orlando 600,000
X14 + X15 + X16 = 275,000 (1) 400,000
2 5
22
X24 + X25 + X26 = 400,000 (2)
X34 + X35 + X36 = 300,000 (3) 55
X14 + X24 + X34 <= 200,000 (4) Clermont 20 Leesburg
300,000 225,000
X15 + X25 + X35 <= 600,000 (5) 3 25 6
xij = # of units of flow from node i to node j (for some pairs i-j)
27
Relationship of Network Flow Problems
Generalization Integer solutions
guaranteed if all
bi, lij, uij are integer
Special Case
28
Generalized Network Flow Problems
In some problems, a gain or loss occurs in flows.
Example of gain
Interest or dividends on investments
Examples of loss
Oil or gas shipped through a leaky pipeline
Imperfections in raw materials entering a production process
Spoilage of food items during transit
Theft during transit
30
Network for Recycling Problem
-70 Newspaper $13
1
$12 Newsprint
95%
90% +0 pulp +60
$5
7
$11 80%
Mixed Recycling 90%
-50 paper 95%
Process 1 $6
2 5
$13 $8
75% 90% Packing
paper
pulp
+40
$9 85% 95% 8
White
85%
-30 office
paper
$6
3 $10 Recycling $8 90%
90% Process 2
$7 Print
6
$13 85% 95%
stock
pulp
+50
+0 9
-40 Cardboard
$14
4
31
Model part 1
Xij = # of tons of paper material flowing out of node i
on arc i-j (note: flow into node j = yield*Xij)
Minimize total cost
Min 13X15 + 12X16 + 11X25 + 13X26
+ 9X35 + 10X36 + 13X45 + 14X46
+ 5X57 + 6X58 + 8X59 + 6X67 + 8X68 + 7X69
Raw materials constraints
– X15 – X16 >= –70 (node 1)
– X25 – X26 >= –50 (node 2)
– X35 – X36 >= –30 (node 3)
– X45 – X46 >= –40 (node 4)
32
Model part 2
Recycling processes constraints
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)
Paper pulp
+0.95X57 + 0.90X67 >= 60 (node 7)
+0.90X57 + 0.95X67 >= 40 (node 8)
+0.90X57 + 0.95X67 >= 50 (node 9)
Nonnegativity
All Xij >= 0
34