Académique Documents
Professionnel Documents
Culture Documents
Based on
Chapter 7
Introduction to Mathematical Programming: Operations Research, Volume 1 4th edition, by Wayne L. Winston and Munirpallam Venkataramanan
Lewis Ntaimo
7.1Transportation Problems
1. Example formulation 2. General formulation 3. Balancing a transportation problem 4. Finding a basic feasible solution 5. The transportation simplex algorithm
Table 1: Shipping Costs, Supply, and Demand for Powerco To From Plant 1 Plant 2 Plant 3 Demand (million kwh) City 1 $8 $9 $14 45 City 2 $6 $12 $9 20 City 3 $10 $13 $16 30 City 4 $9 $7 $5 30 Supply (million kwh) $35 $50 $40
d2 = 20
s2 = 50
Plant 2 City 3 d3 = 30
s3 = 40
Plant 3
City 4
d4 = 30
Decision Variables: xij # of (million) kwh produced at plant i and sent to city j Constraints: Supply (Capacity) constraints Demand constraints
L. Ntaimo (c) 2005 INEN420 TAMU 4
Supply Constraints
s1 = 35
Plant 1
City 2
d2 = 20
s2 = 50
Plant 2
x23= 5 x32= 10
City 3 d3 = 30
s3 = 40
Plant 3
x34= 30
City 4 d4 = 30
Min s. t.
c x
i =1 j =1 n
ij ij
x
j =1
ij
si (i = 1,2,..., m) d j ( j = 1,2,..., n)
x
i =1
ij
All constraints must be binding It becomes relatively easy to find a basic feasible solution Simplex pivots do not involve multiplication, they reduce to additions and subtractions Therefore, it is desirable to formulate a transportation problem as a balanced transportation problem
Min s. t.
c x
i =1 j =1 n
ij ij
x
j =1
ij
= si (i = 1,2,..., m) = d j ( j = 1,2,..., n)
x
i =1
ij
d2 = 20
d s
i =1 3
j =1
= 115
= 125
s2 = 50
Plant 2 City 3 d3 = 30
s3 = 40
Plant 3
City 4
d4 = 30
Dummy 5
d5 = 10
7.2 Balancing a Transportation Problem if Total Supply is Less than Total Demand
In this case the problem has no feasible solution: demand cannot be satisfied
However, it is sometimes desirable to allow the possibility of leaving some demand unmet: (1) A penalty (cost) is often associated with the unmet demand (2) To balance the problem, add a dummy (or shortage) supply point
c11 c21 . . .
... ...
c1n c2n . . .
s1 s2 . . . sm
cm1
... ...
cmn
d1
d2
dn
13
8 10 9 45 14 10 45
6 25 12 5 9
9 13 16 30
10 35 7 50 5 40
20
30
30
Important Observation
If a set of values for the xijs satisfies all but one of the constraints of a balanced transportation problem, then the values for the xijs will automatically satisfy the other constraints.
Supply Constraints
= 45 = 20 = 30 = 30
xij 0 (i = 1,2,3; j = 1,2,3,4) Demand Constraints
7.5 Loop
Definition: An ordered sequence of at least 4 different cells is called a loop if 1. Any 2 consecutive cells lie in either the same row or same column 2. No 3 consecutive cells lie in the same row or column 3. The last cell in the sequence has a row or column in common with the first cell in the sequence Loop or Path?
Path: (1,1)-(1,2)-(2,3)-(2,1)
Loop: (2,1)-(2,4)-(4,4)-(4,1)
18
7.5 Theorem
In a balanced transportation problem with m supply points and n demand points, the cells corresponding to a set of (m + n 1) variables contain no loop iff the (m + n 1) variables yield a basic solution
This follows from the fact that a set of (m + n 1) cells contains no loop iff the (m + n 1) columns corresponding to these cells are linearly independent. Example:
Loop: (1,1)-(1,2)-(2,2)-(2,1)
4 5 3 2 4
Because (1,1)-(1,2)-(2,2)-(2,1) is a loop, the Theorem tells us that {x11, x12, x22, x21} cannot yield a bfs for this transportation problem.
19 L. Ntaimo (c) 2005 INEN420 TAMU
7.6 The Northwest Corner Method for Finding a BFS for a Balanced Transportation Problem Begin in the upper left (or northwest) corner of the transportation tableau Set x11 as large as possible. Clearly x11 = min{s1, d1}. If x11= s1, cross out row 1 of the transportation tableau; no more bvs will come from row 1. Also set d1 = d1 - s1. If x11= d1, cross out the column 1 of the transportation tableau; no more bvs will come from column 1. Also set s1 = s1 - d1. If x11= s1 = d1, cross out either row 1 or column 1 (but NOT both). If you cross out row 1, set d1 = 0. If you cross out column 1, set s1 = 0. Continue applying this procedure to the most northwest corner cell in the tableau that does not lie in a crossed-out row or column. Eventually, will come to a point where there is only one cell that can be assigned a value. Assign this cell a value equal to its row or column demand, and cross out both the cells row and column. A BFS has now been obtained.
L. Ntaimo (c) 2005 INEN420 TAMU 20
45 - 35 8 35 9
20 6
30 9
30 10 x 50 40
12
13
14
16
10
20
30
30
21
10 - 10 8 35 9 10 14
20 6
30 9
30 10 x
12
13
40
16
5 40
20
30
30
22
X 8 35 9 10 14 20
20 - 20 6
30 9
30 10 x
12
13
20
16
5 40
30
30
23
X 8 35 9 10 14 20
X 6
30 - 20 9
30 10 x
12 20 9
13
16
5 40
10
30
24
10 X
12 20
13
7 X
16
5 40 -10 30 10 x
X 6
10 -10 9
13
10 X
12 20
13
7 X
16 30
30 - 30
X 6
X 9
30 - 30 10 X 13 7 X
10 35
12 20
13
7 50
16 30 30 30
5 40
20
The coefficient of the variable xij in the tableau' s Row 0 (reduced cost) is given by cij = cBV B 1aij cij , where, cij = objective coefficient for xij , aij = column for xij in the original LP, (assuming that the first supply constraint has been dropped) BV = set of basic variables.
Since we are solving a MINIMIZATION problem, the current bfs will be optimal if the cij ' s for all the nonbasic variables are NONPOSITIVE.
Otherwise, we ENTER into the basis the nonbasic variable with the most POSITIVE cij .
28 L. Ntaimo (c) 2005 INEN420 TAMU
After determining cBV B -1 , we can easily compute cij . Because the first constraint has been dropped, will have (m + n-1) elements : cBV B 1 = [u2 u3 ... um v1 v2 ... vn ], where u2 , u3, ..., um are the elements of cBV B 1 corresponding to the m-1 supply constraints; v1 , v2 ,..., vn are the elements of cBV B 1 corresponding to the n demand constraints.
(1)
For this bfs, BV = {x11 , x21 , x22 , x23 , x33 , x34 } Applying cBV B -1aij -cij = 0 we obtain the following : (See next 2 slides)
31 L. Ntaimo (c) 2005 INEN420 TAMU
Model
0 1 Applying cBV B -1aij -cij = 0 0 0 1 0 c11 = [u2 u3 v1 v2 v3 v4 ] 8 = v1-8 = 0 c23 = [u2 u3 v1 v2 v3 v4 ] 13 = u2 + v3-13 = 0 0 0 0 1 0 0 1 0 0 1 1 0 c21 = [u2 u3 v1 v2 v3 v4 ] 9 = u2 + v1-9 = 0 [ ] c = u u v v v v 33 2 3 1 2 3 4 16 = u3 + v3-16 = 0 0 0 0 1 0 0 1 0 0 c22 = [u2 u3 v1 v2 v3 v4 ] 12 = u2 + v2 -12 = 0 1 0 0 0 1 0 c34 = [u2 u3 v1 v2 v3 v4 ] 5 = u3 + v4 -5 = 0 0 0 1
32
20 30 30 -1 We find c BV B by solving : u1 = 0, u1 + v1 = 8 u 2 + v1 = 9 u 2 + v 2 = 12 u 2 + v3 = 13 u 3 + v3 = 16 u3 + v4 = 5
L. Ntaimo (c) 2005 INEN420 TAMU
33
Because c32 is the most positive cij , we would next enter x32 into the basis. Note : Each unit of x32 that is entered into the basis will decrease Powerco' s cost by $6.
34 L. Ntaimo (c) 2005 INEN420 TAMU
For each nonbasic variable, we compute cij = ui + v j cij and obtain : c12 = 0 + 11 6 = 5
10
9 35
12 20
13
7 50
16 30 30
5 40
Because c32 is the most positive cij , we would next enter x32 into the basis.
The loop involving x32 and some of the bv' s is shown in Table 1 : (3,2) - (3,3) - (2,3) - (2,2). The odd cells in this loop are (3,3) and (2,2). Because x33 = 10 and x22 = 20, the pivot will decrease x33 and x22 by 10, and increase x32 and x23 by 10 (see Table 2)
38
10
9 35
12 10 9 30
13
16 30 30 30
5 40
Because c1 2 is the most positive cij , we would next enter x12 into the basis.
The loop involving x12 and some of the bv' s is shown in Table 2 : (1,2) - (2,2) - (2,1) - (1,1). The odd cells in this loop are (2,2) and (1,1). Because x22 = 10 is the smallest entry in an odd cell, the pivot will decrease x22 and x11 by 10, and increase x12 and x21 by 10 (see Table 3).
39
6 10 12 30 9
10
9 35
13
16 30 30 30
5 40
Because c13 is the most positive cij , we would next enter x13 into the basis.
The loop involving x13 and some of the bv' s is shown in Table 3 : (1,3) - (2,3) - (2,1) - (1,1). The odd cells in this loop are (2,3) and (1,1). Because x11 = 25 is the smallest entry in an odd cell, the pivot will decrease x23 and x11 by 25, and increase x13 and x21 by 25 (see Table 4).
40
45
20
30
30
Because all cij 0, an optimal solution has been obtained. Thus the optimal solution t o the Powerco problem is : x12 = 10, x13 = 25, x21 = 45, x23 = 5, x32 = 10, x34 = 30, and z = 6(10 ) + 10 ( 25) + 9( 45) + 13(5) + 9(10 ) + 5(30 ) = $1,020 .
41
But solutions to the transportation problem are integral. In general, if there is at most one 1 and at most one 1 in any column of the constraint matrix (unimodular constraint matrix), then every basic feasible solution is integer (so long as RHS is integral.)
7.12 A special case of the Transportation Problem: Supplies and Demands are All Equal to 1.
Supply Demand Supply Demand
0 1 2 1 1 2 1 1 0 2
1 4 1 1 1 4 1
1 1
P 1
0 1 2 1 1
2 2
T/J
4
Each person must be assigned to a task Each task has a person assigned Cost of assigning a person to a task
1
3
1 0 2
1
Formulate this as an integer program or IP.
45
Minimize
c
i =1 j =1 n
ij
xij
Each supply is 1
s.t.
x
j =1 n
ij
= 1, i = 1, , n = 1, j = 1, , n
x
i =1
ij
xij = 0 or 1, ij
Each demand is 1
x11 + x21 + x31 + x41 = 1 (Job contraints) x12 + x22 + x32 + x42 = 1 x13 + x23 + x33 + x43 = 1 x14 + x24 + x34 + x44 = 1
Ensures that each job is assigned to one machine (each job is completed)
Job 2
Job 3
Job 4
14 2 7 2
5 12 8 4
8 6 3 6
7 5 9 10
14 2 7 2
5 12 8 4
8 6 3 6
7 5 9 10
5 2 3 2
9 0 4 0
0 10 5 2
3 4 0 4
0 1 4 6
9 0 4 0
0
0 10 5 2
0
3 4 0 4
0
2 3 6 8
2
10 0 5 0
0 9 5 1
3 3 0 3
0 0 4 5
Column Minimum
Memphis
New York
Los Angeles
150
130
Denver
Chicago
Boston
200
130
Demand Total = 260
Step1. If necessary, add a dummy demand point (with a supply of 0 and a demand equal to the problems excess supply) to balance the problem. Shipments to the dummy and from a point to itself will be zero. Let s= total available supply. Step2. Construct a transportation tableau as follows: A row in the tableau will be needed for each supply point and transshipment point, and a column will be needed for each demand point and transshipment point.
130
15 12 26 25
20
0
150 200
0
Denver 0 N.Y 6 16
130
17
70
220
6 0
130
14 16 0
350
Chicago
350
References
Winston, Wayne L. and M. Venkataramanan, Introduction to Mathematical Programming, 4th Edition, Duxbury Press, Belmont, CA, 2003.
Powerco Problem Formulation Min 8 x11 + 6 x12 + 10 x13 + 9 x14 + 9 x21 + 12 x22 + 13 x23 + 7 x24 + 14 x31 + 9 x32 + 16 x33 + 5 x34 s.t. x11 + x12 + x13 + x14 35 x21 + x22 + x23 + x24 50 x31 + x32 + x33 + x34 40 x11 + x21 + x13 x12 + x22 + x32 x13 + x23 + x33 x14 + x24 + x34 u1 u2 u3 v1 v2 v3 Demand Constraints Supply Constraints
back
45 20 30 30