650 likes | 824 Views
Chapter 7. Transportation, Assignment & Transshipment Problems. The transportation model (TM), in general, deals with the determination of a minimum cost plan for transporting a single commodity from a number of sources (e.g., factories) to a number of destinations (e.g., warehouses).
E N D
Chapter 7 Transportation, Assignment & Transshipment Problems
The transportation model (TM), in general, deals with the determination of a minimum cost planfor transporting a single commodity from a number of sources (e.g., factories) to a number of destinations (e.g., warehouses). • The model can be extended in a direct manner to cover practical situations in the areas of inventory control, employment scheduling, personnel assignment, cash flow, scheduling dam reservoir levels, and many others. • TM is basically an LP that can be solved by the regular simplex method. However, its special structure allows the development of a solution procedure, called the transportation technique, that is computationally more efficient.
7.1 Formulating Transportation Problems • A transportation problem basically deals with the problem, which aims to find the best way to fulfill the demand of ndemand points (destinations) using the capacities of msupply points (sources). • While trying to find the best way, generally a variable cost of shipping the product from one supply point to a demand point or a similar constraint should be taken into consideration.
Example 1: Powerco Formulation • Powerco has • three electric power plants • that supply the electric needs of four cities. • The associated • supply of each plant, • demand of each city, and • cost of sending 1 million kwh of electricity from a plant to a city (depends on the distance the electricity must travel) are given in the table 1 (next slide).
Ex. 1 - continued • Formulate an LP to minimize the cost of meeting each city’s peak power demand. Table 1. Shipping costs, supply and demand for Powerco
Graphical representation of Powerco problem(with supply and demand points connected) Demand points Supply points City 1 d1=45 $8 Plant 1 $6 s1=35 $4 $9 City 2 d1=20 Plant 2 s2=50 City 3 d1=30 Plant 3 s3=40 City 4 d1=30
Example 1: Solution • Decision Variables • Powerco must determine how much power is sent from each plant to each city so • xij = Amount of electricity produced at plant i and sent to city j • Example: x14 = number of (million) kwh produced at plant 1 and sent to city 4 • Constraints • A supply constraint ensures that the total quantity produced does not exceed plant capacity. Each plant is a supply point. • A demand constraint ensures that a location receives its demand. Each city is a demand point. • Since a negative amount of electricity can not be shipped all xij’s must be non negative.
Demand points Supply points City 1 d1=45 x11 Plant 1 x12 s1=35 x13 x14 City 2 d1=20 x21 x22 Plant 2 X23 s2=50 x24 City 3 d1=30 x31 x32 x33 Plant 3 s3=40 x34 City 4 d1=30 Graphical representation of Powerco problem(with power distribution for each city) $8 $6 $4 $9
Ex. 1 – Solution (con’t) • LP Formulation of Powerco’s Problem min z = 8x11+6x12+10x13+9x14 (cost of shipping power from plant 1) +9x21+12x22+13x23+7x24 (Cost of shipping power from plant 2) +14x31+9x32+16x33+5x34 (Cost of shipping power from plant 3) s.t. x11+x12+x13+x14 35 (Plant 1 supply constraint) (Supply Constraints) x21+x22+x23+x24 50 (Plant 2 supply constraint) x31+x32+x33+x34 40 (Plant 3 supply constraint) x11+x21+x31 45 (City 1 demand constraint) (Demand Constraints) x12+x22+x32 20 (City 2 demand constraint) x13+x23+x33 30 (City 3 demand constraint) x14+x24+x34 30 (City 4 demand constraint) xij 0 (i= 1,2,3; j= 1,2,3,4)
Demand points Supply points City 1 d1=45 x11=0 Plant 1 x12=10 s1=35 x13=25 x14=0 City 2 d2=20 x21=45 x22=0 Plant 2 X23=5 s2=50 x24=0 City 3 d3=30 x31=0 x32=10 x33=0 Plant 3 s3=40 x34=30 City 4 d4=30 Graphical representation of Powerco problemwith its optimal solution
General description of a transportation problem • In general, a transportation problem is specified by the following information: • A set of m supply points from which a good is shipped. Supply point i can supply at most si units. • A set of n demand points to which the good is shipped. Demand point j must receive at least di units of the shipped good. • Each unit produced at supply point i and shipped to demand point j incurs a variable cost of cij.
xij = number of units shipped from supply point i to demand point j = = j n i m å å c X (max or) min ij ij = = 1 1 i j = j n å £ = s . t . X s ( i 1 , 2 ,..., m ) ij i = 1 j = i m å ³ = X d ( j 1 , 2 ,..., n ) ij j = 1 i ³ = = x 0 ( i 1 , 2 ,..., m ; j 1 , 2 ,..., n ) ij
If then total supply equals to total demand, the problem is said to be a balanced transportation problem. • Example: for the Powerco problem: total supply=total demand it is a balanced transportation problem
A transportation problem is specified by the supply, the demand, and the shipping costs. This data can be summarized in a transportation tableau. The square, or cell, in rowi and columnj of a transportation tableau corresponds to the variable xij Transportation tableau Supply s1 s2 sm Demandd1 d2 … dn
Example: Transportation tableau for Powerco with its optimal solution. Supply 35 50 40 Demand 45 20 30 30
Balancing a transportation problem • If total supply exceeds total demand, we can balance the problem by adding a dummy demand point (=unused supply capacity = the amount of excess supply). • Since shipments to the dummy demand point are not real, they are assigned a cost of zero. • If a transportation problem has a total supply that is strictly less than total demand, the problem has no feasible solution. • No doubt that in such a case one or more of the demand will be left unmet. • Generally in such situations a penalty cost is often associated with unmet demand and as one can guess the total penalty cost is desired to be minimum.
7.2 Finding Basic Feasible Solutions for Transportation Problems • Unlike other Linear Programming problems, a balanced transportation problem with m supply points and n demand points is easier to solve, although it has m + n equality constraints. • The reason for that is, if a set of decision variables (xij’s) satisfy all but one constraint of a balanced transportation problem, then the values for the xij’s will satisfy that remaining constraint automatically.
Example: Powerco • Suppose a set of values for the xij satisfy allthe constraints except the first supply constraint. • Then this set of xij’smust • supply d1+d2+d3+d4 =125 million kwh to cities 1-4 and supply s2+s3=125-s1=90 million kwh from plant 2 and 3. • Thus, plant 1 must supply 125–(125-s1)=35 mi. kwh So the xij’s must also satisfy the first supply constraint. • When we solve a balanced TP, we may omit from consideration any one of problem’s constraints and solve an LP having m+n-1 variables.
Finding a bfs to the remaining m+n-1 constraints • A loop may be used to determine whether an arbitrary set of m+n-1 variables gives a basic solution to the balanced transportation problem. • Definition: An ordered sequence of at least four different cells is called a loop if • Any two consecutive cells lie in either the same row or same column • No three consecutive cells lie in the same row or column • The last cell in the sequence has a row or column with the first cell in the sequence (a closed path)
Loops EX. 1 Loop: (1,1)-(1,4)-(4,4)-(3,1) Loop: (1,1)-(1,2)-(2,2)-(2,3)-(4,3)-(4,5)-(3,5)-(3,1) EX. 2 Not a loop: Because (1,2), (1,3) and(1,4) all lie in the same row. Not a loop: Because (1,2) and (2,3) do not lie in the same row or column.
Theorem 1. 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 if and only if the m+n-1 variables yield a basic solution. • Example 1: Because (1,1)-(1,4)-(4,4)-(3,1) is a loop {x11, x14, x44, x31} cannot yield a basic solution. • Example 2:Because (1,1)-(1,2)-(2,3)-(2,2) isnot a loop {x11, x12, x23, x22} will yield a basic solution.
There are three basic methods to find the bfs for a balanced TP • Northwest Corner Method • Minimum Cost Method • Vogel’s Method
Northwest Corner Method for Finding a Basic Feasible Solution • Begin in the upper left (northwest) corner of the transportation tableau and set x11 as large as possible. X11 can clearly be no larger than the smaller of s1and d1 (X11= min{s1, d1}). • If x11=s1,cross out the row1 of the transportation table; this indicates that no more basic variables will come from column 1. Also change s1 to 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 cell in the tableau that does not lie in a crossed-out row or column. Eventually, there will be only one cell that can be assigned a value. • Assign this last cell a value equal to its row or column demand, and cross out both cell’s row and column. • A bfs has now been obtained.
Set x11=min {5,2}=2=d1 cross out column 1 set s1=5-2=3 Example for NWC Method NWC S 5 1 3 • Current most NW corner:x12 Set x12=min {3,4}=3 cross out row 1 and set d2=4-3=1 S X 1 3 D 2 4 2 1 DX1 2 1 S 3 1 3 • Current most NW corner:x22 Set x22=min {1,1}= 1 • cross out either row 2 or column 2: arbitrraily cross out row 2, and set d2 =1-1=0 DX 4 2 1
S X X 3 • Current most NW corner:x33 Set x33 =min {3,2}= 2 • cross out column 3 and set s3=3-2=1 S X X 1 DX0 2 1 • Current most NW corner:x32 Set x32=min {3,0}= 0 • cross out column 2 and set s3=3-0=3 DXXX1 S X X 3 • The only cell remaining:x34 Set x34 =min {1,1}= 1 • cross out the row 3 and column 4 • There is no cell left. It is finished. We have obtained the bfs. DXX 2 1
The bfs: x11=2, x12=3, x22=1, x32=0, x33=2, x34=1. • To complete the NWC method, m+n rows and columns must be crossed out. The last variable assigneed a value results in a row and column being crossed out, so the NWC method will assign values to m+n-1 variables. • The variables selected by NWC method cannot form a loop; so Theorem 1 implies that the NWC method must give a bfs.
Minimum-Cost Method for Finding a Basic Feasible Solution • The northwest corner method does not utilize shipping costs. It can yield an initial bfs easily but the total shipping cost may be very high. • The minimum cost method uses shipping costs in order come up with a bfs that has a lower cost. • To find the bfs by the Minimum Cost Method: • Find the decision variable with the smallest shipping cost (xij). Then assign xij its largest possible value, which is the minimum of si and dj (xij = min {si, dj}). • Next, as in the Northwest Corner Method cross out row ior column j and reduce the supply or demand of the noncrossed-out row or column by the value of xij.
Choose the cell with the minimum cost of shipping from the cells that do not lie in a crossed-out row or column and repeat the procedure. • Continue until there is only one cell that can be selected. In this case, cross out both the cell´s row and column. A bfs has now been obtained.
Consider the following balanced transportation problem Variable with min cost: x22 Set x22 =min {10,8}= 8 cross out column 2 and set s2=10-8=2 Variable with min cost: x11 orx21 Select x21 (arbitrarily) Set x21 =min {2,12}= 2 cross out row 2 and set d1=12-2=10 Example for Minimum-Cost method S 5 2 15 S 5 10 15 D 12 X 4 6 D 12 8 4 6
S X X 15 S 5 X 15 D 5 X 4 6 D 10 X 4 6 • Variable with min cost: x31 Set x31 =min {15,5}= 5 • cross out column1 and set s3=15-5=10 • Variable with min cost: x11 Set x11 =min {5,10}= 5 • cross out row 1 and set d1=10-5=5
S X X 6 S X X 10 D X X X 6 D X X 4 6 • The only cell remaining: x34 Set x34 =min {6,6}= 6 • cross out both row 3 and column 4 • There is no cell left. • The bfs is obtained: • Variable with min cost: x33 Set x33 =min {10,4}= 4 • cross out column 3 and set s3=10-4=6 x11=5, x21=2, x22=8, x31=5, x33=4, x34=6
Vogel’s Method for Finding a Basic Feasible Solution • Often the minimum cost method will yield a costly bfs. • Vogel’s method for finding a bfs usually avoids extremely high shipping costs. • To find the bfs by the Vogel’s method: • Begin with computing each row and column a penalty. The penalty will be equal to the difference between the two smallest shipping costs in the row or column. • Identify the row or column with the largest penalty. • Find the first basic variable which has the smallest shipping cost in that row or column. • Assign the highest possible value to that variable, and cross-out the row or column as in the previous methods. • Change the supply or demand associated with the basic variable.
Recompute new penalties (using only cells that do not lie in a crossed row or column. • Repeat the procedure until only one uncrossed cell remains. • Set this variable equal to the supply or demand associated with the variable, and cross out the variable’s row or column. A bfs has been obtained.
Column 2 has the largest penalty Set x12=min {10,5}=5 cross out column 2 and set s1=10-5=5 Column 3 has the largest penalty. Set x13=min {5,5}=5 cross out either column 3(or row 1) and set s1=5-5=0 There are no row penalties, since there is only one cell remaining in each row. Example for Vogel’s Method SRow Penalty 5 8-6=2 15 78-15=63 SRow Penalty 10 7-6=1 15 78-15=63 X12=5 X13=5 X12 X22 D 15 X 5 Column 9 -- 70 Penalty D 15 5 5 Column 15-6=9 80-7=73 78-8=70 Penalty Select x12 (since it has the min cost) instead of x22
Column 1 is the only remaining column and is selected automatically. There are no row penalties (each row has only one cell) Set the minimum cost variable x11=min {0,15}=0 cross out row 1 set d1=15-0=15 No penalties can be computed. X21 is the only cell remaining. Set x21=min {15,15}=15 cross out row 2 and column 1 The algorithm is completed. bfs: X11=0, X12=5, X13=5, X21=15 SRow Penalty X -- 15 -- SRow Penalty 0 -- 15 -- X11=0 X12=5 X13=5 X11 X12=5 X13=5 X21=15 D 15 X X Column 9 -- -- Penalty D 15 X X Column 9 -- -- Penalty
Comparison of three methods • NWC method requires the least effort and Vogel’s method the most effort. • If Vogel’s method is used to find initial bfs, it requires fewer pivot for transportation simplex method to find the optimal solution. • Therefore, for large transportation problems, Vogel’s method is preferred.
7.3 The Transportation Simplex Method • The Simplex algorithm simplifies when a transportation problem is solved. • By using the following procedure, the pivots for a transportation problem may be performed within the confines of the transportation tableau: Step 1 Determine the variable that should enter the basis. Step 2 Find the loop involving the entering variable and some of the basic variables. Step 3 Counting the cells in the loop, label them as even cells or odd cells.
Step 4 Find the odd cells whose variable assumes the smallest value. Call this value θ. The variable corresponding to this odd cell will leave the basis. To perform the pivot, decrease the value of each odd cell by θ and increase the value of each even cell by θ. The variables that are not in the loop remain unchanged. The pivot is now complete. • If θ=0, the entering variable will equal 0, and an odd variable that has a current value of 0 will leave the basis. In this case a degenerate bfs existed before and will result after the pivot. • If more than one odd cell in the loop equals θ, you may arbitrarily choose one of these odd cells to leave the basis; again a degenerate bfs will result
Two important points to keep in mind in the pivoting procedure • Since each row has as many +20s as –20s, the new solution will satisfy each supply and demand constraint. • By choosing the smallest odd variable (x23) to leave the basis, we ensured that all variables will remain nonnegative.
Example: Consider the following problem Destination 1 2 3 4 Supply 15 25 5 1 Source 2 3 Demand 5 151510
Determination of the starting solution by NWC method • x11=5, which crosses out column 1. Thus no further alocation can be made in column 1. The amount left in row 1 is 10 units (s1=10). • x12=10, which crosses out row 1 and leaves 5 in column 2 (d2=5). • x22=5, which crosses out column 2 and leaves 20 units in row 2 (s2=20). • x23=15, which crosses out column 3 and leaves 5 units in row 2 (s2=5). • x24=15, which crosses out row 2 and leaves 5 units in column 4 (d4=5). • x34=5, which crosses out row 3 or column 4 and leaves 5 in column 2 (d2=5). No remaining row or column left, the process ends, the process ends. • The starting bfs: x11=5, x12=10, x22=5, x23=15, x24=5, x34=5. • The remaining variables are nonbasic at zero level. • The associated transporation cost: 5X10+10X0+5X7+15X9+5X20+5X18 = $410. S 15 25 5 D515 15 10
Determination of entering variable(method of multipliers) • Determined by optimality condition of the simplex method. • Associate the multipliers ui and vj with row i and column j of the transportation tableau. • For each basic variablexij in the current solution, the multipliersui and vj must satisfy the following equation: ui + vj =cij , for each basic variable xij • These equations yield m+n-1 equations (because there are only m+n-1 basic variables) in m+n unknowns. • The values of the multipliers can be determined from these equations by assuming an arbitrary value for any one of the multipliers (usually u1 is set equal to zero) and then solving the m+n-1 equations in the remaining m+n-1 unknown multipliers. • Once this is done, the evaluation of each nonbasic variablexpq is given by = up + vq – cpq, for each nonbasic variablexpq • (These values will be the same regardless of the arbitrary choice of the value of u1).
X11 x12 x22 x23 x24 x34 • The entering variable is then selected as the nonbasic variable with the most positive (since minimization) . • Let´s apply this procedure to the nonbasic variables for our example. • The equations associated with the basic variables are: x11: u1+v1=c11 = 10 x12: u1+v2=c12 = 0 x22: u2+v2=c22 = 7 x23: u2+v3=c23 = 9 x24: u2+v4=c24 = 20 x34: u3+v4=c34 = 18 • By letting u1 =0, the values of the multipliers are successively determined as v1=10, v2=0, u2=7, v3=2, v4=13, u3=5. Optimal solution
The evaluations of nonbasic variables are thus given as follows: x13: = u1 + v3 - c13 = 0+2-20 = -18 x14: = u1 + v4 - c14 = 0+13-11 = 2 x21: = u2 + v1 – c21 = 7+10-12 = 5 x31: = u3 + v1 – c31 = 5+10-0 = 15 x32: = u3 + v2 – c32 = 5+0-14 = -9 x33: = u3 + v3 – c33 = 5+2-16 = -9 • Since x31 has the most positive , it is selected as the entering variable (since min LP) Most positive
Determination of leaving variable(loop construction) • Similar tofeasibility condition of the simplex method (minimum ratio). • Construct a closed loopfor the current entering variable. • The loop consists of successive horizontal and vertical connected segments. • The loop starts and ends at the entering nonbasic variable. • End points must be basic variables, except for the end points that are associated with the entering variable. • Every corner element of the loop must be a cell containing a basic variable. • It is immaterial whether the loop follows clockwise or counterclockwise direction. • For a given basic solution only one unique loop can be constructed for each nonbasic variable.
For our example, for entering variable x31 the loop is: x31x11x12x22x24x34x31 Destination 1 2 3 4 Supply 15 25 5 1 Source 2 3 10 0 20 11 x11=5- x12=10 12 7 9 20 x22=5 - x23=15 x24=5 0 14 16 18 x31 x34=5 - Demand 5 151510
The leaving variable is selected from among the corner variables of the loop that will decrease when the entering variable x31 increases above zero level. • Let’s observe the previous table: If x31 increased by one unit, then to maintain the feasibility of the solution, the corner basic variables of the x31-loop must be adjusted as follows: • decrease x11 one unit, increase x12 one unit, decrease x22 one unit, increase x24 one unit, and decrease x34 one unit. • This change will keep the supply and demand constraints satisfied. When x31 increases x11, x22, and x34 will decrease
Leaving variable is the one having the smallest value among the decreasing variables (since it will be the first to reach zero and any further decrease will cause it to be negative (recall the feasibility condition of simplex method, where the leaving variable is associated with the minimum ratio)) • In our example: the three variables • x11=5, x22=5, and x34=5 have the same values. One of them can be selected as the leaving variable. • Arbitrarily select x34 as the leaving variable. • Then the value of x34=5. • Adjust the values of the corner (basic) variables accordingly (i.e., increased or decreased by 5, depending on + or – signs)
The new basic solution: Destination 1 2 3 4 Supply 15 25 5 1 Source 2 3 10 0 20 11 x11=0- x12=15 12 7 9 20 x22=0 - x23=15 x24=10 0 14 16 18 X31=5 Demand 5 151510 • The new cost: 0X10+15X0+0X7+15X9+10X20+5X0=$335 • Previous cost was: $410 • The difference: 410-335=$75 ( (x31) =15x5=75)
v1=10v2=0v3=2v4=13 Supply 15 25 5 u1=0 u2=7 u3=-10 10 0 20 11 +2 x11=0- x12=15 -18 12 7 9 20 x21 +5 x22=0 - x23=15 x24=10 0 14 16 18 x31=5 -24 -24 -15 Demand 5 151510 • We Check the optimality by computing the new multipliers • are given by the numbers in the southwest corner of each nonbasic cell. most + The nonbasic variable x21 with the largest + coefficient is the new entering variable.