You are on page 1of 33

Transportation Problem

• A special class of LP dealing with transportation of goods from sources (e.g.,


factories) to destinations (e.g., warehouses, markets).
Sources Destinations
c11, x11
1 1
node
2 2
.. .. Arc
i j
.. ..
.
m n
cmn, xmn
Network Representation of the transportation model

• Decision: To determine number of units to be shipped from each source to different destinations.
• Objective: To minimize the total shipping cost while satisfying supply and demand requirements.
1
Notations
Parameters
𝑚 : number of sources, indexed as 𝑖
𝑛 : number of destinations, indexed as 𝑗
𝑎𝑖 : supply available at source 𝑖, 𝑖 = 1, 2, … , 𝑚
𝑏𝑗 : demand at destination 𝑗, 𝑗 = 1, 2, … , 𝑛
𝑐𝑖𝑗 : cost of transporting unit item from source 𝑖 to destination 𝑗

Decision
𝑥𝑖𝑗: number of units of item to be shipped from source i to
destination 𝑗, ∀𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛

Number of decision variables? : mn

2
Transportation Problem in Tabular Form
Destinations (Demand nodes) Supply
1 2 ⋯ 𝑗 ⋯ 𝑛
𝑐11 𝑐12 𝑐1𝑗 𝑐1𝑛 𝑎1
1 𝑥11 𝑥12 ⋯ 𝑥1𝑗 ⋯ 𝑥1𝑛

𝑐21 𝑐22 𝑐2𝑗 𝑐2𝑛 𝑎2


2 𝑥21 𝑥22 ⋯ 𝑥2𝑗 ⋯ 𝑥2𝑛


Sources ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
(Supply
𝑐𝑖1 𝑐𝑖2 𝑐𝑖𝑗 𝑐𝑖𝑛 𝑎𝑖
nodes)
𝑖 𝑥𝑖1 𝑥𝑖2 ⋯ 𝑥𝑖𝑗 ⋯ 𝑥𝑖𝑛


⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮

𝑐𝑚1 𝑐𝑚2 𝑐𝑚𝑗 𝑐𝑚𝑛 𝑎𝑚


𝑚 𝑥𝑚1 𝑥𝑚2 ⋯ 𝑥𝑚𝑗 ⋯ 𝑥𝑚𝑛

Demand 𝑏1 𝑏2 ⋯ 𝑏𝑗 ⋯ 𝑏𝑚 3
General Formulation
m n
Minimize Z =  cij xij
i 1 j 1

Subject to
n

x
j 1
ij  ai , i  1, 2,..., m (Supply constraints)

x
i 1
ij  b j , j  1, 2,..., n (Demand constraints)

xij  0, i  1, 2,..., m and j  1, 2,..., n

4
Formulation of Balanced Transportation Problem
• For balanced Transportation problem: m n

Total supply =Total demand, i.e. 


i 1
ai   b j
j 1

m n
Minimize Z =  cij xij
i 1 j 1

Subject to
n

x
j 1
ij  ai , i  1, 2,..., m (Supply constraints)

x
i 1
ij  b j , j  1, 2,..., n (Demand constraints)

xij  0, i  1, 2,..., m and j  1, 2,..., n 5


Example
• Automobile company
Plants: Delhi, Lucknow, Bangalore
Distribution Centres: Jaipur, Hyderabad

• Unit Transportation Cost


Decision Variables
Jaipur (1) Hyderabad (2) Capacity 1 2
Delhi (1) 50 300 1000 1 𝑥11 𝑥12

Lucknow (2) 100 250 1500


2 𝑥21 𝑥22
Bangalore (3) 500 125 1200
3 𝑥31 𝑥32
Demand 2300 1400

Here, Total supply = Total demand = 3700 6


Formulation
Minimize 𝑍 = 50𝑥11 + 300𝑥12 + 100𝑥21 + 250𝑥22 + 500𝑥31 + 125𝑥32
Subject to
𝑥11 + 𝑥12 = 1000
𝑥21 + 𝑥22 = 1500 Supply Constraints
𝑥31 + 𝑥32 = 1200

𝑥11 + 𝑥21 + 𝑥31 = 2300


Demand Constraints
𝑥12 + 𝑥22 + 𝑥32 = 1400

𝑥𝑖𝑗 ≥ 0, ∀𝑖 = 1, 2, 3; 𝑗 = 1, 2

Special Structure
𝑥11 𝑥12 𝑥21 𝑥22 𝑥31 𝑥32
1 1 Supply
1 1 Constraints
Integer Basic
𝐀= 1 1 Feasible solution
1 1 1 Demand
1 1 1 Constraints 7
Number of basic variables
(for a balanced transportation problem)
• Ordinarily, there is one basic variable for each functional constraint in a linear
programming problem. For transportation problems with 𝑚 sources and 𝑛
destinations, the number of functional constraints is 𝑚 + 𝑛. However, the number
of basic variables is (𝑚 + 𝑛 – 1).
• The reason is that the functional constraints are equality constraints, and this set of
𝑚 + 𝑛 equations has one extra (or redundant) equation that can be deleted without
changing the feasible region, i.e. any one of the constraints is automatically
satisfied whenever the other (𝑚 + 𝑛 – 1) constraints are satisfied.
• This fact can be verified by showing that any supply constraint exactly equals the
sum of all demand constraints minus the sum of the other supply constraints, and
that any demand constraint also can be reproduced by summing the supply
constraints and subtracting the other demand constraints.

8
Transportation Simplex method
For feasibility: Transportation problem will have feasible solutions if
and only if m n

 ai   b j
i 1 j 1

Transportation Simplex
Step 1: Find initial Basic Feasible Solution
Step 2: Is the solution Optimal? If yes, STOP, otherwise go to Step 3
Step 3: Determine entering variable (from non-basic variables).
Step 4: Determine leaving variable (from current basic variables).
Find the new basic solution, and go to Step 2

9
Initial Basic feasible solution
• Integer solutions property: If ai and bj (for all i, j) have integer
value, then all the basic variables will have integer value.

• General Rule for finding initial BFS:


Step 1: Select a cell (i, j) for allocation according to some criteria
(Northwest corner rule, Least cost rule, Vogel’s approximation method)
Step 2: Allocate the amount in the selected cell (i, j) as minimum of
(ai, bj), and adjust the associated amounts of supply and
demand.
Step 3: Cross out the row or column with zero supply or demand. If
both row and column are exhausted simultaneously, cross out
either row or column, and leave a zero supply (demand) in the
uncrossed row (column).
Step 4: If exactly one row or column is left uncrossed, allocate the
remaining amount to its cell according to their supply/demand
10
requirements, and stop. Otherwise, go to Step 1
Example Problem
Destination
1 2 3 4 Supply

10 0 20 11 15
1

Source 12 7 9 20 25
2

0 14 16 18 5
3

Demand 5 15 15 10 45

m n

 a  b
i 1
i
j 1
j  45
11
Northwest Corner Rule
1. Begin by selecting cell (1,1) (northwest corner of the table)
2. If the last selected cell is (i, j) and source i has any supply remaining, then
select the next cell as (i, j+1) (One column to right), else select cell (i+1, j)
(one row down)

1 2 3 4 Supply

10 0 20 11 15/10
1 5 10

12 7 9 20 25/20/5
2 5 15 5

0 14 16 18 5
3 5

Demand 5 15/5 15 10/5

Initial total cost, Z = 10×5+0×10+7×5+9×15+20×5+18×5 = 410


12
Least Cost Method
• Allocate as much as possible to the cell with the smallest unit cost
(Break tie arbitrarily)

1 2 3 4 Supply

10 0 20 11 0 15/0
1 15

12 7 9 20 25/10
2 15 10

0 14 16 18 5/0
3 5 0

Demand 5 15 15 10

Initial total cost, 𝑍 = 0 × 15 + 11 × 0 + 9 × 15 + 20 × 10 + 0 × 5 + 18 × 0 = 335


13
VOGEL’S APPROXIMATION METHOD
• For each row and column under consideration, calculate penalty as absolute difference
between the two smallest unit cost cij still remaining in that row or column.
• If two cells tie for the minimum cost in the row or column, the penalty is set at zero for that
row or column.
• Identify row or column with the maximum penalty (break ties arbitrarily) and select the
cell with least cost in the selected row or column.
• Finally, the last row/column is made satisfied according to Least cost method
1 2 3 4 Supply Penalty
10 0 20 11
1 15 0 15/0 10 11 9

12 7 9 20
2 15 10 25/10 2 2 11

0 14 16 18
3 5 0 5/0 14 2 2

Demand 5 15 15 10

Penalty 10 7 7 7
Initial total cost, 𝑍 = 0 × 15 + 11 × 0 + 9 × 15 + 20 × 10 + 0 × 5 + 18 × 0 = 335 14
Summary of NWC Rule and VAM

• NWC: quick and easy


– Far from optimality because no attention to costs

• VAM: popular and gives better initial BFS


– Penalty: minimum extra unit cost for failing to make
an allocation to the cell having smallest unit cost

15
Dual of balanced Transportation Problem
Destinations (Demand nodes) Supply Dual
Variable
1 2 ⋯ 𝑗 ⋯ 𝑛
𝑐11 𝑐12 𝑐1𝑗 𝑐1𝑛 𝑎1 𝑢1
1 𝑥11 𝑥12 ⋯ 𝑥1𝑗 ⋯ 𝑥1𝑛

𝑐21 𝑐22 𝑐2𝑗 𝑐2𝑛 𝑎2 𝑢2


2 𝑥21 𝑥22 ⋯ 𝑥2𝑗 ⋯ 𝑥2𝑛

⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
Sources
(Supply nodes) 𝑐𝑖1 𝑐𝑖2 𝑐𝑖𝑗 𝑐𝑖𝑛 𝑎𝑖 𝑢𝑖
𝑖 𝑥𝑖1 𝑥𝑖2 ⋯ 𝑥𝑖𝑗 ⋯ 𝑥𝑖𝑛

⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮

𝑐𝑚1 𝑐𝑚2 𝑐𝑚𝑗 𝑐𝑚𝑛 𝑎𝑚 𝑢𝑚


𝑚 𝑥𝑚1 𝑥𝑚2 ⋯ 𝑥𝑚𝑗 ⋯ 𝑥𝑚𝑛

Demand 𝑏1 𝑏2 ⋯ 𝑏𝑗 ⋯ 𝑏𝑚
16
Dual variable 𝑣1 𝑣2 ⋯ 𝑣𝑗 ⋯ 𝑣𝑛
Dual of Balanced Transportation Problem
Let ui : dual variable associated with the supply constraint of source i
vj : dual variable associated with the demand constraint of destination j
m n
max  ui ai   v j b j
i 1 j 1

subject to
ui  v j  cij , i  1, 2, , m; j  1, 2, ,n
ui and v j unrestricted, i, j

 Economic interpretation
• A shipping company proposes to producer (facing the primal problem) to pick
an item from source i at the price ui per unit and deliver it at destination j at the
price vj per unit.
• Dual constraint ensures that the prices are competitive
• Therefore, if shipping company knows all ai and bj, then shipping company will
find all ui and vj to maximize the total return.
17
Optimality Test in Transportation Simplex
• Calculate equivalent to 𝑧𝑖𝑗 − 𝑐𝑖𝑗 of simplex tableau
• Z-row: 𝐜𝐁 𝐁 −𝟏 𝐀 − 𝐜 = 𝐲𝐀 − 𝐜 ⇒ 𝑧𝑖𝑗 − 𝑐𝑖𝑗 = 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 , ∀𝑖, 𝑗
• For each basic variable xij : Set 𝑧𝑖𝑗 − 𝑐𝑖𝑗 = 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 = 0
• For each non-basic variable xij , Calculate 𝑧𝑖𝑗 − 𝑐𝑖𝑗 = 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗
• Since transportation problem has minimization type objective
function, therefore
If ui + vj - cij ≤ 0 for each NBV xij, then the current solution is optimal
If ui + vj - cij > 0, then corresponding NBV xij is the candidate for entering variable.
Entering variable: NBV with the most positive value of ui + vj - cij

If xij is a BV If xij is a NBV


cij cij
xij
ui + vj - cij 18
Step1: Initial BFS (Using NWC rule)

1 2 3 4 Dual variable

10 0 20 11 u1
1 5 10
12 7 9 20 u2
2 5 15 5
0 14 16 18 u3
3 5

Dual Variable v1 v2 v3 v4

Total cost, Z = 10×5+0×10+7×5+9×15+20×5+18×5 = 410


19
Iteration 1
Step 2: Optimality Test (minimization problem)
BFS is optimal if and only if ui  v j  cij  0 i, j such that x ij is NBV
If x ij is a BV, then ui  v j  cij
How to calculate ui and vj?
Number of basic variables  m  n  1 = number of equations in ui and vj
Number of unknowns  m  n
Set one of the ui or vj to 0 and solve m  n  1 equations to calculate remaining ui and vj
Now, for each BV x ij , ui  v j  cij
x11 : u1  v1  10
x12 : u1  v2  0
x22 : u2  v2  7
x23 : u2  v3  9
x24 : u2  v4  20
x34 : u3  v4  18
Set u1  0 , and so v1  10, v2  0, u2  7, v3  2, v4  13, u3  5
20
For each NBV, calculate ui  v j  cij (updated cost coefficients)
z13  c13  u1  v3  c13  0  2  20  18

z14  c14  u1  v4  c14  0  13  11  2


z21  c21  u2  v1  c21  7  10  12  5
z31  c31  u3  v1  c31  5  10  0  15

z32  c32  u3  v2  c32  5  0  14  9

z33  c33  u3  v3  c33  5  2  16  9


ui
10 0 20 11
5 10 0
-18 2
12 7 9 20 The current solution is
not optimal
5 15 5 7
5
0 14 16 18
5 5
15 -9 -9
vj 10 0 2 13 21
Step 3: Entering Variable
The non-basic variable corresponding to most positive ui  v j  cij
 x31 is entering variable
Step 4: Leaving variable
 Equivalent to feasibility condition in Simplex.
 No need to calculate explicit ratio as constraint coefficients are 1
 Equivalent to minimum ratio rule: Construct a “closed loop” using vertical and horizontal
segments, which starts and terminates at the entering variable cell and other corners of the loop lie in
basic variable cells.
 If entering variable (x31) is increased by Ɵ unit, then decrease/increase Ɵ from various basic variables
at the corner of the loop to maintain feasibility. Ɵ= minimum of xij value from the -Ɵ cells
 Select leaving variable of smallest value from (-Ɵ) cell, i.e., (x34) (break tie arbitrarily)
ui
10 0 20 11
5 ˗Ɵ 10 + Ɵ 0
-18 2
5−𝜃 ≥0
12 7 9 20 5−𝜃 ≥0
7 5−𝜃 ≥0
5 15 5
=>𝜃𝑚𝑎𝑥 =5
5 ˗Ɵ +Ɵ
0 14 16 18
5 5
+Ɵ 15 -9 -9 - Ɵ
22
vj 10 0 2 13
Iteration 2
ui
10 0 20 11
0 15
0
˗Ɵ +Ɵ
-18 2
12 7 9 20
0 15 10 7
+Ɵ ˗Ɵ
5
0 14 16 18
5 -10
-24 -24 -15 0−𝜃 ≥0
0−𝜃 ≥0
vj 10 0 2 13 => 𝜃𝑚𝑎𝑥 =0
Degenerate Solution
Total cost = 335
x21 is entering variable
x11 is leaving variable 23
Iteration 3

15 − 𝜃 ≥ 0
Degenerate Solution 10 − 𝜃 ≥ 0
Total cost = 335 => 𝜃𝑚𝑎𝑥 =10
x14 is entering variable
x24 is entering variable 24
Iteration 4

Since ui  v j  cij  0 for all non-basic variables Optimal Solution (Degenerate)


x12= 5, x14= 10, x21= 0, x22=10,
Therefore, the current solution is optimal x23=15, x31= 5, other xij = 0
Total cost = 315

25
Find Optimal Solution with the initial BFS
using VAM
1 2 3 4 ui
10 0 20 11
1 15 0 0

12 7 9 20
2 15 10 9

0 14 16 18
3 5 0 7

vj -7 0 0 11

26
Iteration 1
1 2 3 4 ui
10 0 20 11
1 15 -Ɵ 0 0
-17 -20 +Ɵ
12 7 9 20
2 15 10 9
+Ɵ -Ɵ
-10 2
0 14 16 18
3 5 0 7
-7 -9
vj -7 0 0 11

15 − 𝜃 ≥ 0
10 − 𝜃 ≥ 0
=> 𝜃𝑚𝑎𝑥 =10

27
New BFS
1 2 3 4 ui
10 0 20 11
1 5 0
10
-17 -18
12 7 9 20
2 10 15 7
-12 2 -2
0 14 16 18
3 5 0 7
-7 -7
vj -7 0 2 11
Optimal Solution (Degenerate)
x12= 5, x14= 10
Since ui  v j  cij  0 for all non-basic variables
x22=10, x23=15, x31= 5, x34= 0
Therefore, the current solution is optimal other xij = 0
Total cost = 315

28
Special Cases of Transportation Problems
 Balanced Transportation problem with Maximization type objective:
Transportation-type problems that concern profits or revenues rather than costs
with the objective to maximize profits rather than to minimize costs.

- Reverse the optimality and entering variable rules:


• If 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 ≥ 0 for all non-basic variables, then the current
BFS is optimal.
• Otherwise, enter the non-basic variable with the most negative value
of 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 into the basis.

29
Special Cases of Transportation Problems
 Balanced Transportation problem (Minimization type) with Unacceptable
Route(s):
– Transportation between certain origin-destination pair(s) may be unacceptable due to
weather factors, equipment breakdowns, labor problems, or skill requirements that
either prohibit, or make undesirable
– If shipment from source i to destination j is not desirable Set 𝑐𝑖𝑗 = M (where M is a
Large positive number)
Example: If shipment from source 3 to destination 1 is not desirable (acceptable),
i.e. 𝑥31 = 0. Set 𝑐31 = M
Destination
1 2 3 4
Supply

10 2 20 11 15
1
Source 12 7 9 20 25
2
M 14 16 18 5
3

Demand 5 15 15 10 45 30
Special Cases of Transportation Problems
 Multiple optimal solution:
• If 𝑢𝑖 + 𝑣𝑗 − 𝑐𝑖𝑗 = 0 for at least one non-basic variable

31
Special Cases of Transportation Problems
 Unbalance Transportation Problem
• Convert into a Balanced Transportation Problem and apply the procedure
Case (i): If total supply > total demand
- Add a dummy destination
- Set demand of dummy destination = total supply – total demand
- Set cost of shipping unit item to the dummy destination from each supply node
as zero
Destination
Destination
1 2 3 4 Dummy Supply
1 2 3 4 Supply
1 10 2 20 11 0 15
1 10 2 20 11 15
Source
Source 2 12 7 9 20 0 25
2 12 7 9 20 25
3 5 14 16 18 0 5
3 5 14 16 18 5
Demand 5 7 8 10 15
Demand 5 7 8 10
32
Special Cases of Transportation Problems

Case (ii): If total supply < total demand


- Add a dummy supply node
- Set supply from dummy supply node = total demand – total supply
- Set cost of shipping unit item from the dummy supply node to each destination
as zero

Destination
Destination
1 2 3 4 Supply
1 2 3 4 Supply
1 10 2 20 11 15
1 10 2 20 11 15
Source
2 12 7 9 20 20
Source
2 12 7 9 20 20
3 5 14 16 18 5
3 5 14 16 18 5
Dummy 0 0 0 0 5
Demand 5 15 15 10
Demand 5 15 15 10 33

You might also like