Module 8a (ppt file)

advertisement
Computational Methods for
Management and Economics
Carla Gomes
Module 8a
The transportation model
The transportation and assignment
problems
• Special types of linear programming
problems.
• The structure of these problems leads to
algorithms – streamlined versions of the
simplex method - more efficient than the
standard simplex method.
The transportation problem
Prototype example : P&T Company
• Main product of P&T Company – canned peas
– 3 canneries
– 4 distribution centers
• Shipping costs – major expense in management
– GOAL – minimize shipping costs
P&T Company Distribution Problem
CANNERY 1
Bellingham
WAREHOUSE 3
Rapid City
CANNERY 2
Eugene
WAREHOUSE 2
Salt Lake City
WAREHOUSE 1
Sacramento
WAREHOUSE 4
Albuquerque
CANNERY 3
Albert Lea
Shipping Data
Cannery
Output
Warehouse
Allocation
Bellingham
75 truckloads
Sacramento
80 truckloads
Eugene
125 truckloads
Salt Lake
City
65 truckloads
Albert Lea
100 truckloads
Rapid City
70 truckloads
Total
300 truckloads
Albuquerque
85 truckloads
Total
300
truckloads
Current Shipping Plan
Warehouse
\ To
Cannery
Bellingham
From
Eugene
Albert Lea
Sacramento
Salt Lake City
Rapid City
Albuquerque
75
5
0
0
65
0
0
55
15
0
0
85
Shipping Cost per Truckload
Warehouse
From
\ To
Sacramento
Salt Lake
City
Rapid City
Albuquerque
$464
352
995
$513
416
682
$654
690
388
$867
791
685
Cannery
Bellingham
Eugene
Albert Lea
Total shipping cost = 75($464) + 5($352) + 65($416) + 55($690) + 15($388) + 85($685)
= $165,595
Terminology for a Transportation
Problem
P&T Company Problem
Truckloads of canned peas
Canneries
Warehouses
Output from a cannery
Allocation to a warehouse
Shipping cost per truckload
from a cannery to a warehouse
General Model
Units of a commodity
Sources
Destinations
Supply from a source
Demand at a destination
Cost per unit distributed from a
source to a destination
Characteristics of Transportation Problems
• The Requirements Assumption
– Each source has a fixed supply of units, where this entire
supply must be distributed to the destinations.
– Each destination has a fixed demand for units, where this
entire demand must be received from the sources.
• The Feasible Solutions Property
– A transportation problem will have feasible solutions if and
only if the sum of its supplies equals the sum of its demands.
• The Cost Assumption
– The cost of distributing units from any particular source to
any particular destination is directly proportional to the
number of units distributed.
– This cost is just the unit cost of distribution times the number
of units distributed.
The Transportation Model
Any problem (whether involving transportation or
not) fits the model for a transportation problem if:
1. It can be described completely in terms of a table that
identifies all the sources, destinations, supplies, demands,
and unit costs, and
2. satisfies both the requirements assumption and the cost
assumption.
The objective is to minimize the total cost of distributing the
units.
The P&T Co. Transportation Problem
Transportation Tableau
Unit Cost
Destination
(Warehouse): Sacramento
Salt Lake City
Rapid City
Albuquerque
Supply
Source
(Cannery)
Bellingham
$464
$513
$654
$867
75
Eugene
352
416
690
791
125
Albert Lea
995
682
388
685
100
80
65
70
85
300
Demand
Network Representation
De ma nds
Supplie s
Destina tions
Sourc es
464
(Be llingham) 75
867
(E ugene) 125
S2
995
(Alber t Le a)100
S3
80 (Sa cr amento)
D2
65 (Sa lt La ke City)
D3
70 (Rapid City)
D4
85 (Albuquerque )
513
S1
352
D1
654
416
690
791
682
685
388
This graph is “bipartite.” That is, the nodes are partitioned
into two parts and arcs have one endpoint in each part.
The Transportation Problem is an LP
1. Decision Variable:
Since we have to determine how much electricity
is sent from each plant to each city;
xij = Amount of commodity produced at source i
and sent to destination j
x13 = truckloads produced at cannery 1 and sent
to warehouse 3
Network Representation
De ma nds
Supplie s
x11
Sourc es
464
(Be llingham) 75
S1
867
352
(E ugene) 125
S2
995
(Alber t Le a)100
S3
x21
513
654
x22
416
690
791
682
x31
x23
x24
x34
D1
80 (Sa cr amento)
D2
65 (Sa lt La ke City)
D3
70 (Rapid City)
D4
85 (Albuquerque )
x12
x32
x13
x33
388
685
Destina tions
x14
Shipping cost – source i destination j
This graph is “bipartite.” That is, the nodes are partitioned
into two parts and arcs have one endpoint in each part.
Objective function
Since we want to minimize the total cost of shipping
from canneries to wharehouses;
Minimize Z = $464x11 + $513x12 + $654x13 + $867x14 + $352x21 + $416x22
+ $690x23 + $791x24 + $995x31 + $682x32 + $388x33 + $685x34
Supply Constraints
Since each supply point has a limited production capacity;
Cannery 1:
Cannery 2:
Cannery 3:
x11 + x12 + x13 + x14
x21 + x22 + x23 + x24
= 75
= 125
x31 + x32 + x33 + x34 = 100
Demand Constraints
Since each supply point has a limited production
capacity;
Warehouse 1:
Warehouse 2:
Warehouse 3:
Warehouse 4:
x11
+ x21
x12
+ x31
+ x22
x13
+ x23
x14
+ x24
= 80
+ x32
= 65
+ x33
= 70
+ x34 = 85
Sign Constraints
Since a negative amount of truckloads can not be
shipped all Xij’s must be non negative;
Xij >= 0 (i= 1,2,3; j= 1,2,3,4)
The Transportation Problem is an LP
Let xij = the number of truckloads to ship from cannery i to warehouse j
(i = 1, 2, 3; j = 1, 2, 3, 4)
Minimize Cost = $464x11 + $513x12 + $654x13 + $867x14 + $352x21 + $416x22
+ $690x23 + $791x24 + $995x31 + $682x32 + $388x33 + $685x34
subject to
Cannery 1:
x11 + x12 + x13 + x14
= 75
Cannery 2:
x21 + x22 + x23 + x24
= 125
Cannery 3:
x31 + x32 + x33 + x34 = 100
Warehouse 1:
x11
+ x21
+ x31
= 80
Warehouse 2:
x12
+ x22
+ x32
= 65
Warehouse 3:
x13
+ x23
+ x33
= 70
Warehouse 4:
x14
+ x24
+ x34 = 85
and
xij ≥ 0 (i = 1, 2, 3; j = 1, 2, 3, 4)
The Transportation Problem is an LP with
special matrix A structure
Let xij = the number of truckloads to ship from cannery i to warehouse j
(i = 1, 2, 3; j = 1, 2, 3, 4)
Minimize Cost = c11 x11 + c12 x12 + c13 x13 + c14 x14 + c21 x21 + c22 x22
+ c23 x23 + c24 x24 + c31 x31 + c32 x32 + c33 x33 + c34 x34
subject to
Source1:
x11 + x12 + x13 + x14
= supply1
Source 2:
x21 + x22 + x23 + x24
= supply2
Source 3:
x31 + x32 + x33 + x34 = supply3
Destination 1: x11
+ x21
+ x31
= demand1
Destination 2:
x12
+ x22
+ x32
= demand2
Destination 3:
x13
+ x23
+ x33
= demand3
Destination 4:
x14
+ x24
+ x34 = demand4
and
xij ≥ 0 (i = 1, 2, 3; j = 1, 2, 3, 4)
The Node-Arc Incidence Matrix
(for directed graphs)
a
1
b
2
c
a
4
d
e
3
A Directed Graph
b
c
d
e
1 1 1 0 0 0 
2  0 1 1 0 1 


3  0 0 0 1 1
4  1 0 1 1 0 
•Have a row for each node
•Have a column for each arc
•Put a 1 in row i- column j if arc j starts at node i.
•Put a -1 in row i- column j if arc j ends at node i.
What would happen if arc (4,2) became arc (2,4)?
On Incidence Matrices
• If the constraint matrix for a linear program is a node-arc
incidence matrix (at most one 1 and at most one –1 per
column), then the linear program solves in integer optima.
• Node arc incidence matrix shows up in Linear
Programs.
The constraint matrix of a transportation
problem is a node-arc incidence matrix
in disguise.
The Transportation Problem is an LP
Let xij = the number of truckloads to ship from cannery i to warehouse j
(i = 1, 2, 3; j = 1, 2, 3, 4)
Minimize Cost = $464x11 + $513x12 + $654x13 + $867x14 + $352x21 + $416x22
+ $690x23 + $791x24 + $995x31 + $682x32 + $388x33 + $685x34
subject to
Cannery 1:
x11 + x12 + x13 + x14
= 75
Cannery 2:
x21 + x22 + x23 + x24
= 125
Cannery 3:
x31 + x32 + x33 + x34 = 100
Warehouse 1:
-x11
- x21
- x31
= -80
Warehouse 2:
- x12
- x22
-x32
= -65
Warehouse 3:
-x13
- x23
- x33
= -70
Warehouse 4:
-x14
- x24
- x34 = -85
and
xij ≥ 0 (i = 1, 2, 3; j = 1, 2, 3, 4)
The Node-Arc Incidence Matrix:
Transportation Problem is an LP
1
1
1
1
1 1
-1
1
1
1
-1
-1
-1
-1
-1
-1
-1
1
1 1 1
-1
-1
-1
Spreadsheet Formulation
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
B
Unit Cost
Source
(Cannery)
C
D
Bellingham
Eugene
Albert Lea
Shipment Quantity
(Truckloads)
Source
Bellingham
(Cannery)
Eugene
Albert Lea
Total Received
Demand
Sacramento
$464
$352
$995
E
F
Destination (Warehouse)
Salt Lake City
Rapid City
$513
$654
$416
$690
$682
$388
G
Albuquerque
$867
$791
$685
Sacramento
0
80
0
80
=
80
Destination (Warehouse)
Salt Lake City
Rapid City
20
0
45
0
0
70
65
70
=
=
65
70
Albuquerque
55
0
30
85
=
85
H
I
J
Total Shipped
75
125
100
=
=
=
Supply
75
125
100
Note: excel does not have a specialized simplex
algorithm to solve transportation problems.
Total Cost
$152,535
Integer Solutions Property
As long as all its supplies and demands have
integer values, any transportation problem
with feasible solutions is guaranteed to have
an optimal solution with integer values for all
its decision variables. Therefore, it is not
necessary to add constraints to the model that
restrict these variables to only have integer
values.
On the integrality Property
• The fact that solutions to the transportation problem are
integral is an amazing property.
• In general, solutions to IP are fractional.
• But solutions to the transportation problem are integral.
• Structure of the matrix of technological coefficients (A
matrix) and the fact that the RHS are integral – in general,
if there is at most one 1 and at most one –1 in any column
of the constraint matrix, then every basic feasible solution
is integer (so long as RHS is integral.)
• For many applications, we want to restrict variables to be
integer valued.
General Description of a Transportation
Problem
1. A set of m supply points from which a good is
shipped. Supply point i can supply at most si
units.
2. A set of n demand points to which the good is
shipped. Demand point j must receive at least di
units of the shipped good.
3. Each unit produced at supply point i and shipped
to demand point j incurs a variable cost of cij.
Features of this transportation
problem
• The constraint matrix is (or can be made to be) the
node arc incidence matrix of the network
• If supplies/demands are integral, then the flows
are also integral.
• If the total supply is equal to the total demand,
then all supply and demand constraints hold with
equality
• Very efficient special purpose solution techniques
exist
• Applications to shipment of goods
Features of this transportation
problem
• The constraint matrix is (or can be made to be) the
node arc incidence matrix of the network
• If supplies/demands are integral, then the flows
are also integral.
• If the total supply is equal to the total demand,
then all supply and demand constraints hold with
equality
• Very efficient special purpose solution techniques
exist
• Applications to shipment of goods
xij = number of units shipped from supply point i to
demand point j
i m j n
min
 c X
ij
ij
i 1 j 1
j n
s.t. Xij  si (i  1,2,..., m)
j 1
i m
X
ij
 dj ( j  1,2,..., n)
i 1
Xij  0(i  1,2,..., m; j  1,2,..., n)
Balanced Transportation Problem
If Total supply equals to total demand, the
problem is said to be a balanced
transportation problem:
j n
i m
s  d
i
i 1
j
j 1
Balancing a TP if total supply exceeds total
demand
If total supply exceeds total demand, we
can balance the problem by adding dummy
demand point. Since shipments to the
dummy demand point are not real, they are
assigned a cost of zero.
Balancing a transportation problem if total
supply is less than total demand
If a transportation problem has a total
supply that is strictly less than total
demand the problem has no feasible
solution. There is no doubt that in such a
case one or more of the demand will be left
unmet. Generally in such situations a
penalty cost is often associated with unmet
demand and as one can guess this time the
total penalty cost is desired to be minimum
Distribution System at Proctor and Gamble
• Proctor and Gamble needed to consolidate and re-design their North American
distribution system in the early 1990’s.
– 50 product categories
– 60 plants
– 15 distribution centers
– 1000 customer zones
• Solved many transportation problems (one for each product category).
• Goal: find best distribution plan, which plants to keep open, etc.
• Closed many plants and distribution centers, and optimized their product sourcing
and distribution location.
• Implemented in 1996. Saved $200 million per year.
For more details, see 1997 Jan-Feb Interfaces article, “Blending OR/MS, Judgement,
and GIS: Restructuring P&G’s Supply Chain”, downloadable from course web
site.
Balancing a TP if total supply exceeds total
demand
Dummy Destination
Northern Airplane (Production Scheduling)
Northern Airplane Company produces commercial airplanes. The last stage in
production is to produce the jet engines and install them.
– The company must meet the delivery deadline indicated in column 2.
An option is to produce some engines one month or more before they
are scheduled for installation and store them.
– Production and storage costs vary from month to month.
Unit Cost of
Maximum
Production
Production
($million)
Unit Cost
Month
Scheduled
Installations
of Storage(*)
($thousand)
1
10
25
1.08
15
2
15
35
1.11
15
3
25
30
1.10
15
4
20
10
1.13
Question: How many engines should be produced in each of the four months so that the
total of the production and storage costs will be minimized?
(*) storage cost is incurred at the end of the month for just those engines that are being held over to the next month;
• Source i - production of jet engines in month i (i = 1,2 ,3 4);
• Destination j – installation of jet engines in month j (j = 1,2 ,3 4)
• xij = number of engines produce in month i to be installed in
month j
• cij = cost associated with each unit of xij
Cost per unit for production + storage
???
i<j
i >j
Northern Airplane (Production Scheduling)
Cost per unit distributed
Destinations
(installation in
month j)
Source
(production
in month i)
1
2
3
4
SUPLLY
1
1.080
1.095
1.110
1.125
?
2
?
1.110
1.125
1.140
?
3
?
?
1.100
1.115
?
4
?
?
?
1.130
?
Demand
10
15
25
30
Question: How many engines should be produced in each of the four months so that the
total of the production and storage costs will be minimized?
(*) storage cost is incurred at the end of the month for just those engines that are being held over to the next month;
Transportation Tableau
Cost per unit distributed
Destinations
(installation in
month j)
Source
(production
in month i)
1
2
3
1
1.080
1.095
2
M
3
4
5(D)
(*)
SUPLLY
1.110
1.125
0
25
1.110
1.125
1.140
0
35
M
M
1.100
1.115
0
30
4
M
M
M
1.130
0
10
Demand
10
15
25
20
30
(*) the dummy destination can be seen as a slack variable that represents the unused
production capacity. Cost is zero because it is the cost of distributing to a fictional
destination. Note that it would be inappropriate to assign M since we do not want to force
the corresponding values to be zero. In fact these values need to sum 30.
Balancing a transportation problem if total
supply is less than total demand
Dummy Source
Metro Water (Distributing Natural Resources)
Metro Water District is an agency that administers water distribution in a
large goegraphic region. The region is arid, so water must be brought in
from outside the region.
– Sources of imported water: Colombo, Sacron, and Calorie rivers.
– Main customers: Cities of Berdoo, Los Devils, San Go, and
Hollyglass.
Cost per Acre Foot
Berdoo
Los Devils
San Go
Hollyglass
Available
(million acre
feet)
Colombo
River
$160
$130
$220
$170
50
Sacron River
140
130
190
150
60
Calorie River
190
200
230
—
50
Min. Needed
30
70
0
10
Requested
50
70
30

Question: How much water should Metro take from each river, and how much should they
send from each river to each city?
What’s the problem with the previous
table to look like a transportation
tableau?
•
It is not clear what the demands are at the
destinations
The amount to be received at each destination is a
decision variable, with an upper bound and a lower
bound – in the transportation model it should be a
constant.
•
Also, here we have excess demand  dummy
source
What’s the problem with the previous
table to look like a transportation
tableau?
Hollyglass  upper-bound =
Total supply – min requested =
(50 + 60 +50) – (30 + 70 + 0) = 60
How do we solve the problem of having constant
demands?
Metro Water
Transportation Tableau
Berdoo
(min)
(1)
Berdoo
(extra)
(2)
Los
Devils
(3)
San Go
(4)
Hollyglass
(5)
Available
(million acre
feet)
Colombo River (1)
$160
$160
$130
$220
$170
50
Sacron River
(2)
140
140
130
190
150
60
Calorie River
(3)
190
190
200
230
M
50
Dummy
(4)
M
0
70
M
0
50
30
20
70
30
60
260
Demand
Download