You are on page 1of 30

TRANSPORTATION PROBLEM

Transportation Problem (TP)


No. of sources : m
No. of destinations : n
Fixed supply at each source : si
Fixed demand at each destination : dj
Unit cost of transportation from source i to destination j : cij
(different for each pair)

cij

si dj
LP Formulation (balanced TP)
Decision Variables:
xij : Quantity shipped from source i to destination j.
Minimize Z = i j cij.xij
subject to: j xij = si  i = 1 ,..., m
i xij = dj  j = 1, ..., n
xij  0  i = 1 ,..., m  j = 1, ..., n

cij , xij

si dj
• A general transportation model has two kinds of
constraints:
– “<=“ type capacity constraints (j xij <= si)
– “>=” demand constraints (i xij >= dj)

• If total capacity = total demand, both capacity and


demand constraints are “=”. (balanced model)

• What if a model is unbalanced?


– Add dummy source or dummy destination to balance it.
An example
Destinations (demand points)
Supply points Denver Miami Supply
capacity
(units)
Los Angeles 80 215 1000
Detroit 100 108 1500
New Orleans 102 68 1200
Demand 2300 1400
(units)

Unit transportation costs

Is it a balanced transportation problem?


Destinations (demand points)
Transportation
Supply points Denver Miami Supply
tableau capacity (units)

Los Angeles 80 x11 215 x12 1000


Detroit 100 x21 108 x22 1500

New Orleans 102 x31 68 x32 1200

Demand 2300 1400


(units)

Minimize Z = 80 x11 + 215 x12 + 100 x21 + 108 x22 + 102 x31 + 68 x32
s.t.
Supply constraints:
x11 + x12 = 1000
x21 + x22 = 1500
x31 + x32 = 1200

Demand constraints:
x11 + x21 + x31 = 2300
x12 + x22 + x32 = 1400

Non-negativity constraints:
x11, …, x32 >= 0
Lets now see the “A-matrix”
X11 X12 X21 X22 X31 X32
1 1 0 0 0 0
0 0 1 1 0 0
0 0 0 0 1 1
1 0 1 0 1 0
0 1 0 1 0 1

Observe:
A-matrix has only values 0 and 1.
Each column has only two ones.

This is a special structure in Transportation problem.


Exploiting the Special Structure
Number of variables and constraints can be quite large.
[50 sources, 200 destinations] : 10000 variables, 250 constraints.
Simplex method will be very inefficient!

Using the special structure and duality theory, develop a


specialized version of the algorithm for this problem.

Caveat: Problem is feasible only if  si =  dj , i.e. the problem


is balanced. This condition must be met to apply this
specialized approach.
• What if my problem is not balanced?
• Then balance it, by
– Adding a dummy source if  si <  dj
– Adding a dummy sink if  si >  dj
– Transportation cost from/to a dummy node is zero.
(Why?)
– What does transportation from/to a dummy node
represent?
Unfilled demand or spare supply.
An unbalanced problem: P1
Destinations (demand points)
Supply points Denver Miami Supply capacity
(units)
Los Angeles 80 215 1000
Detroit 100 108 1300
New Orleans 102 68 1200
Demand (units) 2300 1400

total supply (3500) < total demand (3700)


1000 LA

DEN
D.T 2300
.
1300
1200 N.O.
Cij = ? MI
1400

200 dummy
P1

Minimize Z = 80 x11 + 215 x12 + 100 x21 + 108 x22 + 102 x31 + 68 x32 + 0 x41 + 0 x42
s.t.
Supply constraints:
x11 + x12 = 1000
x21 + x22 = 1300
x31 + x32 = 1200
x41 + x42 = 200 //dummy supply node
Demand constraints:
x11 + x21 + x31 + x41 = 2300
x12 + x22 + x32 + x42 = 1400

Non-negativity constraints:
x11, …, x32, x41, x42 >= 0
Another unbalanced problem: P2
Destinations (demand points)
Supply points Denver Miami Supply capacity
(units)
Los Angeles 80 215 1000
Detroit 100 108 1500
New Orleans 102 68 1200
Demand (units) 1900 1400

total supply (3700) > total demand (3300)


DEN
1900
1000 LA
Cij = ?
MI 1400
1500 D.T.

1200 N.O.
dummy 400

In class exercise: modify your LP model for this problem.


P2

Minimize Z = 80 x11 + 215 x12 + 0 x13


+ 100 x21 + 108 x22 + 0 x23
+ 102 x31 + 68 x32 + 0 x33
s.t.
Supply constraints:
x11 + x12 + x13 = 1000
x21 + x22 + x23 = 1500
x31 + x32 + x33 = 1200
Demand constraints:
x11 + x21 + x31 = 1900
x12 + x22 + x32 = 1400
x13 + x23 + x33 = 400 //dummy demand node

Non-negativity constraints:
x11, …, x32, x13, x23, x33 >= 0
Going back to specialized algorithm
• In a TP with m sources, n destinations: we have
(m + n ) equality constraints.
• How many basic variables? (m+n) ?
• Are all constraints independent? Or, some redundancy is there?
Note: If we ignore any one constraint, it will automatically be satisfied
if the rest are satisfied.

Constraints from our first (balanced) problem:


1. x11 + x12 = 1000
2. x21 + x22 = 1500 Add (4) & (5); use (2) & (3):
3. x31 + x32 = 1200
you get back (1).
4. x11 + x21 + x31 = 2300
5. x12 + x22 + x32 = 1400
• Hence, in TP, no. of basic variables = m+n-1
Specialized algorithm for TP
• How to get a basic feasible solution?
– All constraints must be satisfied.
– m+n-1 basic variables.
• Such a solution is easy to find manually by
inspection.
– North West Corner Rule.
– Vogel’s Approximation Method (not teaching in class)
• No need for simplex tableau.
• Use a m × n Transportation tableau instead.
In-class exercise
• Truckloads of grains need to be transported from silos to
mills in a cost-effective manner. Unit transportation costs
($/mile/truck) are given below.

Source = 3
Destination = 4
Total supply = 15+25+10 = 50
Total demand = 5+15+15+15 = 50

Hence, this is a Balanced problem!

# of equality constraints = 3+4 = 7


# of basic variables = 6
North West Corner Rule
Mill 1 Mill 2 Mill 3 Mill 4 Supply
Silo 1 5 10 X
15 10
Silo 2 5 15 X
25 20
Silo 3 10
Demand 5 X
15 15 15 50
5

Select the cell in the north west corner of the table.


Set this variable to highest possible value.
This will satisfy either a row or a column.
Cross out this row or column.
Adjust supply/demand of uncrossed column or row.

Continue operation with remaining matrix


Solution:

x11 = 5;
x12 = 10;
x22 = 5;
x23 = 15;
x24 = 5;
x34 =10

All other xij are non-basic, i.e., zero.

Z = 5*10+10*2+5*7+15*9+5*20+10*18 = 520
Use of Duality Theory in TP algorithm
Primal (balanced TP) Dual
Minimize i j cij.xij Maximize i ui .si + j vj dj
subject to: dual vars. subject to: dual vars.
j xij = si  i = 1 ,..., m (ui) ui + vj <= cij (xij)
i xij = dj  j = 1, ..., n (vj)  i = 1 ,..., m
 j = 1, ..., n
xij  0  i = 1 ,..., m ui, vj unrestricted
 j = 1, ..., n  i = 1 ,..., m ;  j = 1, ..., n
In Dual problem, when the “<=“ type constraints become binding, their
shadow prices become positive.
Shadow prices of Dual constraints => xij = Primal’s decision variables!
We are only interested in xij > 0 i.e., basic variables of Primal. (non-basic xij’s
are zero anyway.)
Optimality test of TP

So, at optimality:
ui + vj = cij for all (i,j) where xij are basic variables
ui + vj < cij for all (i,j) where xij are nonbasic variables

Therefore, when for all non-basic variables we get


ui + vj – cij <= 0, we attain optimality. STOP.
Problem solving – In-class exercise
Basic cells
We used Northwest Corner Method to get a starting solution.
Destination Destination Destination Destination Supply
1 2 3 4

Source 1 10 (5) 2 (10) 20 11 15

Source 2 12 7 (5) 9 (15) 20 (5) 25

Source 3 4 14 16 18 (10) 10

Demand 5 15 15 15

Z = 10 * 5 + 2 * 10 + 7 * 5 + 9 * 15 + 20 * 5+ 18 * 10 = 520
• Is this solution optimal? A 2-step verification
process:
– Step1: Calculate ui and vj values for all “basic cells”

C11 = 10 = u1 + v1
C12 =2 = u1 + v2
C22 =7 = u2 + v2
C23 =9 = u2 + v3
C24 = 20 = u2 + v4
C34 = 18 = u3 + v4

A good idea would be to choose a ui = 0 that appears in most equations.

Set u2 = 0.

Then you get:


v2 = 7, v3 = 9, v4 = 20, u3 = -2, u1 = -5, v1 = 15.
– Step 2: for “non-basic cells”, calculate (ui + vj – cij)
– When all (ui + vj – cij) <= 0 , we reach optimality.

u1 + v3 - C13 = -5 + 9 – 20 = -16
u1 + v4 - C14 = -5 + 20 – 11 = 4 (POSITIVE)
u2 + v1 - C21 = 0 + 15 -12 = 3 (POSITIVE)
u3 + v1 - C31 = -2 + 15 – 4 = 9 (POSITIVE)
u3 + v2 - C32 = -2 + 7 – 14 = -9
u3 + v3 - C33 = -2 + 9 -16 = -9

Just like simplex, choose the most +ve entry as the “entering variable” for next
iteration.

Therefore, entering variable is x31.

Who leaves? To determine that, you need to identify a “closed-circuit” !


Find the leaving variable from current basis

Entering variable Leaving variable

Destination Destination Destination Destination Supply


1 2 3 4

Source 1 (-) 10 (5) (+) 2 (10) 20 11 15

Source 2 12 (-) 7 (5) 9 (15) (+) 20 (5) 25

Source 3 (+)4 14 16 (-) 18 (10) 10

Demand 5 15 15 15

New basic variable: x33 = 5; non-basic variable: x11 = 0.


Next tableau

Destination Destination Destination Destination Supply


1 2 3 4

Source 1 10 2 (15) 20 11 15

Source 2 12 7 (0) 9 (15) 20 (10) 25

Source 3 4 (5) 14 16 18 (5) 10

Demand 5 15 15 15

Z = 2 * 15 + 9 * 15 + 20* 10 + 4 * 5 + 18 * 5 = 475 (Optimal??)


– Step1: Calculate ui and vj values for all “basic cells”

C12 =2 = u1 + v2
C22 =7 = u2 + v2
C23 =9 = u2 + v3
C24 = 20 = u2 + v4
C31 =4 = u3 + v1
C34 = 18 = u3 + v4

Set u2 = 0.

Then you get:


u1 = -5, v2 = 7, v3 = 9, v4 = 20, u3 = -2, v1 = 6.
– Step 2: for “non-basic cells”, calculate (ui + vj – cij)
– Note: When all (ui + vj – cij) <= 0 , we reach optimality.

u1 + v1 - C11 -9
u1 + v3 - C13 -16
u1 + v4 – C14 +4
u2 + v1 – C21 -6
u3 + v2 – C32 -9
u3 + v3 - C33 -9

Entering variable is x14.


Identifying leaving variable
New basic variable: x14 = 10; New non-basic variable: x24 =0

Destination Destination Destination Destination Supply


1 2 3 4

Source 1 10 (-)2 (15 - 10) 20 (+) 11 (+10) 15

Source 2 12 7 (0 + 10) 9 (15) (-) 20 (0) 25


(+)
Source 3 4 (5) 14 16 18 (5) 10

Demand 5 15 15 15

Z = 2*5 + 11*10 + 7*10 + 9*15 + 4*5 + 18*5 = 435 (optimal??)


Step1: Calculate ui and vj values for all “basic cells”
C12 =2 = u1 + v2
C14 = 11 = u2 + v4 Set u2 = 0.
C22 =7 = u2 + v2
Then you get:
C23 =9 = u2 + v3
v2 = 7, v3 = 9, u1 = -5, v4 = 16,
C31 =4 = u3 + v1 u3 = 2, v1 = 2.
C34 = 18 = u3 + v4

Step 2: for “non-basic cells”, calculate (ui + vj – cij)

u1 + v1 - C11 = -13
All <= 0
u1 + v3 - C13 = -16
u2 + v1 – C21 = -10 OPTIMALITY REACHED.
u2 + v4 – C24 = -4
u3 + v2 – C32 = -5
u3 + v3 - C33 = -5

You might also like