VIEWS: 6 PAGES: 34 POSTED ON: 9/12/2012 Public Domain
MSci 331- Transportation Problem Selvaprabu Nadarajah Department of Management Sciences, University of Waterloo G.B. Dantzig “most practical planning problems could be reformulated as a system of linear inequalities.” “ground rules for selecting good plans by general objective functions.” Expectations • What skills should you expect to learn? – Understand the practical relevance of the transportation problem – Formulate a LP model for the problem – Solve the resulting model Transportation Problem a1 b1 a2 b2 Supplies Demand Available requirements bn a3 Snow Shovelling S1 D1 S2 D2 Snow affected Snow dumping sites areas D3 S3 Distribution P1 C1 P2 C2 Plants Customers C3 P3 LP Formulation • Decision Variables – Number of units shipped from i warehouse to customer j • Objective – Minimize total transportation cost • Constraints – Supply is not exceeded – Demand is satisfied LP contd... Let X ij be the number of units shipped from plant i to customer j Min C i j ij X ij s.t. X j ij Si i (1) X i ij Dj j (2) X ij 0 i, j (3) Assumptions • Demand and Supply Each supplier (source) has a fixed supply that must be distributed and each customer (sink) has a demand that must be satisfied. • Feasibility Property A feasible solution exists only if total supply equals demand (i.e. the problem is “Balanced”) • Objective/Cost The cost is the unit distribution cost times the number of units shipped (i.e. linear function) Balanced Problem • A problem is balanced when total demand equals total supply S D i i j j • In real-life problems supply is usually not equal to demand. Solution? Balancing • If total supply exceeds demand, then add a dummy/fictitious demand point, with its demand equal to the surplus supply • If total demand exceeds supply, then add a dummy/fictitious supply point, with its supply equal to the surplus demand. • Cost associated with dummy points is zero Balancing Example Excess Demand Customer 1 Customer 2 Customer 3 Supply Plant 1 $75 $60 $69 50 Plant 2 $79 $73 $68 100 Plant 3 $85 $76 $70 50 Dummy plant 4 $0 $0 $0 70 Demand 80 90 100 270 Transportation Tableau v1 v2 v3 Supply 50 u1 x11 x12 x13 75 60 69 100 u2 x21 x22 x23 79 73 68 50 u3 x31 x32 x33 85 76 70 70 u4 x41 x42 x43 0 0 0 Demand 80 90 100 xij Flow from i to j ui Dual value for supply i vj Dual value for supply j Transportation Simplex 1. If the problem is unbalanced, balance it. Setup the transportation tableau 2. Find a basic feasible solution 3. Set vlast 0 and determine u i ’s and v ’s such that j ui v j cij for all basic variables. 4. If the reduced cost cij ui v j 0 for all non-basic variables (minimization problem), then the current BFS is optimal. Stop! Else, enter variable with most negative reduced cost 5. Using the new BFS, repeat steps 2 and 3 Step 2: Northwest corner rule v3 Supply v1 v2 50 u1 50 75 60 69 u2 70 100 70 30 79 73 68 u3 20 30 50 30 85 76 70 u4 70 70 0 0 0 Demand 80 90 100 30 20 70 Northwest Solution v3 Supply v1 v2 50 u1 50 75 60 69 u2 100 30 70 79 73 68 30 50 u3 20 85 76 70 u4 70 70 0 0 0 Demand 80 90 100 Question 1 Assume there are m supply points and n demand points, how many allocations (non-zero entries) will be present in a basic feasible solution (BFS)? – Is it m + n? – Correct answer: m + n – 1, since the problem is balanced Question 2 How can units take non-integer values? – If the demand and supply are integer, the solution to the transportation problem is always integer feasible – why? The constraint matrix is Unimodular Transportation Simplex Roadmap 1. If the problem is unbalanced, balance it. Setup the transportation tableau 2. Find a basic feasible solution : Northwest Corner Rule 3. Set vlast 0 and determine u i ’s and v ’s such that j ui v j cij for all basic variables. 4. If the reduced cost cij ui v j 0 for all non-basic variables, then the current BFS is optimal. Else enter variable with most negative reduced cost 5. Using the new BFS, repeat steps 2 and 3 Step 3: Finding Dual Values • We know that the number of equations (m +n - 1) is one less than the number of dual variables (m + n) • Set a variable to zero,vlast 0 and solve to determine u i ’s and v ’s such that ui v j cij for all basic j variables Example v1 12 v2 6 v3 0 Supply 50 u1 63 50 75 60 69 100 u 2 67 30 70 79 73 68 30 50 u3 70 20 85 76 70 70 70 u4 0 0 0 0 Demand 80 90 100 Transportation Simplex Roadmap 1. If the problem is unbalanced, balance it. Setup the transportation tableau 2. Find a basic feasible solution : Northwest Corner Rule 3. Set vlast 0 and determine u i ’s and v ’s such that j ui v j cij for all basic variables. 4. If the reduced cost cij ui v j 0 for all non-basic variables, then the current BFS is optimal. Else enter variable with most negative reduced cost 5. Using the new BFS, repeat steps 2 and 3 Step 4: Entering Variable 1. Compute the reduced cost of non-basic variables cij cij (ui v j ) 2. Enter variable with the most negative reduced cost v1 12 v2 6 v3 0 Supply -9 6 50 u1 63 50 75 60 69 70 1 100 u 2 67 30 79 73 68 u3 70 3 20 30 50 85 76 70 u 4 0 -12 -6 70 70 0 0 0 Demand 80 90 100 Pivoting by finding a loop: Rules Definition: An ordered sequence of at least four different cells is called a loop if: 1. It starts at the entering-variable cell 2. Any two consecutive cells lie in either the same row or the same column. 3. No three consecutive cells lie in the same row or column. 4. The last cell in the sequence has a row or a column in common with the first cell in the sequence. 5. Except for the entering-variable cell all corners of the loops must coincide with a basic variable Finding a loop v1 12 v2 6 v3 0 Supply -9 6 50 u1 63 50 75 60 69 u 2 67 30 - 70 + 1 100 79 73 68 u3 70 3 20 - 30 + 50 85 76 70 u 4 0 -12 + -6 70 - 70 0 0 0 Demand 80 90 100 = 20 New BFS Supply v1 v2 v3 50 u1 50 75 60 69 u2 10 90 100 79 73 68 50 u3 50 85 76 70 u4 20 50 70 0 0 0 Demand 80 90 100 Transportation Simplex Roadmap 1. If the problem is unbalanced, balance it. Setup the transportation tableau 2. Find a basic feasible solution : Northwest Corner Rule 3. Set vlast 0 and determine u i ’s and v ’s such that j ui v j cij for all basic variables. 4. If the reduced cost cij ui v j 0 for all non-basic variables, then the current BFS is optimal. Else enter variable with most negative reduced cost 5. Using the new BFS, repeat steps 2 and 3 Iteration 2 v1 0 v2 6 v3 0 Supply -9 -6 50 u1 75 50 75 60 69 u 2 79 10 - 90 -11 + 100 79 73 68 u3 70 15 12 50 50 85 76 70 u4 0 20 + 6 50 - 70 0 0 0 Demand 80 90 100 = 10 Iteration 3 v1 0 v2 5 v3 0 Supply u1 75 50 - -20 + -6 50 75 60 69 u 2 68 11 90 - 10 + 100 79 73 68 u3 70 15 6 50 50 85 76 70 u4 0 30 + -5 40 - 70 0 0 0 Demand 80 90 100 = 40 Iteration 4 v1 20 v2 5 v3 0 Supply 14 50 u1 55 10 40 75 60 69 u 2 68 -9 50 50 100 79 73 68 u3 70 -5 1 50 50 85 76 70 u 4 20 70 15 -20 70 0 0 0 Demand 80 90 100 Iteration 5 v1 11 v2 5 v3 0 Supply 50 u1 55 9 50 14 75 60 69 u 2 68 10 40 50 100 79 73 68 u3 70 4 1 50 50 85 76 70 u 4 11 70 15 11 70 0 0 0 Demand 80 90 100 All reduced costs are positive. Optimal solution reached. Stop!! Assignment Problem M1 J1 M2 J2 Machines Jobs J3 M3 Assignment and Transportation • Assignment problem is a special case of the transportation problem • Each demand and supply equals 1 Min C i j ij X ij s.t. X j ij 1 i (1) X i ij 1 j (2) X ij 0 i, j (3)