Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Lecture 15

Transportation Algorithm

October 14, 2009


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


Lecture 15

Sun-Ray Transportation Model


Grain 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
Lecture 15

Simplex Method

Having the initial table (with initial basic feasible solution), we perform the
typical simplex iteration
Step 1 Reduced Cost Computation
Compute the reduced costs of the nonbasic variables

Step 2 Optimality Check


Looking at the reduced cost values, we check the optimality
In the transportation minimization problem: optimality requires non-
negative reduced cost

Step 3 Basis Change


If 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


Lecture 15

Reduced Cost Computation

We do not have Basis Inverse, so we have to rely on the dual problem and
the 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

m X
X n
minimize cij xij
i=1 j=1
Xn
subject to xij = bi for i = 1, . . . , m (ui)
j=1
Xm
xij = dj for j = 1, . . . , n (vj)
i=1

xij 0 for all i, j

Operations Research Methods 4


Lecture 15

The dual of the general transportation problem

m
X n
X
maximize biui + dj vj
i=1 j=1

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 objective
of the transportatation problem

Operations Research Methods 5


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 variables xij

We have m + n unknowns ui, vj , and m + n 1 equations


One degree of freedom: set u1 = 0 (or other than u1 variable)
2: Using the shadow prices determined in item 1, compute the reduced
costs of the nonbasic variables

cij = ui + vj cij for all nonbasic variables xij

Operations Research Methods 6


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 from cij = 0 for currently basic variables
(with u1 = 0)

x11 u1 + v1 = 10 & u1 = 0 v1 = 10
x12 u1 + v 2 = 2 u1 = 0 v2 = 2
x22 u2 + v 2 = 7 v2 = 2 u2 = 5
x23 u2 + v 3 = 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


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


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 of x14, x21, and x31.


We may choose the one with the largest reduced cost - x31.

Operations Research Methods 9


Lecture 15

Simplex Method

Having the initial table (with initial basic feasible solution), we perform the
typical simplex iteration
Step 1 Reduced Cost Computation (DONE)
Compute the reduced costs of the nonbasic variables

Step 2 Optimality Check (DONE)


Looking at the reduced cost values, we check the optimality
In the transportation minimization problem: optimality requires non-
negative reduced cost

Step 3 Basis Change (We are HERE, x31 enters the basis)
If not optimal, we perform change of basis and update the table

Operations Research Methods 10


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


Lecture 15

Figure 1: Graph representation of the current basic faesible solution

Operations Research Methods 12


Lecture 15

Figure 2: x31 entering the current basis. Flow push along a cycle
formed by arcs of the old solution and the new arc (3,1) of the
variable entering the basis

Operations Research Methods 13


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


Lecture 15

Figure 4: The resulting table after sending 5 units of flow along the
cycle. There are two variables that can leave the basis: those whose
flow dropped to 0. Thus, either x11 or x22 may leave the basis.
Suppose we choose x11 to leave.

Operations Research Methods 15


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

You might also like