The Transportation Problem Simplex Method
Remember our initial transportation problem with the associated cost to send a unit from the factory to each of the four warehouses
This created a nice, large matrix
There are important properties in the transportation problem that allow us to handle large problems without having to solve a very large B -1. Requirements assumption: each source has a fixed (not dynamic) set of supplies each destination has a fix need of supplies Feasible solution property: if ∑ s i = ∑ d j for all i, j (the supplies meets the demands and vice versa) the TP has a feasible solution Cost assumption: the cost to distribute is linearly determined by the number of units delivered Integer solution property: if the s i and d j are integer values, every CPF solutions will consists of integer values
In the regular simplex, whenever we have constraints with = sign we used artificial variables to jump start an initial solution, then we move on to get rid of them and then go from point to point until we find an optimal solution, by selecting the entering variable (the most negative value) from row 0 of a non basic variable. If we can calculate the initial row (Z) easily, we would not need to follow the whole Gauss Jordan elimination process.
Using the revised simplex method we obtained the values for the initial row as follows: C bij B -1 A - C ij, where C ij is the initial cost value It just happens that this computation is obtained simply from the initial cost values and the values of the current dual variables (restrictions) for both the supply U i and destination V j, Z = V i + U j - C ij
For the initial row of Z, we can now concentrate on the equation C ij - V i - U j = 0 To start, we will assign the value of 0 to one of the U i and solve for the rest of the m+n-1 restrictions. Let u 1 = 0 Or choose that U i that appears more often = 0 From there we select the entering variable. Since we are under minimization, we will compute C ij - V i - U j and select the one with the most negative value non basic variable to enter the basis.
We use a better format to keep this data in a table fashion.
9 Rather than using the LP Simplex with 9 constraints and 9 artificial variables, we use the TP tableau
How do I get and initial CPF feasible distribution? How do I check for optimality? How do I select the entering variables? How do I select the leaving variable?
11 Remember that if ∑ s i = ∑ d j the TP has a feasible solution. The simplest approach is using the Northwest Corner Method : Start depleting each source by filling the demands from the top left corner destination and move right till the source is finished. Move to the next source to continue filling demands fro left to right and top to bottom until the problem is completed.
12 Now, compute the objective function by multiplying the C ij ’s by the amount delivered by the all basic variable X ij ’s This is an initial solution, yet not an optimal. But we got there without the use of artificial variables.
13 Remember C ij - U i - V j 1)Determine the dual variables values from the m+n restriction equations 2)Calculate coefficients on row zero for non basic variables 3)If there is at least one where C ij - U i - V j < 0 that is the entering variable Let U 1 = 0 and do it by hand or use Gauss Jordan elimination C 1,1 = u 1 + v 1 →16 = 0 + v 1 v 1 = 16
14 where C ij - U i - V j < 0 Look for the largest negative value to represent the entering variable Anyone of these is a candidate
1.Chain reaction of events in a loop 2.Take from other cells and compensate properly 3.Only take the smallest quantity in the loop + 10 Becomes the leaving variable Note there are only 8 basic variables a CPF solution = Loop closes nicely !
Now compute the objective function We get a better distribution (minimize the cost)
17 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable
1.Chain reaction of events in a loop 2.Take from other cells and compensate properly 3.Only take the smallest quantity in the loop =
Now compute the objective function We get a better distribution (minimize the cost) Destination Source12345Supply 1$160 2$130$226$ $14-2$140$130$193$ $19-4$19-2$200$230$ $100101$03$100104$ Demand
20 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable Destination Source12345SupplyUiUi 1$160 2$130$226$ $14-2$140$130$193$ $19-4$19-2$200$230$ $100101$03$100104$ Demand VjVj Z $2,670 LetU1U1 0 C 1,1 = U 1 + V 1 U2U2 0 C 1,3 = U 1 + V 3 U3U3 7 C 1,5 = U 1 + V 5 U4U4 -17 C 2,2 = U 2 + V 2 V1V1 16 C 2,3 = U 2 + V 3 V2V2 14 C 3,3 = U 3 + V 3 V3V3 13 C 3,4 = U 3 + V 4 V4V4 16 C 4,5 = U 4 + V 5 V5V5 17
Redistribute quantities Compute the objective function We get a better distribution (minimize the cost) Destination Source12345Supply 1$160 2$130$226$ $14-2$140$130$193$ $19-4$19-2$200$230$ $100101$03$100104$ Demand $2,590
22 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable Destination Source12345SupplyUiUi 1$160 2$130$222$ $14-2$140$130$19$ $190 2$204$230$ $100101$03$100104$0-3$ Demand VjVj Z $2,590 LetU1U1 0 C 1,1 = U 1 + V 1 U2U2 0 C 1,3 = U 1 + V 3 U3U3 3 C 1,5 = U 1 + V 5 U4U4 -17 C 2,2 = U 2 + V 2 V1V1 16 C 2,3 = U 2 + V 3 V2V2 14 C 3,1 = U 3 + V 1 V3V3 13 C 3,4 = U 3 + V 4 V4V4 20 C 4,5 = U 4 + V 5 V5V5 17
Redistribute quantities Compute the objective function We get a better distribution (minimize the cost) Destination Source12345Supply 1$160 2$130$222$ $14-2$140$130$19$ $190 2$204$230$ $100101$03$100104$0-3$ Demand $2,560
24 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable Destination Source12345SupplyUiUi 1$169 2$130$225$ $147 0$130$192$ $196 $201$230$ $100110$03$100104$ Demand VjVj Z $2,560 LetU1U1 0 C 1,3 = U 1 + V 3 U2U2 0 C 1,5 = U 1 + V 5 U3U3 6 C 2,2 = U 2 + V 2 U4U4 -17 C 2,3 = U 2 + V 3 V1V1 7 C 3,1 = U 3 + V 1 V2V2 14 C 3,4 = U 3 + V 4 V3V3 13 C 4,4 = U 4 + V 4 V4V4 17 C 4,5 = U 4 + V 5 V5V5 17
Redistribute quantities Compute the objective function We get a better distribution (minimize the cost) Destination Source12345Supply 1$169 2$130$225$ $147 0$130$192$ $196 $201$230$ $100110$03$100104$ Demand $2,520
26 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable Destination Source12345SupplyUiUi 1$165 2$130$227$ $143 0$130$194$ $190 -3$20$230$ $100104$01$100102$ Demand VjVj Z $2,520 LetU1U1 0 C 1,3 = U 1 + V 3 U2U2 0 C 2,2 = U 2 + V 2 U3U3 8 C 2,3 = U 2 + V 3 U4U4 -15 C 2,5 = U 2 + V 5 V1V1 11 C 3,1 = U 3 + V 1 V2V2 14 C 3,4 = U 3 + V 4 V3V3 13 C 4,4 = U 4 + V 4 V4V4 15 C 4,5 = U 4 + V 5 V5V5 15
Redistribute quantities Compute the objective function We get a better distribution (minimize the cost) Destination Source12345Supply 1$165 2$130$227$ $143 0$130$194$ $190 -3$20$230$ $100104$01$100102$ Demand $2,460
28 Compute new U i and V j Calculate new C ij - U i - V j Choose entering variable Destination Source12345SupplyUiUi 1 $165 5$130$227$ $143 3$130$194$ $190 0$20$230$ $100104$04$100102$ Demand VjVj Z$2,460 LetU1U1 -8 C 1,3 = U 1 + V 3 U2U2 -8 C 2,2 = U 2 + V 2 U3U3 0 C 2,3 = U 2 + V 3 U4U4 -23 C 2,5 = U 2 + V 5 V1V1 19 C 3,1 = U 3 + V 1 V2V2 19 C 3,4 = U 3 + V 4 V3V3 21 C 4,4 = U 4 + V 4 V4V4 23 C 4,5 = U 4 + V 5 V5V5 23 Using this a basic variable will not improve the minimization since the value is already 0 (degenerate)
29 The process was slow and tedious because we started from a very limited initial CPF, i.e. we used no previous knowledge in the distribution. We will see later better methods to obtain an knowledge-based initial solution Vogel’s Algorithm Russell’s Approximation But before we do that lets recap the TP solving method 1.Set up the initial tableau from the cost table 2.Obtain a initial CPF (Northwest, Vogel’s, Russell’s) 3.Test for optimality Using C ij - U i - V j = 0 for basic variables determine U’s and V’s For non basic variables compute C ij - U i - V j where this is < 0 select that as the entering variable 4.Find a loop in the tableau to determine the leaving variable 5.Compensate and return to 3 until there are no more non basic variables where C ij - U i - V j < 0