You are on page 1of 98

Adopted from the lecture notes by Thomson Learning

INDE6372: LECTURE 11
Transportation, Assignment and
Transshipment Problems
Jiming Peng
Department of Industrial Engineering
University of Houston
Adopted from the lecture notes by Thomson Learning

A Summary of Exam 1
Exam students mean Median SD

• A 21 25 27 4.26
B 24 22.2 22.4 4.32
Comb. 45 23 24 4.6

Chart Title
25

20

15

10

0 [0,15] [15,20) [20,25) [25,30]


Adopted from the lecture notes by Thomson Learning

Issues in The Exam


• 1: Late/incomplete submission;
• 2: Mistakes in sensitivity analysis for LO;
• Non-SA approach: Several students input the new model and try to
resolve it;
• Used the correct formulae, but messed up with the order of the
basic variables, coefficient vector of the basis or the inverse matrix;
Adopted from the lecture notes by Thomson Learning

Outline
• Basic Introduction: Modeling and Initialization
• Modeling: Balanced transportation problem; Transfer unbalanced
TP into a balanced TP; Dealing with flexible demand;
• Initialization: Northwest Corner Method; Minimum Cost Method
• Vogel’s Method;
• Simplex for Transportation Problem
• Other topics:
• Sensitivity Analysis
• Assignment and Transshipment Problems
Adopted from the lecture notes by Thomson Learning

Description
• A transportation problem basically deals with the problem,
which aims to find the best way to fulfill the demand of n
demand points using the capacities of m supply points.
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.
Adopted from the lecture notes by Thomson Learning

Formulation of Transportation Problem


Example 1: Powerco has three electric power plants that
supply the electric needs of four cities.
•The associated supply of each plant and demand of each city is
given in the following table.
•The cost of sending 1 million kwh of electricity from a plant to a city
is given in the cost matrix (C).

City 1 City 2 City 3 City 4 Supply


(Million kwh)
Plant 1 $8 $6 $10 $9 35
Plant 2 $9 $12 $13 $7 50
Plant 3 $14 $9 $16 $5 40
Demand 45 20 30 30 125=125
(Million kwh)
Adopted from the lecture notes by Thomson Learning

Formulating the LP
• Decision Variables:
• we need to determine how much electricity is sent from each plant
to each city (also called decision matrix X);
• Xij = Amount of electricity produced at plant i and sent to city j
• X14 = Amount of electricity produced at plant 1 and sent to city 4
• Objective Function:
• we want to minimize the total cost of shipping from plants to cities;
• Minimize Z = 8X11+6X12+10X13+9X14
• +9X21+12X22+13X23+7X24
• +14X31+9X32+16X33+5X34
• Or in the matrix form, trace(CTX), the trace of a matrix is
defined as the sum of all the diagonal elements of the
matrix.
Adopted from the lecture notes by Thomson Learning

Identifying the Constraints


Supply Constraints: each supply point has a limited
production capacity;
X11+X12+X13+X14 ≤ 35
X21+X22+X23+X24 ≤ 50
X31+X32+X33+X34 ≤ 40
Demand Constraints: The total electricity received
by each city needs to meet its demand;
X11+X21+X31 ≥ 45
X12+X22+X32 ≥ 20
The non-negativity
X13+X23+X33 ≥ 30 constraints on variables
X14+X24+X34 ≥ 30
Adopted from the lecture notes by Thomson Learning

The LO Model for Balanced TP


• Min Z = 8X11+6X12+10X13+9X14+9X21+12X22+13X23+7X24
• +14X31+9X32+16X33+5X34
• S.T.: X11+X12+X13+X14 = 35 (Supply Constraints)
• X21+X22+X23+X24 = 50
• X31+X32+X33+X34 = 40
• X11+X21+X31 = 45 (Demand Constraints)
• X12+X22+X32 = 20
• X13+X23+X33 = 30
• X14+X24+X34 = 30
• Xij >= 0 (i= 1,2,3; j= 1,2,3,4)
• Note that in the above problem, the total supply (125) equals the total
demand. The problem is called a balanced TP.
• The equality constraints are derived based on the balance condition!
Adopted from the lecture notes by Thomson Learning

Generic Description
1 A set of m supply points
from which a good is shipped.
Supply point i can supply at
most si units. i m j n
min  cijXij  Tr (C ' X )
2. A set of n demand points i 1 j 1

to which the good is shipped. j n

Demand point j must receive at s.t. j 1


Xij  si (i  1,2,..., m)  Xen  s
least di units of the good. i m

3. Shipping one unit of the i 1


Xij  dj ( j  1,2,..., n)  X ' em  d
good from supply point i to Xij  0(i  1,..., m; j  1,..., n)  X  0
demand point j incurs a variable
cost of cij.
Adopted from the lecture notes by Thomson Learning

Dealing with Unbalanced Problem


• Question: What to do if the total supply exceeds the
total demand?
• If the total supply exceeds the total demand, we can balance the
problem by adding a dummy demand point. Since shipments to the
dummy demand point are not real, they are assigned a zero cost.

City 1 City 2 City 3 City 4 Dummy Supply
City Capacity
Supply 1 $8 $6 $10 $9 0 35
Supply 2 $9 $12 $13 $7 0 50
Supply 3 $14 $9 $16 $5 0 40
Demand 40 20 30 30 5
Adopted from the lecture notes by Thomson Learning

Dealing with Unbalanced Problem


• Question: What to do if the total demand exceeds the
total supply?
• If the total demand exceeds the total supply, we can balance the
problem by adding a dummy supply point. Since shipments from
the dummy supply point are not real, they will be assigned a very
high (penalty) cost.
City 1 City 2 City 3 City 4 Supply
Capacity
Supply 1 $8 $6 $10 $9 30
Supply 2 $9 $12 $13 $7 50
Supply 3 $14 $9 $16 $5 40
Dummy $100 $100 $100 $100 5
Supply
Demand 45 20 30 30
Adopted from the lecture notes by Thomson Learning

Dealing with Flexible Demand


• Consider a scenario for Powerco case:
City 1 City 2 City 3 City 4 Supply
Plant 1 8 6 10 9 35
Plant 2 9 12 13 7 50
Plant 3 14 9 16 5 40
Committed 45 20 10 0

• Committed sales: 45, 20, 10.


• Both Cities 3 and 4 want to have as many as possible
• How to derive a balanced transportation problem?
Adopted from the lecture notes by Thomson Learning

How to deal with flexible demand


• We can assume both city 3 and 4 have extra demand 50 Kwh
• Thus a dummy supply is need to meet the extra demand
• We need to choose penalty costs for the committed sales and the
extra demand
City 1 City 2 City 3 City 3’ City 4 Supply

Plant 1 8 6 10 10 9 35
Plant 2 9 12 13 13 17 50
Plant 3 14 9 16 16 5 40
Dummy 100 100 100 50 50 50
Committed 45 20 10 50 50

• Implication: If the selling price is the same, then Powerco


should sell to customer 4, unless it has been committed.
Adopted from the lecture notes by Thomson Learning

Roadmap
• Basic Introduction: Modeling
• Balanced transportation problem; Transfer unbalanced TP into a
balanced TP; Dealing with flexible demand.
• Initialization
• Northwest Corner Method
• Minimum Cost Method
• Vogel’s Method
• Simplex for Transportation Problem
• Other Topics:
• Sensitivity Analysis
• Assignment and Transshipment Problems
Adopted from the lecture notes by Thomson Learning

Initialization Method
• There are three popular methods to find a feasible
solution to the TP:

1. Northwest Corner Method

2. Minimum Cost Method

3. Vogel’s Method
Adopted from the lecture notes by Thomson Learning

Northwest Corner Method


• To find the bfs by the NWC method:
• Begin in the upper left (northwest) corner of the
transportation tableau and set x11 as large as possible
(here the limitations for setting x11 to a larger number,
will be the demand of demand point 1 and the supply
of supply point 1. Your x11 value can not be greater
than minimum of this 2 values).
Adopted from the lecture notes by Thomson Learning

The TP Example
• Min Z = ∑CijXij
• s.t.: X11+X12+X13+X14 <= 5 (Supply Constraints)
• X21+X22+X23+X24 <= 6
• X31+X32+X33+X34 <= 2
• X11+X21+X31 >= 3 (Demand Constraints)
• X12+X22+X32 >= 5
• X13+X23+X33 >= 2
• X14+X24+X34 >= 3
• Xij >= 0 (i= 1,2,3; j= 1,2,3,4)
• Observation: Since the above TP is balanced, we can replace all the
inequalities in the constraints by equalities.
Adopted from the lecture notes by Thomson Learning

According to the explanations in the previous slide


we can set x11=min(s1,d1)=3 (meaning demand at
location 1 is satisfied by supplier 1).
5

3 5 2 3

3 2

X 5 2 3
Adopted from the lecture notes by Thomson Learning

After we check the east and south cells, we saw that we can go
east (meaning supply point 1 still has capacity to fulfill some
demand).

3 2 X

X 3 2 3

3 2 X

3 3

X X 2 3
Adopted from the lecture notes by Thomson Learning

After applying the same procedure, we saw that we can go


south this time (meaning demand point 2 needs more supply by
supply point 2).

3 2 X

3 2 1

X X X 3

3 2 X

3 2 1 X

X X X 2
Adopted from the lecture notes by Thomson Learning

Finally, we will have the following bfs, which is:


x11=3, x12=2, x22=3, x23=2, x24=1, x34=2

3 2 X

3 2 1 X

2 X

X X X X
Adopted from the lecture notes by Thomson Learning

Minimum Cost Method

One criticism of the NWC Method is that it dos not utilize shipping costs,
and thus can yield an initial bfs with a very high total shipping cost.

The minimum cost method uses shipping costs in order to come up with
a bfs that has a lower cost. To begin the minimum cost method, first we
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

After that, as in the NWC Method, we cross out row i and column j and
reduce the supply or demand of the non-crossed-out row or column by
the value of Xij. Then we will choose the cell with the minimum cost of
shipping from the cells that do not lie in a crossed-out row or column
and we will repeat the procedure.
Adopted from the lecture notes by Thomson Learning

Minimum Cost Method


Step 1: Select the cell with minimum cost.

2 3 5 6
5

2 1 3 5
10

3 8 4 6
15

12 8 4 6
Adopted from the lecture notes by Thomson Learning

Step 2: Cross-out column 2

2 3 5 6
5

2 1 3 5
2
8
3 8 4 6
15

12 X 4 6
Adopted from the lecture notes by Thomson Learning

Step 3: Find the new cell with minimum shipping cost


and cross-out row 2

2 3 5 6
5

2 1 3 5
X
2 8

3 8 4 6
15

10 X 4 6
Adopted from the lecture notes by Thomson Learning

Step 4: Find the new cell with minimum shipping cost


and cross-out row 1

2 3 5 6
X
5

2 1 3 5
X
2 8

3 8 4 6
15

5 X 4 6
Adopted from the lecture notes by Thomson Learning

Step 5: Find the new cell with minimum shipping cost


and cross-out column 1

2 3 5 6
X
5
2 1 3 5
X
2 8
3 8 4 6
10
5

X X 4 6
Adopted from the lecture notes by Thomson Learning

Step 6: Find the new cell with minimum shipping cost


and cross-out column 3

2 3 5 6
X
5
2 1 3 5
X
2 8
3 8 4 6
6
5 4

X X X 6
Adopted from the lecture notes by Thomson Learning

Step 7: Finally assign 6 to last cell. The bfs is found as:


X11=5, X21=2, X22=8, X31=5, X33=4 and X34=6

2 3 5 6
X
5
2 1 3 5
X
2 8
3 8 4 6
X
5 4 6

X X X X
Adopted from the lecture notes by Thomson Learning

Minimum Cost Method VS Northwest Method

2 3 5 6
X
5

2 1 3 5
X
Cost based on Min-cost method:
2 8

3 8 4 6 2*5+2*2+5*3+8*1+4*4+6*6=89
X
5 4 6

X X X X

2 3 5 6
5
5

2 1 3 5
Cost based on NWC-method:
10 2*5+7*2+1*3+5*8+4*4+6*6=119
7 3

3 8 4 6
15
5 4 6

12 8 4 6
Adopted from the lecture notes by Thomson Learning

Potential Setback in NWC and Min-Cost Method


Supply
6 7 8
10

15 80 78
15

Demand 15 5 5

For this problem, both the NWC and the min-cost methods generate
the same solution x11=10, x21=5, x22=5, x23=5.
Observation: when we try to maximize the value of x11, we also
maximize the values of x22 and x23, leading to a poor solution.
Causes: This is due to the large gap between the first choice and
second choice in some row/column.
Adopted from the lecture notes by Thomson Learning

Vogel’s Method
For each row/column, compute a penalty defined as the gap
between the two smallest elements in that row/column.

Identify the row/column with the largest penalty. Find the first
basic variable associated with the minimal cost in that row/
column.

Assign the highest possible value to that variable, and cross-out


the row/column based on the supply/demand constraints.

Compute new penalties for the reduced cost matrix and repeat
the same procedure until a feasible solution is found.
Adopted from the lecture notes by Thomson Learning

An example for Vogel’s Method


Step 1: Compute the penalties.

Supply Row Penalty


6 7 8
10 7-6=1

15 80 78
15 78-15=63

Demand 15 5 5

Column Penalty 15-6=9 80-7=73 78-8=70

For the above problem, column 2 has the highest penalty. Thus we
should maximize the value of x12 first and set x12=5!
Then we update the supply and demand constraints.
Adopted from the lecture notes by Thomson Learning

Step 2: Identify the largest penalty and assign the


highest possible value to the variable.

Supply Row Penalty

6 7 8
5 8-6=2
5
15 80 78
15 78-15=63

Demand 15 X 5

Column Penalty 15-6=9 _ 78-8=70

Next we choose to go with column 3 (the highest penalty cost), and set x13=5 (by
min-cost rule). Then we update the RHS of the constraints.
Adopted from the lecture notes by Thomson Learning

Step 3: Identify the largest penalty and assign the


highest possible value to the variable.

Supply Row Penalty

6 7 8
0 _
5 5
15 80 78
15 _

Demand 15 X X

Column Penalty 15-6=9 _ _

Now only one column left and we set x21=15.


Adopted from the lecture notes by Thomson Learning

Step 4: Identify the largest penalty and assign the


highest possible value to the variable.

Supply Row Penalty

6 7 8
X _
0 5 5
15 80 78
15 _

Demand 15 X X

Column Penalty _ _ _
Adopted from the lecture notes by Thomson Learning

Step 5: Finally the bfs is found as X11=0, X12=5, X13=5,


and X21=15
Supply Row Penalty
6 7 8
X _
0 5 5
15 80 78
X _
15

Demand X X X

Column Penalty _ _ _

The cost from Vogel’s method: 5*7+5*8+15*15=300.


The solution from the min-cost method: x11=10, x21=5, x22=5, x23=5.
The corresponding cost is: 10*6+5*15+5*80+5*78=925. Big saving achieved!
Adopted from the lecture notes by Thomson Learning

Min-Cost Method, NWC Method and Vogel’s Method

2 3 5 6
X Cost based on Min-cost method:
5

2 1 3 5
X
2*5+2*2+5*3+8*1+4*4+6*6=89
2 8 Vogel’s method generates the
3 8 4 6
X
same feasible solution!
5 4 6

X X X X

2 3 5 6
5
5

2 1 3 5 Cost based on NWC-method:


10
7 3 2*5+7*2+1*3+5*8+4*4+6*6=119
3 8 4 6
15
5 4 6

12 8 4 6
Adopted from the lecture notes by Thomson Learning

Roadmap
• Basic Introduction:
• Balanced transportation problem; Transfer unbalanced TP into a
balanced TP; Dealing with flexible demand.
• Initialization
• Northwest Corner Method;
• Minimum Cost Method;
• Vogel’s Penalty method;
• Today’s topics: Simplex for Transportation Problem
• Other Topics:
• Sensitivity Analysis
• Assignment and Transshipment Problems
Adopted from the lecture notes by Thomson Learning

Simplex for TP
• In this lecture we demonstrate how the simplex algorithm
solves a transportation problem.
Adopted from the lecture notes by Thomson Learning

The Simplex Method for Balanced TP


• Step 0. Find a feasible staring solution (NWC/Min-Cost/Penalty);
• Step 1. Compute the reduced cost for all the nonbasic
variables to select a variable to enter the basis based on the
reduced cost;
• Step 2. Update the tableau;
• Step 2.1: Find the loop (usually there is only one loop) involving
the entering variable and some of the basic variables;
• Step 2.2: Determine the leaving variable in the selected loop
and update all the variables in the loop.
• Step 3. Check the optimality conditions. If yes, stop. Otherwise
go to step 1.
Adopted from the lecture notes by Thomson Learning

Update the tableau


• Step 2. First label all the variables in the loop (with 0 for
the entering variable), and find the odd cells whose
variable with the least 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.
• 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
Adopted from the lecture notes by Thomson Learning

Powerco Example: Finding the Loop


Adopted from the lecture notes by Thomson Learning

New bfs after X14 is pivoted into basis. Since there is no loop
involving the cells (1,1), (1,4), (2,1), (2,2), (3,3) and (3, 4), the
new solution is a bfs.

35-20 0+20 35

20-20
10+20 20 50
(nonbasic)

10+20 30-20 40

45 20 30 30

After the pivot the new bfs is X11=15, X14=20,


X21=30, X22=20, X33=30 and X34=10.
Adopted from the lecture notes by Thomson Learning

Two Key Points

In the pivoting procedure:

1. Since each row has as many +20s as –20s,


the new solution will satisfy each supply
and demand constraint.

2. By choosing the smallest odd variable (X23)


to leave the basis, we ensured that all
variables will remain nonnegative.
Adopted from the lecture notes by Thomson Learning

Pricing out the non-basic variables


To complete the transportation simplex, now we
will discuss how to compute row 0 for any bfs. For
a bfs in which the set of basic variables is BV, the
coefficient of the variable Xij (call it čij) in the
tableau’s row ) is given by

čij = cBV B-1aij – cij

Where cij is the objective function coefficient for Xij


and aij is the column for xij in the original LP
Adopted from the lecture notes by Thomson Learning

Pricing out the nonbasic variables


 Observations:
For min. problem, the current bfs is optimal if all the čij‘s are
non-positive; Otherwise, (corresponding to the largest čij ) enters
the basis;
If cBVB-1 is known, we can easily compute čij;
Since the first constraint can be ignored, in general cBVB-1
has m+n-1 variables (a bfs to the dual problem);
Let cBVB-1= [u2 u3…um v1 v2…vn] where u2 u3…um are variables
corresponding to the m-1 supply constraints,
and v1 v2…vn are variables corresponding to the n demand
constraints;
Adopted from the lecture notes by Thomson Learning

Computing the Dual variables


To determine the value of all the dual variables, we use the fact
that in any tableau, each basic variable Xij must have čij=0. Thus
for each of the m+n-1 variables in BV,
cBV B-1aij – cij= ui+vj- cij = 0

For the Northwest corner bfs of Powerco problem, BV={X11, X21,


X22, X23, X33, X34}. Applying the equation above we obtain:
1 
0 
č11= [u1 u2 u3 v1 v2 v3 v ]  
4 0  -8 = u1+v1-8=v1-8=0
 
1 
0 
  Recall that we just dropped u1,
0 
0  thus we can simply set it to be zero
 
Adopted from the lecture notes by Thomson Learning

Computing the Dual Variables


• č11= u1+v1-8=0 ; č21= u2+v1-9=0;
• č22= u2+v2-12=0; č23= u2+v3-13=0;
• č33 = u3+v3-16=0; č34= u3+v4-5=0.
• For each variable Xij in the basis ({X11, X21, X22, X23, X33, X34}),
we have the equation ui+vj=cij. Note that we set u1=0, thus
we need to solve the following system of m+n equations:
• u1=0; u1+v1=8; u2+v1=9; u2+v2=12;
• u2+v3=13; u3+v3=16; u3+v4=5.
• By solving the system above, we obtain:
• v1=8, u2=1, v2=11,v3=12, u3=4, v4=1
Adopted from the lecture notes by Thomson Learning

Computing the Reduced Cost


• For each non-basic variable, we now
compute the reduced cost:
• čij = ui+vj – cij, u=(0,1,4), v=( 8,11,12,1) 8 6 10 9
• We thus obtain: 9 12 13 7
• č12 = 0+11 – 6 = 5; č13 = 0+12 – 10 = 2; 14 9 16 5
• č14 = 0+1 – 9 = -8; č24 = 1+1 – 7 = -5;
• č31 = 4+8 – 14 = -2; č32 = 4+11 – 9 = 6.
• Since č32 is the largest, we choose X32 to
enter the basis.
Adopted from the lecture notes by Thomson Learning

Identify the Loop and the Update Value Ө


We have determined that x32 should enter the basis. As shown
in the table below the loop involving x 32 and basic variables: x33,
x23, x22. The odd cells in the loop are (2,2) and (3,3). Since the
smallest value of these two bv is 10 the pivot is 10.

35 35

10 20 20 50

10 30 40

45 20 30 30
Adopted from the lecture notes by Thomson Learning

Solution after One Pivot


• The new bfs will be:
• X11=35, X32=10, X21=10,
X22=10, X23=30 and X34=30
• The ui’s and vj’s for the new bfs
were obtained by solving
• u1=0; u1+v1=8;v1=8;
• u2+v1=9; u2+v2=12;

• u3+v2=9; u3+v4=5;
• u2+v3=13.
Adopted from the lecture notes by Thomson Learning

Final Solution

• Based on the reduced cost obtained in the previous slide,


we can see that x13 should enter the basis. We then follow
a similar process until an optimal solution is found. The
optimal solution for Powerco is X12=10, X13=25, X21=45,
X23=5, X32=10 and X34=30.
• The optimal objective function value becomes:
• Z=6(10)+10(25)+9(45)+13(5)+9(10)+5(30)=$1020
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau


• We now illustrate how the Simplex for TP works in the tableau form.
Take the powerco problem for example.
S.1: Use a method to find a FBS (NW-C method is used in the example)
(35, 8,0)
(10,9,0) (20,12,0) (20,13,0)
(10,16,0) (30, 5,0)

S.2: Calculate the values of the dual variables (start with u1=0)

(35, 8,0) 0
(10,9,0) (20,12,0) (20,13,0) 1
(10,16,0) (30, 5,0) 4
8 11 12 1
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


• S.3: Fill the cells for non-basic variables where Xij=0, and the reduced
cost is defined by -Cij+Ui+Vj.
(35, 8,0) (0,6,5) (0,10,2) (0,9,-8) 0
(10,9,0) (20,12,0) (20,13,0) (0,7,-5) 1
(0,14,-2) (0,9,6) (10,16,0) (30, 5,0) 4
8 11 12 1

S.4: Choose a variable (X32) to enter the basis. Find a loop and determine
how to update the variables (Ө=10) in the loop.
(35, 8,0) (0,6,5) (0,10,2) (0,9,-8) 0
(10,9,0) (20,12,0) (20,13,0) (0,7,-5) 1

(0,14,-2) (0,9,6) (10,16,0) (30, 5,0) 4


8 11 12 1
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


After updating the loop, we obtain a new FBS (X32 entered the basis, and
X33 left).
We then repeat steps 2,3,4 and obtain the following tableau.
Based on the reduced cost, X12 should enter the basis. We thus get a loop
consisting of four cells X11, X12, X22, X21.

(35, 8,0) (0,6,5) (0,10,2) (0,9,-2) 0

(10,9,0) (10,12,0) (30,13,0) (0,7,1) 1

(0,14,-8) (10,9,0) (0,16,-6) (30, 5,0) -2

8 11 12 7
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


After updating all the variables in the loop, we get a new FBS (X12 entered
the basis and X22 left).
Then we repeat steps 2,3,4 and obtain the following tableau.

Based on the new reduced cost, we see that X13 should enter the basis.
We find a loop and determine the value of Ө=25.

(25, 8,0) (10,6,0) (0,10,2) (0,9,-7) 0

(20,9,0) (0,12,-5) (30,13,0) (0,7,-4) 1

(0,14,-3) (10,9,0) (0,16,-1) (30, 5,0) 3

8 6 12 2
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


Update the new FBS
X12=10, X13=25, X21=45, X23=5, X32=10 and X34=30;
Calculate the dual variables Ui and Vj, and the reduced cost for NBVs;
From the following tableau, all the reduced costs are non-positive. Thus
the current solution is optimal. The optimal objective function value is:
Z=6(10)+10(25)+9(45)+13(5)+9(10)+5(30)=$1020.

(0, 8,-2) (10,6,0) (25,10,0) (0,9,-7) 0

(45,9,0) (0,12,-3) (5,13,0) (0,7,-2) 3

(0,14,-5) (10,9,0) (0,16,-3) (30, 5,0) 3

6 6 10 2
Adopted from the lecture notes by Thomson Learning

Roadmap
• Basic Introduction: Modeling
• Balanced transportation problem; Transfer unbalanced TP into a
balanced TP; Dealing with flexible demand.
• Initialization
• Northwest Corner Method; Minimum Cost Method; Vogel’s Penalty
method;
• Today’s topics: Simplex for Transportation Problem
• Simplex method with different initialization methods;
• Degenerate cases in Simplex.
• Other Topics:
• Sensitivity Analysis
• Assignment and Transshipment Problems
Adopted from the lecture notes by Thomson Learning

Simplex method for balanced TP


• Now let us try to find the optimal solution for Powerco
using the Simplex process started with a feasible solution
(x34=30, x12=20, x11=15, x21=30, x23=20,x33=10) generated
from the min-cost method.
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


Starting feasible solution: x34=30, x12=20, x11=15, x21=30,
x23=20,x33=10,
Compute the dual variables and the reduced cost;
(15, 8,0) (20,6,0) (0,10,2) (0,9,-8) 0

(30,9,0) (0,12,-5) (20,13,0) (0,7,-5) 1

(0,14,-2) (0,9,1) (10,16,0) (30, 5,0) 4

8 6 12 1

Based on the reduced cost, x13 enters the basis. We then


choose the loop and find the maximal update Θ=15.
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


After updating all the variables in the loop, we
recalculate the dual variables and the reduced cost. We
then select x32 to enter the basis
(0, 8,-2) (20,6,0) (15,10,0) (0,9,-10) 0

(45,9,0) (0,12,-3) (5,13,0) (0,7,-5) 3

(0,14,-2) (0,9,3) (10,16,0) (30, 5,0) 6

6 6 10 -1

Based on the loop, we find the


maximal update Θ=10.
Adopted from the lecture notes by Thomson Learning

Simplex for TP in Tableau: Cont.


After updating all the variables in the loop, we
recalculate the dual variables and the reduced cost.

(0, 8,-2) (10,6,0) (25,10,0) (0,9,-7) 0

(45,9,0) (0,12,-3) (5,13,0) (0,7,-2) 3

(0,14,-5) (10,9,0) (0,16,-3) (30, 5,0) 3

6 6 10 2

Since all the reduced costs are non-


positive, thus the current solution is
optimal!
Adopted from the lecture notes by Thomson Learning

Vogel’s method for balanced TP: I


• Next we try to find the optimal solution for Powerco using
the Simplex process started with a feasible solution
generated from Vogel’s penalty method.
• Based on the initial table, the highest penalty appears in
the third row. Therefore, we obtain: x34=30!

8 6 10 9 2 s1=35

9 12 13 7 2 s2=50

14 9 16 5 X34=30 4 s3=40

1 d1=45 3 d2=20 3 d3=30 2 d4=30


Adopted from the lecture notes by Thomson Learning

Vogel’s merhod for balanced TP: II


• Next we eliminate column 4, update the supply capacities
and the demands, and recalculate the penalties
• Based on the recalculated table, the highest penalty
appears in the third row. Therefore, we obtain: x32=10!

8 6 10 9 2 s1=35

9 12 13 7 3 s2=50

14 9 x32=10 16 5 X34=30 5 s3=10

1 d1=45 3 d2=20 3 d3=30 X


Adopted from the lecture notes by Thomson Learning

Vogel’s method for balanced TP: III


• Next we eliminate row 3, update the supply capacities and
the demands, and recalculate the penalties
• Based on the recalculated table, the highest penalty
appears in the third row. Therefore, we obtain: x12=10!

8 6 x12=10 10 9 2 s1=35

9 12 13 7 3 s2=50

14 9 x32=10 16 5 X34=30 X

1 d1=45 6 d2=10 3 d3=30 X


Adopted from the lecture notes by Thomson Learning

Vogel’s merhod for balanced TP: IV


• Next we eliminate column 2, update the supply capacities
and the demands, and recalculate the penalties
• Based on the recalculated table, the highest penalty
appears in the third row. Therefore, we obtain: x21=45!

8 6 x12=10 10 9 2 s1=25

9 x21=45 12 13 7 4 s2=50

14 9 x32=10 16 5 X34=30 X

1 d1=45 X 3 d3=30 X
Adopted from the lecture notes by Thomson Learning

Vogel’s method for balanced TP:V


• Next we eliminate column 1, update the supply capacities
and the demands, and recalculate the penalties
• Based on the recalculated table, the highest penalty
appears in the third row. Therefore, we obtain: x13=25,
x23=5 ! Optimal solution found! (to be verified)

8 6 x12=10 10 x13=25 9 X

9 x21=45 12 13 x23=5 7 X

14 9 x32=10 16 5 X34=30 X

X X X X
Adopted from the lecture notes by Thomson Learning

Degenerate TPs: I
• For some TP, there exist multiple solutions to the dual problem.

8 6 x12=20 10 x11=15 9 S1=35

9 x21=45 12 13 x23=15 7 S2=60

14 9 16 5 X34=30 s3=30

d1=45 d2=20 d3=30 d4=30

• Let u1=0, we obtain v2=6,v3=10, u2=3, v1=6!


• There exist multiple values to the dual variables u3 and v4:
• If we choose u3=0, v4=5, then u2+v4-c24=3+5-7>0. However, if we
add x24 to the basis, then no cycles can be found!
• If we reduce the value of v4, i.e., u3=2, v4=3, then one can verify
that the current solution is optimal!
Adopted from the lecture notes by Thomson Learning

Degenerate TPs: II
  Customer 1 Customer 2 Customer 3 Customer 4 Supply

Plant 1 $1,900 $1,300 $700 $500 15


x13=8 x14=7
Plant 2 $600, $1,000 $1,200 $200 10
x21=10
Plant 3 $1,000 $900 $400 $300 5
x31=1 x32=4
Demand 11 4 8 7  

• The default solution: u1=0,v3=700,v4=500,u2=0, v1=600, v2=500,


u3=400. We have u2+v4-c24=0+500-200>0. However, adding x24
to the current basis, we can’t find any loop!
• To ensure the optimality of the current solution, we need to
meet the conditions: u2≤-300 and u3≤-200!
• A suitable choice is: u3=-200, v1=1200, v2=1100, u2=-600,
Adopted from the lecture notes by Thomson Learning

Degenerate TPs: III


  Customer 1 Customer 2 Customer 3 Customer 4 Supply

Plant 1 $1,900 $1,300 $700 $500 15


x13=8 x14=7
Plant 2 $600, $1,000 $1,200 $200 10
x21=10
Plant 3 $1,000 $900 $400 $300 5
x31=1 x32=4
Demand 11 4 8 7  

• The default solution: u1=0, v3=700,v4=500,u2=0, v1=600, v2=400,


u3=500. We have u2+v4-c24=0+500-200>0. However, adding x24
to the current basis, we can not find any loop!
• To ensure the optimality of the current solution, we need to
meet the conditions: v4≤-200!
• Another suitable choice is: u1=700, v3=-0, v4=-200.
Adopted from the lecture notes by Thomson Learning

From the previous lecture


• Simplex method
• Find a BFS using one of the three methods
• Calculate the values of the dual variables (ui, i=2,…,m,vj, j=1,…, n);
• Compute the reduced cost (ui+vj-cij)and check the optimality
conditions;
• Choose the entering variable and Identify the loop involving the
entering variable and some basic variables in the current basis;
• Using the selected loop to compute Ө and update the basis
• Today’s topics, sensitivity analysis for transportation
problem
Adopted from the lecture notes by Thomson Learning

Sensitivity Analysis
• In this section we discuss the following three aspects of
sensitivity analysis for the transportation problem:
• 1. Changing the objective function coefficient of a non-basic
variable.
• 2. Changing the objective function coefficient of a basic variable.
• 3. Increasing a single supply by Δ and a single demand by Δ.
Adopted from the lecture notes by Thomson Learning

1. Changing the coefficient of a NBV


• Changing the coefficient cij of a non-basic variable xij will
leave the right hand side of the optimal tableau
unchanged. Thus the current basis will still be feasible.
• Since we are not changing cBVB-1, the ui’s and vj’s remain
unchanged. In row 0 only the coefficient of Xij will change.
Thus as long as the coefficient of Xij in the optimal row 0 is
non-positive, the current basis remains optimal.
Adopted from the lecture notes by Thomson Learning

Reduced Cost: The Powerco Example


• Find the range of c11 under
which the current basis (0, 8,-2) (10,6,0) (25,10,0) (0,9,-7) 0
remain optimal. (45,9,0) (0,12,-3) (5,13,0) (0,7,-2) 3
• If c11 is changed to 8+ Δ, then (0,14,-5) (10,9,0) (0,16,-3) (30, 5,0) 3
the reduced cost reduces to 6 6 10 2

• č11 = u1+v1-c11=6-(8+ Δ)=-2- Δ.

• Conclusion: the current basis


remains optimal if
• –2- Δ≤0 Δ≥-2, or c11≥8-2=6.
Adopted from the lecture notes by Thomson Learning

2. Changing the coefficient of a basic variable.


Since we are changing cBVB-1, the coefficient of each non-
basic variable in row 0 may change.
To determine whether the current basis remains optimal,
we must find the new ui’s and vj’s and use these values to
price out all non-basic variables.
The current basis remains optimal as long as all
non-basic variables have non-positive reduced cost.
Adopted from the lecture notes by Thomson Learning

Change the coefficient of a basic variable


Change c12 from 6 to 7: (0, 8,-2) (10,7,0) (25,10,0) (0,9,-6) 0

First calculate the dual (45,9,0) (0,12,-2) (5,13,0) (0,7,-1) 3

variables & the reduced costs (0,14,-6) (10,9,0) (0,16,-4) (30, 5,0) 2

Then check whether the current 6 7 10 3


solution is optim. and decide
what to do next.
Try work out the case c12=11 (0, 8,-2) (10,11,0) (25,10,0) (0,9,-2) 0

(45,9,0) (0,12,2) (5,13,0) (0,7,3) 3

(0,14,- (10,9,0) (0,16,-8) (30, 5,0) -2


10)
6 11 10 7
Adopted from the lecture notes by Thomson Learning

Change the coefficient of a basic variable


Consider change c12 to 6+Δ:
For the current solution to remain optim, we need
to ensure all the reduced costs are non-positive.
Δ-3≤0, Δ-2≤0,
(0, 8,-2) (10,6+Δ,0) (25,10,0) (0,9,-6) 0
-5-Δ≤0, -3-Δ≤0.
(45,9,0) (0,12,Δ-3) (5,13,0) (0,7,Δ-2) 3
Thus we can conclude
(0,14,-5- (10,9,0) (0,16,-3-Δ) (30, 5,0) 3-Δ
-3≤Δ≤2. Δ)
6 6+Δ 10 2+Δ
Adopted from the lecture notes by Thomson Learning

Allowable Range of Change: The Powerco


Example
For the range of c13 under which the current basis
remain optimal.
Suppose we change c13 from 10 to 10+ Δ. We thus
have a tableau as follows
(10,6,0) (25,10+Δ,0) 0
(45,9,0) (5,13,0) 3-Δ
(10,9,0) (30,5,0) 3
6+Δ 6 10+Δ 2
Adopted from the lecture notes by Thomson Learning

Continuing
•Compute
  the new reduced cost for non-basic variables.
(0,8, Δ-2) (10,6,0) (25,10+Δ,0) (0,9,-7) 0

(45,9,0) (0,12, -Δ-3) (5,13,0) (0,7,-2-Δ) 3-Δ


(0,14, Δ-5) (10,9,0) (0,16, Δ-3) (30,5,0) 3
6+Δ 6 10+Δ 2

To keep all the reduced costs non-positive,


č11 = Δ-2≤0 Δ≤2
č14 =-7
č22 =-3-Δ≤0 Δ≥-3
č24 = -2-Δ≤0 Δ ≥ -2 ∆ [-2,2]
č31 =Δ-5≤0 Δ≤5
č33 =Δ-3≤0 Δ≤3
Adopted from the lecture notes by Thomson Learning

3. Increasing Supply Si and Demand Dj by Δ.


Changing both supply and demand by the same amount
will maintain the balance of the TP.
Note that ui’s and vj’s can be viewed as the negative of
each constraint’s shadow price.
If the current basis remains optimal, we need to consider
two cases:
Case 1: If xij is a basic variable, increase xij by Δ.
New Z value = old Z value+Δui+Δvj
Example: if we increase s1 and d2 by 1 unit, then
New cost=1020+1(0)+1(6)=$1026
Adopted from the lecture notes by Thomson Learning

Increasing Supply Si and Demand Dj by Δ

 Case 2: When xij is a non-basic variable: Find the loop involving Xij
(x14) and some of the basic variables. Find an odd cell in the loop that
is in row I. Increase the value of this odd cell by Δ and go around the
loop, alternately increasing and then decreasing current basic
variables in the loop by Δ. In the following example, x14 is NBV. Δ
needs to satisfy the relation -10≤Δ as the basic variable .
+∆

-∆ +∆
Adopted from the lecture notes by Thomson Learning

Assignment Problems
Example: Machineco has four jobs to be completed. Each
machine must be assigned to complete one job. The time
required to setup each machine for completing each job is
shown in the table below. Machinco wants to minimize the total
setup time needed to complete the four jobs.
Adopted from the lecture notes by Thomson Learning

THE MODEL
According to the setup table Machinco’s problem
can be formulated as follows (for i,j=1,2,3,4):
Adopted from the lecture notes by Thomson Learning

Assignment or Transportation Problem?


For the model on the previous page note that:
Xij=1 if machine i is assigned to meet the demands of
job j;
Xij=0 if machine i is assigned to meet the demands of
job j
In general an assignment problem is balanced
transportation problem in which all supplies and
demands are equal to 1.
Adopted from the lecture notes by Thomson Learning

Solving the assignment problem


Although the transportation simplex appears to be very efficient, there
is a certain class of transportation problems, called assignment
problems, for which the transportation simplex is often very inefficient.
Next we introduce a new method for the assignment problem called
The Hungarian Method.
Adopted from the lecture notes by Thomson Learning

The Hungarian Method


Step1. Find a bfs. Find the minimum element in each row of the cost
matrix. Construct a new matrix by subtracting from each cost the
minimum cost in its row. For this new matrix, find the minimum cost in
each column. Construct a new matrix (reduced cost matrix) by
subtracting from each cost the minimum cost in its column.
Step2. Draw the minimum number of lines (horizontal and/or vertical)
that are needed to cover all zeros in the reduced cost matrix. If m lines
are required , an optimal solution is available among the covered zeros
in the matrix. If fewer than m lines are required, proceed to step 3.
Step3. Find the smallest nonzero element (call its value k) in the
reduced cost matrix that is uncovered by the lines drawn in step 2.
Now subtract k from each uncovered element of the reduced cost
matrix and add k to each element that is covered by two lines. Return
to step2.
Adopted from the lecture notes by Thomson Learning

Hungarian Method: Machineco Example


min
14 5 8 7 5
2 12 6 5 2
7 8 3 9 3
2 4 6 10 2

9 0 3 2 0
0 10 4 31
4 5 0 64
0 2 4 86
0 0 0 2 min
Adopted from the lecture notes by Thomson Learning

Hungarian Method: Example Cont.


• 9 0 3 0
0 109 43 10
4 5 0 4
0 21 43 65 k=1

9 0 x(1,2)=1 3 01
0 1(doubly 9 3 0 x(2,4)=1
crossed)
4 5 0 x(3,3)=1 4
0 (x(4,1)=1 1 3 5

Final Solution
Adopted from the lecture notes by Thomson Learning

Transshipment Problems
A transportation problem allows only shipments that go
directly from supply points to demand points. In many
situations, shipments are allowed between supply points or
between demand points.

Sometimes there may also be points (called transshipment


points) through which goods can be transshipped on their
journey from a supply point to a demand point. Fortunately,
the optimal solution to a transshipment problem can be
found by solving a transportation problem.
Adopted from the lecture notes by Thomson Learning

From a transshipment problem to a


transportation problem
Step 1. If necessary, add a dummy demand point (with a
supply of 0 and a demand equal to the problem’s excess
supply) to balance the problem. Shipments to the dummy and
from a point to itself will be zero. Let s= total available supply.

Step 2. Construct a transportation tableau as follows:


A row in the tableau will be needed for each supply point and
transshipment point, and a column will be needed for each
demand point and transshipment point.
Adopted from the lecture notes by Thomson Learning

Key Points in the Reformulation Process

(1) Each supply point will have a supply equal to it’s original
supply, and each demand point will have a demand to its
original demand. Let s= total available supply.
(2) Each transshipment point will have a supply equal to
(point’s original supply)+s and a demand equal to (point’s
original demand)+s.

This ensures that any transshipment point that is a net


supplier will have a net outflow equal to point’s original supply
and a net demander will have a net inflow equal to point’s
original demand. Although we don’t know how much will be
shipped through each transshipment point, we can be sure
that the total amount will not exceed s.
Adopted from the lecture notes by Thomson Learning

Transshipment Example
• Example:
• Widgetco manufactures widgets at two factories, one in
Memphis and one in Denver. The Memphis factory can
produce as 150 widgets, and the Denver factory can
produce as many as 200 widgets per day. Widgets are
shipped by air to customers in LA and Boston. The
customers in each city require 130 widgets per day.
Because of the deregulation of airfares, Widgetco believes
that it may be cheaper first fly some widgets to NY or
Chicago and then fly them to their final destinations. The
cost of flying a widget are shown next. Widgetco wants to
minimize the total cost of shipping the required widgets to
customers.
Adopted from the lecture notes by Thomson Learning

Transportation Tableau for


The Transshipment Example
• NY Chicago LA Boston Dummy Supply
• Memphis $8 $13 $25 $28 $0 150
• Denver $15 $12 $26 $25 $0 200
• NY $0 $6 $16 $17 $0 350
• Chicago $6 $0 $14 $16 $0 350
• Demand 350 350 130 130 90
• Supply points: Memphis, Denver
• Demand Points: LA Boston
• Transshipment Points: NY, Chicago
• Dummy node to have a balanced transportation problem
• Can be solved via the transportation simplex method
Adopted from the lecture notes by Thomson Learning

Solving the Transshipment Problem


8 13 X13=60 25 28 X15=90 0 150
15 12 X23=70 26 x24=130 25 0 200
x31=350 0 6 16 17 0 350
6 X32=350 0 14 16 0 350
350 350 130 130 90

A bfs from the min-cost method. We next compute the dual variables.
8
(0, 8,0) 13
(0,13,-1) (60, 25
25,0) 28
(0, 28,-4) 0
(90,0,0) 150 r1=5
u1=0
15
(0,15,-6) 12
(0,12,1) 26
(70,26,0) 25
(130,25,0) X25=90
(0,0,1)0 110
u2 =1r2=3
x31=350 0
(350,0,0) 6
(0,6,-2) 16
(0,16,1) 17
(0,17,-1) 0
(0,0-8) xu3=-8
6
(0,6,-2) 0
(350,0,0) 14
(0,14,-1) 16
(0,16,-4) 0
(0,0,-12) 350 r4=6
u4=-12
x
v1=8 350 c2=6
v2=12 130 c3=2
v3=25 130 c4=1
v4=24 x
v5=0
Adopted from the lecture notes by Thomson Learning

Solving the Transshipment Problem


(0, 8
8,0) (0,13,-1)
13 (130,
X13=6025,0)
25 (0, 28,-4)
28 X(20,0,0)
15=90 0 150
u1=0
(0,15,-6)
15 (0,12,0)
12 X(0,26,-1)
23=70 26 x(130,25,0)
24=130 25
(70,0,0)
0 u2 =0
200
(350,0,0)
x31=350 0 (0,6,-2)
6 (0,16,1)
16 (0,17,0)
17 (0,0-8)
0 u3=-8
350
(0,6,-10)
6 X(350,0,0)
32=350 0
(0,14,-1)
14 (0,16,-3)
16 (0,0,-12)
0 u4=-12
350
v1=8
350 v2=12
350 v3=25
130 v4=25
130 v5=0
90

Both x33 and x11 can enter the basis. After one more update, we
obtain the optimal solution.
(130,88,0) 13
(0,13,-1) 25
(0, 25,-1) 28
(0, 28,-3) 0
(90,0,0) 150 r1=5
u1=0
15
(0,15,-7) 12
(0,12,0) 26
(0,26,-2) 25
(130,25,0) X25=90
(70,0,0)0 110
u2 =0r2=3
x31=350 0
(220,0,0) 6
(0,6,-2) 16
(130,16,0) 17
(0,17,-1) 0
(0,0-8) xu3=-8
6
(0,6,-10) 0
(350,0,0) 14
(0,14,-2) 16
(0,16,-4) 0
(0,0,-12) 350 r4=6
u4=-12
x
v1=8 350 c2=6
v2=12 130 c3=2
v3=24 130 c4=1
v4=25 x
v5=0
Adopted from the lecture notes by Thomson Learning

Summary
• Basic Introduction: Modeling and Initialization
• Modeling: Balanced transportation problem; Transfer unbalanced
TP into a balanced TP; Dealing with flexible demand;
• Initialization: Northwest Corner Method; Minimum Cost Method
• Vogel’s Method;
• Simplex for Transportation Problem:
• Find a BFS; Compute the values of the dual variables and the
reduced cost;
• Choose a variable to enter the basis, find a loop and update all the
variables in the loop;
• Other topics:
• Sensitivity Analysis
• Assignment and Transshipment Problems

You might also like