Transportation and Assignment Problems Transportation Problem TP Revisited
Transportation and Assignment Problems ØTransportation Problem (TP) Revisited Shipping company m origins, n destinations cij – cost of shipping one unit of goods from origin i to destination j ai – units available at origin i, i=1, …, m bj – units required at destination j, j=1, …, n
Transportation Problem Ø Transportation Problem (TP) Schematic 1 (c 11, x 11) 1 (cm 1, xm 1) 2 2 (c 1 n, x 1 n) m n (cmn, xmn)
Transportation Problem Formulation Objective – To determine xij – number of units of goods shipped from origin i to destination j, that minimizes total shipping cost Minimize Subject to (Supply constraints) (Demand constraints) (Non-negativity)
Transportation Problem: A Typical Example: Automobile company Plants – NDL, LKO, BLR Distribution Centres – JPR, HBD Transportation Cost JPR (1) HBD (2) Plant Capacity NDL (1) 50 300 1000 LKO (2) 100 250 1500 BLR (3) 500 125 1200 Demands 2300 1400
Transportation Problem: A Typical Example Minimize Z = 50 x 11 + 300 x 12 + 100 x 21 + 250 x 22 + 500 x 31 + 125 x 32 Subject to x 11 + x 12 = 1000 x 21 + x 22 = 1500 x 31 + x 32 = 1200 x 11 + x 21 + x 12 + xij 0, i, j x 31 x 22 = 2300 = 1400
Main Elements of a Transportation Problem ØMain Elements § Sources § Destinations § Cost and supply/demand data § Special structure of coefficients 111 111 1 1 1 1 è Integer BFS Supply Constraints Demand Constraints
Dual of a Transportation Problem Maximize (1) Subject to (2) ui, vj unrestricted in sign ui – marginal value of increasing supply at ith origin by 1 unit vj – marginal value of increasing demand at jth destination by 1 unit
Economic Interpretation of Dual Shipping company proposes to producer (faced with primal problem) to remove a unit from origin i at a price ui per unit and deliver it at destination j at a price vj per unit. Dual constraint (2) ensures that the prices are “competitive” Therefore, shipping company, if knows ai and bj’s, then interested in setting ui and vj’s to maximize total return (1)
Transportation Simplex Method: General Approach Step 1: Determine initial BFS Step 2: OPTIMAL? Yes – STOP, No – Go to 3 Step 3: Determine entering variable (from non-basics) Step 4: Determine leaving variable (from current basic variables), Go to Step 2
Transportation Simplex Tableau B Source Destination NB c 11 x 11 cij ui+vj-cij Demand ui & vj associated dual variables Supply
Theoretical Results Theoretical Result 1 xij * (ui + vj - cij ) = 0 For Basic variables xij > 0 ui + vj - cij = 0 (Not shown in the table) Non Basic variables xij = 0 ui + vj - cij ≠ 0 (Calculated) Theoretical Result 2 (ui + vj - cij) is equivalent to reduced cost coefficients of simplex method TS tableau sufficient to carry out all calculations of simplex.
Example Problem 2 3 4 Supply 1 1 2 2 2 1 3 2 10 8 5 4 7 3 7 6 6 8 5 Demand 4 3 4 4
Transportation Simplex Method Step 1: Initial BFS General rule : (A) Allocate the amount = min(S, D) to a cell (basic variable) according to “some” criterion (NWC, VAM) (B) Eliminate the corresponding row and column (C) If only one row/col remains, allocate to “all” the corresponding columns/rows and STOP. ELSE go to Step a Note Number of basic variables = n+m-1, since one constraint redundant
Transportation Simplex Method Step 1: Alternative Criteria for Sub-Step A NW Corner Rule: a) Begin by selecting x 11 (N-W corner of table) b) IF last variable selected xij AND source i has any supply remaining select xi, THEN select next variable as xi, j+1 (1 column to right) ELSE select xi+1, j (1 row down) c) STOP at S-E corner.
Transportation Simplex Method 3 1 3 3 1 4 Total cost = 3 * 2 + 1 * 10 + 3 * 8 + 3 * 5 + 1 * 6 + 4 * 8 = 93 Not necessarily a good starting solution since no concept of costs
Vogel’s Approximation Method (VAM) (a) For each row/column remaining, evaluate a penalty = difference between the smallest and next-to-the-smallest unit cost still remaining. (b) Identify row/column with maximum penalty – Break ties arbitrarily. Allocate as much as possible to variable with “least cost” in the selected row/column, adjust S/D, and cross out the satisfied row/column (If simultaneously satisfied, only one crossed out). (c) IF exactly one row or column remain uncrossed, do the remaining allocation and STOP, ELSE recompute penalties for uncrossed row/columns and GO TO Step b.
Vogel’s Approximation Method (VAM) 2 2 2 1 8 5 4 3 10 3 7 6 1 6 3 4 8 1 Total cost by VAM = 68
Least Cost Method (a) For each row/column remaining, identify the least cost cell. (b) Break ties arbitrarily. Allocate as much as possible to variable with least cost in the selected row/column, adjust S/D, and cross out the satisfied row/column (If simultaneously satisfied, only one crossed out). (c) IF exactly one row or column remain uncrossed, do the remaining allocation and STOP, ELSE GO TO Step 2.
Least Cost Method 2 2 2 1 3 10 8 5 2 7 4 6 2 4 6 3 Total cost by LCM = 79 1 8
Summary of Alternative Rules Ø NWC: -- quick & easy -- far from optimality no attention to costs Ø VAM: -- popular -- penalty has intuitive appeal (minimum extra unit cost for failing to make an allocation to cell having smallest unit cost) Ø LCM: -- Mid-way between NWC and VAM
Step 2: Optimality Test BFS is optimal if ui + vj – cij ≤ 0 (since minimization problem) If xij basic ui + vj = cij Calculate ui and vj # of Basic variables = m+n-1 # of unknowns (ui and vj) = m+n Set one of ui’s or vj’s = 0 Calculate rest for each basic variable by setting ui + vj = cij For NB calculate ui + vj - cij
Step 3: Entering Variable LCM Rule for starting BFS 2 2 2 10 8 5 2 7 4 4 6 2 1 3 6 3 1 8
Step 3: Entering Variable x 14: u 1 + v 4 = 1 x 21: u 2 + v 1 = 10 x 23: u 2 + v 3 = 5 x 24: u 2 + v 4 = 4 x 31: u 3 + v 1 = 7 x 32: u 3 + v 2 = 6 u 1 = 0 v 4 = 1, u 2 = 3, v 1 = 7, v 3 = 2, u 3 = 0, v 2 = 6 Non basics z 11 = u 1 + v 1 - c 11 = 0 + 7 – 2 = 5 Similarly, z 12 = 4, z 13 = 0, z 22 = 1, z 33 = - 4, z 34 = - 7 x 11 is entering variable
Step 4: Leaving Variable Equivalent to feasibility condition in Simplex No need for explicit ratios as constraint coefficients are l For minimum ratio rule construct a “closed loop” with vertical and horizontal segments. End-points are basic variables except entering variables (non-basic) One unique loop for a given BFS If entering variable (x 11) increased by one unit, then decreases 1 from various variables of the loop to maintain feasibility (+) and (-) Leaving variable of smallest value from (-)’s (x 21) Equivalent to minimum ratio rule
Step 4: Leaving Variable 2 2 2 1 ** (++) 3 (--) 5 10 4 8 0 5 2 (--) New Tableau 4 4 1 (++) 1 7 6 2 6 8 3 -4 2 2 2 -7 1 2 10 1 8 5 4 4 7 6 2 6 3 3 8
Iteration: Entering Variable x 11: u 1 + v 1 = 2 x 14: u 1 + v 4 = 1 x 23: u 2 + v 3 = 5 x 24: u 2 + v 4 = 4 x 31: u 3 + v 1 = 7 x 32: u 3 + v 2 = 6 u 1 = 0 v 1 = 2, v 4 = 1, u 3 = 5, v 2 = 1, u 2 = 3, v 3 = 2 Non basics z 12 = u 1 + v 2 - c 12 = 0 + 1 – 2 = -1 Similarly, z 13 = 0, z 21 = -5, z 22 = - 4, z 33 = 1, z 34 = -2 x 33 is entering variable
Iteration: New Tableau 2 2 2 1 2 (++) 1 (--) -1 10 8 0 5 4 4 (--) -5 7 -4 6 2 (--) 3 (++) 6 3 8 ** (++) 1 Leaving variable of smallest value from (-)’s (x 14) -2
Iteration: New Tableau 2 2 2 1 8 5 4 3 10 3 7 6 1 6 3 4 8 1
Iteration: Optimality Test x 11: u 1 + v 1 = 2 x 23: u 2 + v 3 = 5 x 24: u 2 + v 4 = 4 x 31: u 3 + v 1 = 7 x 32: u 3 + v 2 = 6 x 33: u 3 + v 3 = 6 u 1 = 0 v 1 = 2, v 4 = 0, u 3 = 5, v 2 = 1, u 2 = 4, v 3 = 1 Non basics z 12 = u 1 + v 2 - c 12 = 0 + 1 – 2 = -1 Similarly, z 13 = -1, z 14 = -1, z 21 = -4, z 22 = -3, z 34 = -3 Optimal since all ui + vj - cij ≤ 0, Total cost = 68 (Note that we could have achieved this solution in 1 st iteration by VAM)
Another Example 1 2 3 4 Supply 1 10 0 20 11 15 2 12 7 9 20 25 3 0 14 16 18 5 Demand 5 15 15 10
NWC Rule for Starting B. F. S. 10 0 5 12 20 11 9 20 10 7 5 0 14 15 16 5 18 5
Iteration: Entering Variable x 11: u 1 + v 1 = 10 x 12: u 1 + v 2 = 0 x 22: u 2 + v 2 = 7 x 23: u 2 + v 3 = 9 x 24: u 2 + v 4 = 20 x 34: u 3 + v 4 = 18 u 1 =0 v 1 =10, v 2 = 0, u 2 = 7, v 3 = 2, v 4 = 13, u 3 = 5 Non basics z 13 = u 1 + v 3 - c 13 = 0 + 2 – 20 = - 18 Similarly, z 14 = 2, z 21 = 5, z 31 = 15, z 32 = - 9, z 33 = - 9 x 31 is entering variable.
Iteration: New Tableau Degenerate solution, Total cost = 335
Leaving Variable Calculate ui and vj for basic variables (ui + vj - cij) for non-basic variables x 21 entering
Final Optimal Solution Optimal since all ui + vj - cij ≤ 0, Total cost = 315
Special Cases of Transportation Problem (i) For feasibility, Total Supply = Total Demand Balanced TP If not Unbalanced TP Add a “dummy” source or destination If Total Supply (S) > Total Demand (D), Dummy destination whose demand is = S – D and cost of supply from any supply node to that dummy demand node = 0, so that first excess supply is considered Similarly, if D > S, then add a dummy supply node whose supply is = D - S and cost of supplying goods from that dummy supply node to any demand node = 0, so that first excess demand is considered.
Special Cases of Transportation Problem (ii) Infeasible allocations: Assign high cost M to the infeasible cell (iii) Degeneracy: A basic variable assumes a value of zero (iv) Maximization problem: Entering and optimality criterion are reversed
Assignment Problem Assign m jobs to n machines Each job to be processed on one machine Each machine to process exactly one job Decision variable cij = cost incurred if xij = 1 Objective minimize total cost (Assume m=n, if m<n or vice-versa, introduce dummy variables)
Assignment Problem: Formulation
Assignment Problem Basically, a transportation problem Jobs = Sources Machines = Destinations Supply = Demand = 1 Solving Assignment Problem: Hungarian Method Theoretical Result – Optimal solution of the assignment model remains the same if a constant is added/subtracted to any row/column of cost matrix.
Assignment Problem: Proof of Theoretical Result
Assignment Problem: An Illustration
Assignment Problem: An Illustration
Assignment Problem: An Illustration
Assignment Problem: An Illustration
Assignment Problem: An Illustration
- Slides: 46