Transpotation Algorithm
Transcript of Transpotation Algorithm
-
8/14/2019 Transpotation Algorithm
1/17
Lecture 15
Transportation Algorithm
October 14, 2009
-
8/14/2019 Transpotation Algorithm
2/17
Lecture 15
Outline
Recap the last lecture
Selection of the initial basic feasible solution
Northwest-corner method
Computing reduced costs of nonbasic variables
Thorugh the use of shadow prices Basis change
Operations Research Methods 1
-
8/14/2019 Transpotation Algorithm
3/17
Lecture 15
Sun-Ray Transportation ModelGrain from Silos to Mills - Balanced problem
Mill 1 Mill 2 Mill 3 Mill 4 Supply
Silo 1 10 2 20 11 15
Silo 2 12 7 9 20 25
Silo 3 4 14 16 18 10
Demand 5 15 15 15
Northwest-corner method
Mill 1 Mill 2 Mill 3 Mill 4
Silo1 10 x11= 5 2 x12= 10 20 11
Silo 2 12 7 x22= 5 9 x23= 15 20 x24= 5
Silo 3 4 14 16 18 x34= 10
Working with the simplex method would require 12 variables, of which 6
are basic variables. We resort to a more compact representation:
- the use of the preceding table.
Operations Research Methods 2
-
8/14/2019 Transpotation Algorithm
4/17
Lecture 15
Simplex Method
Having the initial table (with initial basic feasible solution), we perform thetypical simplex iteration
Step 1Reduced Cost Computation
Compute the reduced costs of the nonbasic variables
Step 2Optimality CheckLooking at the reduced cost values, we check the optimality
In the transportation minimization problem: optimality requires non-
negative reduced cost
Step 3Basis ChangeIf not optimal, we perform change of basis and update the table
In the transportation minimization problem: solution is not optimal
when reduced cost is positive for some nonbasic variable
Operations Research Methods 3
-
8/14/2019 Transpotation Algorithm
5/17
Lecture 15
Reduced Cost Computation
We do not have Basis Inverse, so we have to rely on the dual problemandthe fact that the reduced costs of the basic variables are zero
We use shadow prices - hence, we need to look at the dual of the
transportation problem
minimizem
i=1
n
j=1
cijxij
subject ton
j=1
xij =bi for i= 1, . . . , m (ui)
m
i=1
xij =
dj for
j= 1
, . . . , n (vj)
xij 0 for all i, j
Operations Research Methods 4
-
8/14/2019 Transpotation Algorithm
6/17
Lecture 15
The dual of the general transportation problem
maximizem
i=1
biui+n
j=1
djvj
subject to ui+ vj cij for all (i, j) pairs (xij)
Reduced cost cij of variable xij is given by
cij =ui+ vj cij
where cij is the original cost of the variable xij as given in the objectiveof the transportatation problem
Operations Research Methods 5
-
8/14/2019 Transpotation Algorithm
7/17
Lecture 15
Step 1: Computing the reduced costs of nonbasic
variables
1. Determine the shadow prices of the problem corresponding to the current
basic feasible solution, using the fact that the reduced costs of the basic
variables are 0, i.e.
cij = ui+ vj cij = 0 for all basic variablesxij
We have m + n unknowns ui, vj, and m + n 1equations
One degree of freedom: set u1= 0 (or other than u1 variable)
2: Using the shadow prices determined in item 1, compute the reducedcosts of the nonbasic variables
cij =ui+ vj cij for all nonbasic variables xij
Operations Research Methods 6
-
8/14/2019 Transpotation Algorithm
8/17
Lecture 15
Back to Sun-Ray Case: Reduced cost
Mill 1 Mill 2 Mill 3 Mill 4
Silo1 10 x11= 5 2 x12= 10 20 11
Silo 2 12 7 x22= 5 9 x23= 15 20 x24= 5
Silo 3 4 14 16 18 x34= 10
1. Determining the shadow prices fromcij = 0for currently basic variables(with u1= 0)
x11 u1+ v1= 10 & u1= 0 v1= 10
x12 u1+ v2= 2 u1= 0 v2= 2
x22 u2+ v2= 7 v2= 2 u2= 5x23 u2+ v3= 9 u2= 5 v3= 4
x24 u2+ v4= 20 u2= 5 v4= 15
x34 u3+ v4= 18 v4= 15 u3= 3
Operations Research Methods 7
-
8/14/2019 Transpotation Algorithm
9/17
Lecture 15
2. Using the shadow prices, compute the reduced costs cij for nonbasic
variables
cij =ui+ vj cij
Mill 1 Mill 2 Mill 3 Mill 4
Silo1 10 x11= 5 2 x12= 10 20 11
Silo 2 12 7 x22= 5 9 x23= 15 20 x24= 5
Silo 3 4 14 16 18 x34= 10
x13 c13= u1+ v3 c13= 0 + 4 20 = 16
x14 c14= u1+ v4 c14= 0 + 15 11 =4
x21 c21= u2+ v1 c21= 5 + 10 12 =3
x31 c31= u3+ v1 c31= 3 + 10 4 =9
x32 c32= u3+ v2 c32= 3 + 2 14 = 9
x33 c33= u3+ v3 c33= 3 + 4 16 = 9
Operations Research Methods 8
-
8/14/2019 Transpotation Algorithm
10/17
Lecture 15
Step 2: Optimality Check
x13 c13= 16
x14 c14=4
x21 c21=3
x31 c31=9
x32 c32= 9
x33 c33= 9
We can choose any ofx14, x21, and x31.
We may choose the one with the largest reduced cost - x31.
Operations Research Methods 9
-
8/14/2019 Transpotation Algorithm
11/17
Lecture 15
Simplex Method
Having the initial table (with initial basic feasible solution), we perform the
typical simplex iteration
Step 1Reduced Cost Computation (DONE)
Compute the reduced costs of the nonbasic variables
Step 2Optimality Check (DONE)
Looking at the reduced cost values, we check the optimality
In the transportation minimization problem: optimality requires non-
negative reduced cost
Step 3Basis Change (We are HERE, x31 enters the basis)
If not optimal, we perform change of basis and update the table
Operations Research Methods 10
-
8/14/2019 Transpotation Algorithm
12/17
Lecture 15
Step 3: SunRay Basis Change
Mill 1 Mill 2 Mill 3 Mill 4
Silo1 10 x11= 5 2 x12= 10 20 11
Silo 2 12 7 x22= 5 9 x23= 15 20 x24= 5
Silo 3 4 14 16 18 x34= 10
Operations Research Methods 11
-
8/14/2019 Transpotation Algorithm
13/17
Lecture 15
Figure 1: Graph representation of the current basic faesible solution
Operations Research Methods 12
-
8/14/2019 Transpotation Algorithm
14/17
Lecture 15
Figure 2: x31 entering the current basis. Flow push along a cycleformed by arcs of the old solution and the new arc (3,1) of thevariable entering the basis
Operations Research Methods 13
-
8/14/2019 Transpotation Algorithm
15/17
Lecture 15
Figure 3: Table representation of the cycle and the flow push.
The maximum flow that can be send along the cycle cannot exceed the
amount of the flow on the backward traversed arcs (corresponds to removal
of the existing flow on these arcs):
5 0, 5 0, 10 0 = = 5
Operations Research Methods 14
-
8/14/2019 Transpotation Algorithm
16/17
Lecture 15
Figure 4: The resulting table after sending 5 units of flow along thecycle. There are two variables that can leave the basis: those whoseflow dropped to 0. Thus, either x11 or x22 may leave the basis.
Suppose we choose x11 to leave.
Operations Research Methods 15
-
8/14/2019 Transpotation Algorithm
17/17
Lecture 15
Figure 5: The resulting basic feasible solution after x11 left the basis.
Now we have completed a simplex iteration.
We go to the next iteration:We repeat steps 1,2,3 for this basic solution.
Operations Research Methods 16