Professional Documents
Culture Documents
• 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, … , 𝑛
2
Transportation Problem in Tabular Form
Destinations (Demand nodes) Supply
1 2 ⋯ 𝑗 ⋯ 𝑛
𝑐11 𝑐12 𝑐1𝑗 𝑐1𝑛 𝑎1
1 𝑥11 𝑥12 ⋯ 𝑥1𝑗 ⋯ 𝑥1𝑛
⋮
Sources ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
(Supply
𝑐𝑖1 𝑐𝑖2 𝑐𝑖𝑗 𝑐𝑖𝑛 𝑎𝑖
nodes)
𝑖 𝑥𝑖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)
4
Formulation of Balanced Transportation Problem
• For balanced Transportation problem: m n
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)
𝑥𝑖𝑗 ≥ 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.
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
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
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
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𝑛
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
Sources
(Supply nodes) 𝑐𝑖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
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
15 − 𝜃 ≥ 0
Degenerate Solution 10 − 𝜃 ≥ 0
Total cost = 335 => 𝜃𝑚𝑎𝑥 =10
x14 is entering variable
x24 is entering variable 24
Iteration 4
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.
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
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