A Transportation Problem is a special case of linear programming of

advertisement
Def: A Transportation Problem is a special case of linear programming of the following form:
min z =
s.t.
Pm Pn
i=1
Pn
j=1 cij xij
j=1 xij
≤ si i = 1, ..., m
i=1 xij
≥ dj j = 1, ..., n
Pm
≥0
xij
Here, si is the supply at source i, dj is the demand at destination j, and cij is the cost of
shipping 1 unit from source i to destination j.
Def: A Balanced Transportation Problem (BTP) is a transportation problem in which total supply
is equal to toal demand.
min z =
s.t.
Pm Pn
i=1
Pn
j=1 cij xij
j=1 xij
= si i = 1, ..., m
i=1 xij
= dj j = 1, ..., n
Pm
≥0
xij
Can describe a BTP easily with a cost and requirement table.
1
A trucking company ships canned peas by the truck load from 3 canneries to 4 warehouses.
Cannery 1
Cannery 2
Cannery 3
allocation
Warehouse 1
464
352
995
80
Warehouse 2
513
416
682
65
2
Warehouse 3
654
690
388
70
Warehouse 4
867
791
685
85
output
75
125
100
Example (similar to 7-1) A company wants to supply its customer with 3 widgits during each of
the next 3 weeks.
week 1
week 2
week 3
max production reg time
2
2
1
max production overtime
2
1
2
prod cost reg time (per unit)
6,000
10,000
8,000
The overtime production cost per unit is 2,000 more than regular time production. Storage cost is
1,000 per unit per week. The starting inventory is 2 units.
What if inventory can be kept at most 1 week?
What if backlog at a cost of 2,000 per item per week is allowed?
3
(2010 exam 2) Plans are being made for the energy systems for a new building. The three possible
sources of energy are electricity, natural gas and a solar heating unit. The energy requirements are:
20 units of electricity, 10 units for water heating and 30 units for space heating. The size of the
roof limits the solar heater to 30 units. There is no limit on the amount of electricity or natural gas
bought. Electricity needs can only be met by buying electricity at a cost of $ 50 per unit. Other
energy needs can be met by any sources with the following unit costs:
Water heating
Space heating
Electricity
$ 90
$ 80
Natural Gas
$ 60
$ 50
Solar heater
$ 30
$ 40
Formulate a Balanced Transportation Problem to minimize the total cost of meeting the energy
needs. Give your formulation in terms of a cost and requirement table.
4
Section 7.2 Finding a BFS for a BTP
Number of constraints = number of supply points (m)+ number of demand points (n).
But constraints are dependent! can omit one of them.
Number of basic variables = n + m − 1
Theorem 1: A set of n + m − 1 variables form a basis if and only if they contain no loops.
A loop is a squence of cells in a table, any 2 consecutive cells lie in the same row or column, the last
and first lie in the same row or column, but no 3 consecutive cells lie in the same row or column.
Finding an initial BFS:
step 1. “select” a cell xij .
step 2. set xij = min{adjusted si , adjusted dj }.
step 3. subtract xij from udjusted si , and adjusted dj .
step 4. remove row or column whose udjusted si , or adjusted dj became zero.
Step 5: if more than 1 cell remains, then go to step 1. Otherwise stop.
How to select?
1. Northwest corner
2. Min cost cell
3. Vogel: For each row and column compute penalty = difference between cheapest and second
cheapest cell. Pick row or column with largest penalty. Within that row or column, pick cell of
minimum cost.
5
Section 7.3 The Transportation Simplex Method
step 1. Find a starting BFS.
step 2. “select” an entering cell. If no entering cells, then stop, solution is optimal.
step 3. Find the (unique) loop created by the entering cell.
step 4. “min ratio test”: Find the minimum xij being decreased in the loop, call it ∆.
step 5. “Pivot”: Increase/decrease xij for cells in loop by ∆ and remove a cell whose xij is now
zero.
Go to Step 2.
How to select an entering cell? Price out all non basic cells:
Define ui for each row i, and vj for each column j.
Solve equations for every basic variable cij = ui + vj and u1 = 0.
(For min BTP) If for all non basic variables ui +vj ≤ cij then the current BFS is optimal. Otherwise,
choose an entering variable with ui + vj > cij .
Theorem: If all supplies/demands (si , dj ) are integer, there exists an optimal solution (xij ) that is
integer.
6
Section 7.5 The assignment problem
Def: An Assignment Problem is a balanced transportation problem in which each supply and
demand is equal to 1.
min z =
s.t.
Pm Pm
i=1
Pn
j=1 cij xij
j=1 xij
= 1 i = 1, ..., m
i=1 xij
= 1 j = 1, ..., m
Pm
≥0
xij
The assignment problem is easiest to represent by a table:
c11
c21
c31
c12
c22
c32
c13
c23
c33
Exc 8, section 7-5: 4 companies bid on the city’s 4 school bus routes:
Company
Company
Company
Company
1
2
3
4
route 1
$ 4,000
$ 3,000
-
route 2
$ 5,000
$ 4,000
-
route 3
$ 2,000
$ 4,000
route 4
$ 4,000
$ 5,000
(a). Each bidder can be assigned only 1 route.
(b). Each bidder can be assigned upto 2 routes. Formulate as BTP. Formulate as assignment
problem.
7
The Hungarian Method (min problem m × m matrix):
step 1. Subtract min element from each row. Subtract min element from each column.
step 2. Cover all zeros with the fewest lines. If m lines are needed, find m “independent” zeros,
and stop. Otherwise go to step 3.
step 3. Find the minimum uncovered cell, call it k. Subtract k from each uncovered cell, add k to
each doubly covered cell.
Go to Step 2.
Why is step 3 legal???
8
Download