1
Slides by
JohnLoucks
St. Edward’sUniversity
Modifications byA. Asef-Vaziri
2
Chapter 6, Part ADistribution and Network Models
Transportation Problem• Network Representation• General LP Formulation
Assignment Problem• Network Representation• General LP Formulation
Transshipment Problem• Network Representation• General LP Formulation
3
Transportation, Assignment, and Transshipment Problems
A network model is one which can be represented by a set of nodes, a set of arcs, and functions (e.g. costs, supplies, demands, etc.) associated with the arcs and/or nodes.
Transportation, assignment, transshipment, shortest-route, and maximal flow problems of this chapter as well as the minimal spanning tree and PERT/CPM problems (in others chapter) are all examples of network problems.
4
Transportation, Assignment, and Transshipment Problems
Each of the five problems of this chapter can be formulated as linear programs and solved by general purpose linear programming codes.
For each of the five problems, if the right-hand side of the linear programming formulations are all integers, the optimal solution will be in terms of integer values for the decision variables.
However, there are many computer packages that contain separate computer codes for these problems which take advantage of their network structure.
5
Transportation Problem
The transportation problem seeks to minimize the total shipping costs of transporting goods from m origins (each with a supply si) to n destinations (each with a demand dj), when the unit shipping cost from an origin, i, to a destination, j, is cij.
The network representation for a transportation problem with two sources and three destinations is given on the next slide.
6
Transportation Problem
Network Representation
2
c1
1 c12
c13c21
c22c23
d1
d2
d3
s1
s2
Sources Destinations
3
2
1
1
7
Transportation Problem: Example #1
Acme Block Company has orders for 80 tons ofconcrete blocks at three suburban locations as follows: Northwood -- 25 tons, Westwood -- 45 tons, andEastwood -- 10 tons. Acme has two plants, each of which can produce 50 tons per week. Delivery cost per ton from each plant to each suburban location is shown on the next slide.
How should end of week shipments be made to fillthe above orders?
8
Delivery Cost Per Ton
Northwood Westwood Eastwood Plant 1 24 30 40 Plant 2 30 40 42
Transportation Problem: Example #1
Decision Variables. the tons of concrete blocks, xij , to be shipped from source i to destination j.
Northwood Westwood Eastwood Plant 1 x11 x12 x13
Plant 1 x21 x22 x23
9
Define the Objective Function Minimize the total shipping cost. Min: (shipping cost per ton for each origin
to destination) × (number of pounds shipped from each origin to each destination).
Min: 24x11 + 30x12 + 40x13 + 30x21 + 40x22 + 42x23
Transportation Problem: Example #2
10
Define the Constraints Supply constraints: (1) x11 + x12 + x13 = 50 (2) x21 + x22 + x23 = 50 Demand constraints: (4) x11 + x21 = 25 (5) x12 + x22 = 45 (6) x13 + x23 = 10 Non-negativity of variables: xij > 0, i = 1, 2 and j = 1, 2, 3
Transportation Problem: Example #2
= Constraints
11
Define the Constraints Supply constraints: (1) x11 + x12 + x13 ≤ 50 (2) x21 + x22 + x23 ≤ 50 Demand constraints: (4) x11 + x21 ≥ 25 (5) x12 + x22 ≥ 45 (6) x13 + x23 ≥ 10 Non-negativity of variables: xij > 0, i = 1, 2 and j = 1, 2, 3
Transportation Problem: Example #2
≤ and ≥ Constraints
12
Partial Spreadsheet Showing Problem Data
Transportation Problem: Example #1
A B C D E F G H12 Constraint X11 X12 X13 X21 X22 X23 RHS3 #1 1 1 1 504 #2 1 1 1 505 #3 1 1 256 #4 1 1 457 #5 1 1 108 Obj.Coefficients 24 30 40 30 40 42 30
LHS Coefficients
13
Transportation Problem: Example #1Cost Table
Northwood Westwood EastwoodPlant 1 24 30 40Plant 2 30 40 42
`
Decision Variable TableNorthwood Westwood Eastwood LHS RHS
Plant 1 5 45 0 50 ≤ 50Plant 2 20 0 10 30 ≤ 50LHS 25 45 10 2490
≥ ≥ ≥RHS 25 45 10
14
Transportation Problem: Example #1 Sensitivity Report
Variable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$9 Plant 1 Northwood 5 0 24 4 4$C$9 Plant 1 Westwood 45 0 30 4 36$D$9 Plant 1 Eastwood 0 4 40 1E+30 4$B$10 Plant 2 Northwood 20 0 30 4 4$C$10 Plant 2 Westwood 0 4 40 1E+30 4$D$10 Plant 2 Eastwood 10 0 42 4 42
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$B$11 LHS Northwood 25 30 25 20 20$C$11 LHS Westwood 45 36 45 5 20$D$11 LHS Eastwood 10 42 10 20 10$E$9 Plant 1 LHS 50 -6 50 20 5$E$10 Plant 2 LHS 30 0 50 1E+30 20
15
Transportation Problem: Example #2
The Navy has 9,000 pounds of material in Albany,Georgia that it wishes to ship to three installations:San Diego, Norfolk, and Pensacola. They require 4,000, 2,500, and 2,500 pounds, respectively. Government regulations require equal distribution of shippingamong the three carriers.
The shipping costs per pound for truck, railroad, and airplane transit are shown on the next slide. Formulate and solve a linear program to determine the shipping arrangements (mode, destination, and quantity) that will minimize the total shipping cost.
16
DestinationMode San Diego Norfolk
PensacolaTruck $12 $ 6
$ 5Railroad 20 11
9Airplane 30 26
28
Transportation Problem: Example #2
17
Define the Decision VariablesWe want to determine the pounds of material, xij , to be shipped by mode i to destination j. The following table summarizes the decision variables:
San Diego Norfolk Pensacola
Truck x11 x12 x13
Railroad x21 x22 x23
Airplane x31 x32 x33
Transportation Problem: Example #2
18
Define the Objective Function Minimize the total shipping cost. Min: (shipping cost per pound for each
mode per destination pairing) x (number of pounds shipped by mode per destination pairing).
Min: 12x11 + 6x12 + 5x13 + 20x21 + 11x22 + 9x23
+ 30x31 + 26x32 + 28x33
Transportation Problem: Example #2
19
Define the Constraints Equal use of transportation modes: (1) x11 + x12 + x13 = 3000 (2) x21 + x22 + x23 = 3000 (3) x31 + x32 + x33 = 3000 Destination material requirements: (4) x11 + x21 + x31 = 4000 (5) x12 + x22 + x32 = 2500 (6) x13 + x23 + x33 = 2500 Non-negativity of variables: xij > 0, i = 1, 2, 3 and j = 1, 2,
3
Transportation Problem: Example #2
20
Transportation Problem: Example #2
Cost TableSan Siego Norfolk Pensacola
Truck 12 6 5Railroad 20 11 9Airplane 30 26 28
`
Decision Variable TableSan Siego Norfolk Pensacola LHS RHS
Truck 1000 2000 0 3000 ≤ 3000Railroad 0 500 2500 3000 ≤ 3000Airplane 3000 0 0 3000 ≤ 3000LHS 4000 2500 2500 142000
≥ ≥ ≥RHS 4000 2500 2500
21
Transportation Problem
Linear Programming Formulation Using the notation: xij = number of units shipped from origin i to destination j cij = cost per unit of shipping from origin i to destination j si = supply or capacity in units at origin i dj = demand in units at destination j
continued
22
Transportation Problem
Linear Programming Formulation (continued)
1 1Min
m n
ij iji j
c x
1 1,2, , Supply
n
ij ij
x s i m
1 1,2, , Demand
m
ij ji
x d j n
xij > 0 for all i and j
>
23
LP Formulation Special Cases• Total supply exceeds total demand:
• Total demand exceeds total supply: Add a dummy origin with supply equal to the shortage amount. Assign a zero shipping cost per unit. The amount “shipped” from the dummy origin (in the solution) will not actually be shipped.
Transportation Problem
No modification of LP formulation is necessary.
24
LP Formulation Special Cases (continued)• The objective is maximizing profit or
revenue:
• Minimum shipping guarantee from i to j: xij > Lij
• Maximum route capacity from i to j: xij < Lij
• Unacceptable route: Remove the corresponding
decision variable.
Transportation Problem
Solve as a maximization problem.
25
Assignment Problem
An assignment problem seeks to minimize the total cost assignment of m workers to m jobs, given that the cost of worker i performing job j is cij.
It assumes all workers are assigned and each job is performed.
An assignment problem is a special case of a transportation problem in which all supplies and all demands are equal to 1; hence assignment problems may be solved as linear programs.
The network representation of an assignment problem with three workers and three jobs is shown on the next slide.
26
Assignment Problem
Network Representation
2
3
1
2
3
1 c11c12
c13
c21 c22
c23
c31 c32
c33
Agents Tasks
27
An electrical contractor pays his subcontractors a fixed fee plus mileage for work performed. On a given day the contractor is faced with three electrical jobs associated with various projects. Given below are the distances between the subcontractors and the projects.
ProjectsSubcontractor A B C Westside 50 36 16
Federated 28 30 18 Goliath 35 32 20
Universal 25 25 14How should the contractors be assigned so that totalmileage is minimized?
Assignment Problem: Example
28
Network Representation50
361628
301835 32
2025 25
14
West.
C
B
A
Univ.
Gol.
Fed.
ProjectsSubcontractors
Assignment Problem: Example
29
Linear Programming Formulation
Min 50x11+36x12+16x13+28x21+30x22+18x23
+35x31+32x32+20x33+25x41+25x42+14x43 s.t. x11+x12+x13 < 1
x21+x22+x23 < 1 x31+x32+x33 < 1 x41+x42+x43 < 1 x11+x21+x31+x41 = 1 x12+x22+x32+x42 = 1 x13+x23+x33+x43 = 1 xij = 0 or 1 for all i and j
Agents
Tasks
Assignment Problem: Example
30
Linear Programming Formulation
Min 50x11+36x12+16x13+28x21+30x22+18x23
+35x31+32x32+20x33+25x41+25x42+14x43 s.t. x11+x12+x13 < 1
x21+x22+x23 < 1 x31+x32+x33 < 1 x41+x42+x43 < 1 x11+x21+x31+x41 ≥ 1 x12+x22+x32+x42 ≥ 1 x13+x23+x33+x43 ≥ 1 xij = 0 or 1 for all i and j
Agents
Tasks
Assignment Problem: Example
31
Transportation Problem: Example #2
Cost TableProject A Project B Project C
Westside 50 36 16Federated 28 30 18Goliath 35 32 20Universal 25 25 14
`
Decision Variable TableSan Siego Norfolk Pensacola LHS RHS
Westside 0 0 1 1 ≤ 1Federated 1 0 0 1 ≤ 1Goliath 0 0 0 0 ≤ 1Universal 0 1 0 1 ≤ 1LHS 1 1 1 69
≥ ≥ ≥RHS 1 1 1
32
The optimal assignment is:
Subcontractor Project Distance Westside C 16
Federated A 28Goliath (unassigned) Universal B 25
Total Distance = 69 miles
Assignment Problem: Example
33
Linear Programming Formulation Using the notation: xij = 1 if agent i is assigned
to task j 0 otherwise cij = cost of assigning agent i to
task j
Assignment Problem
continued
34
Linear Programming Formulation (continued)
Assignment Problem
1 1Min
m n
ij iji j
c x
11 1,2, , Agents
n
ijj
x i m
11 1,2, , Tasks
m
iji
x j n
xij > 0 for all i and j
35
LP Formulation Special Cases• Number of agents exceeds the number of
tasks:
• Number of tasks exceeds the number of agents: Add enough dummy agents to equalize the number of agents and the number of tasks. The objective function coefficients for these new variable would be zero.
Assignment Problem
Extra agents simply remain unassigned.
36
Assignment Problem
LP Formulation Special Cases (continued)• The assignment alternatives are evaluated in terms of revenue or profit:
Solve as a maximization problem.• An assignment is unacceptable:
Remove the corresponding decision variable.
• An agent is permitted to work t tasks:
1 1,2, , Agents
n
ijj
x t i m
37
Transshipment Problem
Transshipment problems are transportation problems in which a shipment may move through intermediate nodes (transshipment nodes)before reaching a particular destination node.
Transshipment problems can be converted to larger transportation problems and solved by a special transportation program.
Transshipment problems can also be solved by general purpose linear programming codes.
The network representation for a transshipment problem with two sources, three intermediate nodes, and two destinations is shown on the next slide.
38
Transshipment Problem
Network Representation
2
3
4
5
6
7
1c13
c14
c23
c24c25
c15
s1
c36
c37
c46c47
c56
c57
d1
d2
Intermediate NodesSources Destinationss2
DemandSupply
39
Transshipment Problem
Linear Programming Formulation
Using the notation: xij = number of units shipped from node i to node j
cij = cost per unit of shipping from node i to node j
si = supply at origin node i dj = demand at destination node j
continued
40
Transshipment Problem
all arcsMin ij ijc x
arcs out arcs ins.t. Origin nodes ij ij ix x s i
xij > 0 for all i and j
arcs out arcs in0 Transhipment nodesij ijx x
arcs in arcs out Destination nodes ij ij jx x d j
Linear Programming Formulation (continued)
continued
41
Transshipment Problem
LP Formulation Special Cases• Total supply not equal to total demand• Maximization objective function• Route capacities or route minimums• Unacceptable routesThe LP model modifications required here areidentical to those required for the special
cases inthe transportation problem.
42
The Northside and Southside facilities of Zeron Industries supply three firms (Zrox, Hewes, Rockrite) with customized shelving for its offices. They both order shelving from the same two manufacturers, Arnold Manufacturers and Supershelf, Inc.
Currently weekly demands by the users are 50 for Zrox, 60 for Hewes, and 40 for Rockrite. Both Arnold and Supershelf can supply at most 75 units to its customers.
Additional data is shown on the next slide.
Transshipment Problem: Example
43
Because of long standing contracts based on past orders, unit costs from the manufacturers to the suppliers are:
Zeron N Zeron S Arnold 5 8 Supershelf 7 4
The costs to install the shelving at the various locations are:
Zrox Hewes Rockrite Zeron N 1 5 8
Zeron S 3 4 4
Transshipment Problem: Example
44
Network Representation
ARNOLD
WASHBURN
ZROX
HEWES
75
75
50
60
40
5
8
7
4
15
8
34
4
Arnold
SuperShelf
Hewes
Zrox
ZeronN
ZeronS
Rock-Rite
Transshipment Problem: Example
45
Linear Programming Formulation• Decision Variables Defined
xij = amount shipped from manufacturer i to supplier j
xjk = amount shipped from supplier j to customer k
where i = 1 (Arnold), 2 (Supershelf) j = 3 (Zeron N), 4 (Zeron S) k = 5 (Zrox), 6 (Hewes), 7
(Rockrite)• Objective Function Defined
Minimize Overall Shipping Costs: Min 5x13 + 8x14 + 7x23 + 4x24 + 1x35 +
5x36 + 8x37 + 3x45 + 4x46 + 4x47
Transshipment Problem: Example
46
Constraints DefinedAmount Out of Arnold: x13 + x14 < 75Amount Out of Supershelf: x23 + x24 < 75Amount Through Zeron N: x13 + x23 - x35 - x36 - x37 = 0Amount Through Zeron S: x14 + x24 - x45 - x46 - x47 = 0Amount Into Zrox: x35 + x45 = 50Amount Into Hewes: x36 + x46 = 60Amount Into Rockrite: x37 + x47 = 40
Non-negativity of Variables: xij > 0, for all i and j.
Transshipment Problem: Example
47
Transshipment Problem: Example
Cost TableZeron N Zeron S Zrox Hewes Rockrite
Arnold 5 8 Zeron N 1 5 8Supershelf 7 4 Zeron S 3 4 4
Decision Variable TableZeron N Zeron S Zrox Hewes Rockrite
Arnold 75 0 75 ≤ 75 Zeron N 50 25 0 75Supershelf 0 75 75 ≤ 75 Zeron S 0 35 40 75
75 75 50 60 40 1150≥ ≥ ≥
` 50 60 40
Zeron N 0 = 0Zeron S 0 = 0
48
Solution
ARNOLD
WASHBURN
ZROX
HEWES
75
75
50
60
40
5
8
7
4
15
8
3 4
4
Arnold
SuperShelf
Hewes
Zrox
ZeronN
ZeronS
Rock-Rite
75
75
50
25
35
40
Transshipment Problem: Example
49
Transshipment Problem: ExampleVariable Cells
Final Reduced Objective Allowable AllowableCell Name Value Cost Coefficient Increase Decrease
$B$8 Arnold Zeron N 75 0 5 2 2$C$8 Arnold Zeron S 0 2 8 1E+30 2$B$9 Supershelf Zeron N 0 4 7 1E+30 4$C$9 Supershelf Zeron S 75 0 4 2 1E+30$I$8 Zeron N Zrox 50 0 1 3 6$J$8 Zeron N Hewes 25 0 5 2 2$K$8 Zeron N Rockrite 0 3 8 1E+30 3$I$9 Zeron S Zrox 0 3 3 1E+30 3$J$9 Zeron S Hewes 35 0 4 2 2$K$9 Zeron S Rockrite 40 0 4 3 10
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$14 Zeron N 0 5 0 0 75$D$15 Zeron S 0 6 0 0 25$D$8 Arnold 75 0 75 1E+30 0$D$9 Supershelf 75 -2 75 25 0$I$10 Zrox 50 6 50 0 50$J$10 Hewes 60 10 60 0 25$K$10 Rockrite 40 10 40 0 25
50
Computer Output (continued) Constraint Slack/Surplus Dual
Values 1 0.000
0.000 2 0.000
2.000 3 0.000
-5.000 4 0.000
-6.000 5 0.000
-6.000 6 0.000 -
10.000 7 0.000 -
10.000
Transshipment Problem: Example
51
Computer Output (continued)
OBJECTIVE COEFFICIENT RANGES Variable Lower Limit Current Value Upper
Limit X13 3.000 5.000 7.000 X14 6.000 8.000
No Limit X23 3.000 7.000
No Limit X24 No Limit 4.000
6.000 X35 No Limit 1.000
4.000 X36 3.000 5.000
7.000 X37 5.000 8.000
No Limit X45 0.000 3.000
No Limit X46 2.000 4.000
6.000 X47 No Limit 4.000
7.000
Transshipment Problem: Example
52
Computer Output (continued)
RIGHT HAND SIDE RANGES Constraint Lower Limit Current Value Upper
Limit 1 75.000 75.000
No Limit 2 75.000 75.000
100.000 3 -75.000 0.000
0.000 4 -25.000 0.000
0.000 5 0.000 50.000
50.000 6 35.000 60.000
60.000 7 15.000 40.000
40.000
Transshipment Problem: Example
53
Transshipment Transformed into Transportation Problem
Cost TableZeron N Zeron S Zrox Hewes Rockrite
Arnold 5 8 1000 1000 1000Supershelf 7 4 1000 1000 1000Zeron N 0 1000 1 5 8Zeron S 1000 0 3 4 4
`
Decision Variable TableZeron N Zeron S Zrox Hewes Rockrite LHS RHS
Arnold 75 0 0 0 0 75 = 75Supershelf 0 75 0 0 0 75 = 75Zeron N 75 0 50 25 0 150 = 150Zeron S 0 75 0 35 40 150 = 150LHS 150 150 50 60 40 1150
= = = = =RHS 150 150 50 60 40
54
End of Chapter 6, Part A