Part 3 Linear Programming 3.4 Transportation Problem ai amount available at origin i b j amount required at destination j xij amount to be shipped from origin i to destination j cij cost of shipping one unit from origin i to destination j The Transportation Model m n min f x cij xij i 1 j 1 s.t. n x j 1 ij m x i 1 ij ai ; i 1, 2, ,m bj ; j 1, 2, ,n xij 0; i 1, 2, m Note that , m; j 1, 2, ,n n a b . i 1 i j 1 j Thus, there are m n -1 basic variables. Theorem A transportation problem always has a solution, but there is exactly one redundant equality constraint. When any one of the equality constraints is dropped, the remaining system of n+m-1 equality constraints is linearly independent. Constraint Structure x11 x12 x1n x21 x22 x2 n xm1 xm 2 x m1 xm 2 x21 x11 x22 x12 x1n a1 a2 x2 n xmn am b1 b2 xmn bn Problem Structure a Ax r b 1T A I nn x x11 1T I nn 1T I n n x12 x1n x21 x2 n 1 1 1 n 1 1 1 1 1 a a1 a2 am ; b b1 b2 T T xm1 1 T bn T xmn T Model Parameters Since the problem structure is fixed, it is only necessary to specify a, b and c11 C cm1 c1n cmn Transformation of Standard Form of Transportation Problem into the Primal Form Given min cT x s.t. Ax b x0 We can write it in the equivalent form min cT x s.t. Ax b Ax b x0 which is in the primal form but with A coefficient matrix A Asymmetric Form of Duality z let y w b b b A A A Dual problem can be written as max y T b T T z b w b s.t. y T A cT ; y 0 or zT A w T A cT ; z 0; w 0 Let y z w max y T b s.t. y T A cT y not restricted to be nonnegative Dual Transportation Problem n m max ai ui b j v j j 1 i 1 s.t. ui v j cij i 1, 2, , m; j 1, 2, ui and v j unbounded ,n Interpretation of the Dual Transportation Problem Let us imagine an entrepreneur who, feeling that he can ship more efficiently, come to the manufacturer with the offer to buy his product at origins and sell it at the destinations. The entrepreneur must pay -u1, -u2, …, -um for the product at the m origins and then receive v1, v2, …, vn at the n destinations. To be competitive with the usual transportation modes, his prices must satisfy ui+vj<=cij for all ij, since ui+vj represents the net amount the manufacturer must pay to sell a unit of product at origin i and but it back again at the destination j. Example D1 D2 12 O1 x11 3 x12 7 O2 O3 Amount required D3 x21 x13 x22 8 D4 8 4 4 a1=7 x14 6 x23 7 Amount Available 9 x24 3 6 x31 x32 x33 x34 b1=4 b2=8 b3=11 b4=6 a2=10 a3=12 min 12 x11 3x12 8 x13 4 x14 7 x21 4 x22 6 x23 9 x24 8 x31 7 x32 3x33 6 x34 s.t. x11 x12 x13 x14 x21 x22 x23 x24 x22 x12 i 1, 2, 3 j 1, 2, 3, 4 x33 x34 12 4 8 11 x34 x33 x24 x14 x32 x32 x23 x13 xij 0 10 x31 x31 x21 x11 7 6 Solution Procedure • Step 1: Set up the solution table. • Step 2: “Northwest Corner Rule” – when a cell is selected for assignment, the maximum possible value must be assigned in order to have a basic feasible solution for the primal problem. Northwest Corner Rule 12 4 3 8 4 7 3 7 4 5 6 10 5 8 7 3 6 4 9 8 6 6 11 6 12 Triangular Matrix • Definition: A nonsingular square matrix M is said to be triangular if by a permutation of its rows and columns it can be put in the form of a lower triangular matrix. • Clearly a nonsingular lower triangular matrix is triangular according to the above definition. A nonsingular upper triangular matrix is also triangular, since by reversing the order of its rows and columns it becomes lower triangular. How to determine if a given matrix is triangular? 1. Find a row with exactly one nonzero entry. 2. Form a submatrix of the matrix used in Step 1 by crossing out the row found in Step 1 and the column corresponding to the nonzero entry in that row. Return to step 1 with this submatrix. If this procedure can be continued until all rows have been eliminated, then the matrix is triangular. The importance of triangularity is the associated method of back substitution in solving Mx d and M yc T Basis Triangularity • Basis Triangularity Theorem: Every basis of the transportation problem is triangular. Given a basis B, the simplex multipliers y can be founc by y T B = cTB or BT y = c B u where y = v If xij is basic, then the corresponding column in A will be included in B. This column has exactly two 1 entries: (i) ith position of the top portion (ii) jth position of the bttom portion. ui v j cij Step 3: Find a basic feasible solution of the dual problem – initial guess This step is done by testing if the corresponding simplex multipliers are feasible in the dual problem. Notice that y T B cTB . Thus, to one of the constraints u1 v1 12 Due in the primal problem is redundant! u1 v2 3 7 variables u2 v2 4 6 equations u2 v3 6 set u1 0 u3 v3 3 u3 v4 6 u2 1 u3 2 v1 12 v2 3 v3 5 v4 8 Step 3 v1=12 u1 = 0 u2 = 1 u3 = -2 12 4 v2=3 v3=5 v4=8 12 3 3 3 5 7 4 VIOLATION 5 4 6 5 6 9 7 3 OK 6 3 6 6 OK 13 10 8 1 VIOLATION 4 8 8 8 4 VIOLATION 9 10 OK 11 7 6 12 6 Cycle of Change v1 v2 v3 v4 u1 -1 c11 +1 c12 x11 x12 0 u2 c23 +1 c21 -1 c22 0 x22 x23 0 c31 u3 0 a1 c24 a2 c33 x33 b2 c14 0 c32 0 b1 c13 b3 c34 x34 b4 a3 Selection of the New Basic Variable The change in the objective function of primal problem is f c21 c11 c12 c22 c21 u1 v1 u1 v2 u2 v2 c21 u2 v1 Thus, if c21 u2 v1 a. Constraint of the dual problem is satisfied. b. Objective function of the primal problem cannot be reduced. if c21 u2 v1 a. Constraint of the dual problem is violated. b. Objective function of the primal problem can be reduced. Step 4: Find a basic feasible solution of the dual problem – Loop identification Loop 1: 21 11 12 22 21 u2 v1 c21 13 7 6 -f 4 6 24 Loop 2: 14 34 33 23 22 12 14 u1 v4 c14 8 4 4 -f 3 4 12 Loop 3: 31 11 12 22 23 33 31 u3 v1 c31 10 8 2 -f 4 2 8 Step 4: Move 4 unit around loop 1 v1=6 v2=3 v3=5 v4=8 u1 = 0 6 0 12 3 7 3 5 0 8 8 0 4 u2 = 1 7 4 7 4 1 4 6 5 6 9 0 9 u3 = -2 4 0 8 1 0 7 3 6 3 6 6 6 4 8 11 7 10 12 6 Repeat Step 3 u1 v2 3 v2 3 u2 v1 7 u2 1 u2 v2 4 v1 6 u1 0 u2 v3 6 v 5 3 u3 2 u3 v3 3 u3 v4 6 v4 8 Violation: Cell 14 Repeat Step 4: Move 5 unit around the loop v1=6 v2=3 v3=1 v4=4 12 3 2 3 5 0 8 8 5 4 u1 = 0 6 0 7 4 6 4 6 0 6 9 0 9 u2 = 1 7 4 u3 = 2 4 0 8 1 0 7 3 11 3 6 1 6 4 8 11 NO VIOLATION!!! 7 10 6 12 Solution x11 x13 x23 x24 x31 x32 0 x12 2; x14 5; x21 4; x22 6; x33 11; x34 1 f * 3 2 4 5 7 4 4 6 3 11 6 1 117 g * 7 0 10 1 12 2 4 6 8 3 11 1 6 4 =117 Application – Minimum Utility Consumption Rates and Pinch Points Cerda, J., and Westerberg, A. W., “Synthesizing Heat Exchanger Networks Having Restricted Stream/Stream Matches Using Transportation Formulation,” Chemical Engineering Science, 38, 10, pp. 1723 – 1740 (1983). Example - Given Data Temperature Partition Definitions csik cold stream i in interval k ; hs jl hot stream j in interval l ; aik the heat needed by csik ; b jl the heat available from hs jl ; qikjl the heat transferred from hs jl to csik . Transportation Formulation C L H L min cikjl qikjl qikjl i 1 k 1 j 1 l 1 s.t. H L q j 1 l 1 C ikjl L q i=1 k 1 ikjl i 1, 2, , C aik ; k 1, 2, , L b jl ; j 1, 2, , H l 1, 2, , L qikjl 0 for all i, j, k and l Cost Coefficients cikjl 0 for i and j are both process streams and match is allowed (i.e. k l ); 0 for i and j are both utility streams (i C , j H ); 1 only i or j is a unitlity stream; M otherwise, where M is very large (think infinity) number. Additional Constraints H 1 L aCL b jl j 1 l 1 C 1 L bHL aik i 1 k 1 C 1 L H 1 L aCL aik bHL b jl i 1 k 1 j 1 l 1 Solution