Transportation Problem 3 - MODI Method (Optional)
Transportation Problem 3 - MODI Method (Optional)
Transportation Problem 3 - MODI Method (Optional)
I II III IV Supply
1 10 2 20 11 15
2 12 7 9 20 25
3 4 14 16 18 10
Demand 5 15 15 15
Initial Basic Feasible Solution
through North-West Corner Method
I II III IV
5 10
1 10 2 20 11
5 15 5
2 12 7 9 20
10
3 4 14 16 18
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5 10
1 10 2 20 11 15
5 15 5
2 12 7 9 20 25
Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5 10
1 10 2 20 11 15
5 15 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5 10
1 10 2 20 11 15
5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5-Θ 5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ for entering variable and form a loop
through allocated cells
I II III IV Supply
5-Θ 5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
Now the question is...
What maximum Θ can we allocate?
I II III IV Supply
5-Θ 5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
What maximum Θ can we allocate?
Demand supply constraints must be satisfied, and
Allocations must be non negative
I II III IV Supply
5-Θ 5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
What maximum Θ can we allocate?
Demand supply constraints must be satisfied, and
Allocations must be non negative. Hence, Θ should be 5
I II III IV Supply
5-Θ 5 10+Θ 10
1 10 2 20 11 15
5-Θ 5 15 5+Θ 5
2 12 7 9 20 25
Θ 10-Θ 10
3 4 14 16 18 10
Demand 5 15 15 15
What maximum Θ can we allocate?
Demand supply constraints must be satisfied, and
Allocations must be non negative. Hence, Θ should be 5
I II III IV Supply
5-5 5 10+5 10
1 10 2 20 11 15
5-5 5 15 5+5 5
2 12 7 9 20 25
5 10-5 10
3 4 14 16 18 10
Demand 5 15 15 15
What maximum Θ can we allocate?
Demand supply constraints must be satisfied, and
Allocations must be non negative. Hence, Θ should be 5
I II III IV Supply
5-5 10+5
1 10 2 20 11 15
5-5 15 5+5
2 12 7 9 20 25
5 10-5
3 4 14 16 18 10
Demand 5 15 15 15
What maximum Θ can we allocate?
Demand supply constraints must be satisfied, and
Allocations must be non negative. Hence, Θ should be 5
I II III IV Supply
0 15
1 10 2 20 11 15
0 15 10
2 12 7 9 20 25
5 5
3 4 14 16 18 10
Demand 5 15 15 15
Arbitrarily drop one of the zero allocations
I II III IV Supply
15
1 10 2 20 11 15
0 15 10
2 12 7 9 20 25
5 5
3 4 14 16 18 10
Demand 5 15 15 15
Arbitrarily drop one of the zero allocations
I II III IV Supply
15
1 10 2 20 11 15
0 15 10
2 12 7 9 20 25
5 5
3 4 14 16 18 10
Demand 5 15 15 15
v1 = 1 v2 = 2 v3 = 4 v4 = 15
I II III IV Supply
u1=0 15
1 10 2 20 11 15
0 15 10
u2=5 2 12 7 9 20 25
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Δ
v1 = 1 v2 = 2 v3 = 4 v4 = 15
I II III IV Supply
u1=0 0 15
1 10 2 20 11 15
-16 4
15 10
u2=5 2 12 7 9 20 25
-6 0
u3= 3 5 5
3 4 14 16 18 10
-9 -9
Demand 5 15 15 15
Maximum positive Δ
v1 = 1 v2 = 2 v3 = 4 v4 = 15
I II III IV Supply
u1=0 0 15
1 10 2 20 11 15
-16 4
15 10
u2=5 2 12 7 9 20 25
-6 0
u3= 3 5 5
3 4 14 16 18 10
-9 -9
Demand 5 15 15 15
Maximum positive Δ
v1 = 1 v2 = 2 v3 = 4 v4 = 15
I II III IV Supply
u1=0 0 15
1 10 2 20 11 15
-16 4
15 10
u2=5 2 12 7 9 20 25
-6 0
u3= 3 5 5
3 4 14 16 18 10
-9 -9
Demand 5 15 15 15
Put Θ
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-Θ Θ
0 15 10
u2=5 2 12 7 9 20 25
0+Θ 10-Θ
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Put Θ
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-Θ Θ
0 15 10
u2=5 2 12 7 9 20 25
0+Θ 10-Θ
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
The Loop
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-Θ Θ
0 15 10
u2=5 2 12 7 9 20 25
0+Θ 10-Θ
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Maximum Θ?
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-Θ Θ
0 15 10
u2=5 2 12 7 9 20 25
0+Θ 10-Θ
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Maximum Θ = 10
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-Θ Θ
0 15 10
u2=5 2 12 7 9 20 25
0+Θ 10-Θ
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Maximum Θ = 10
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
15-10 10
0 15 10
u2=5 2 12 7 9 20 25
0+10 10-10
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Maximum Θ = 10
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0 15
1 10 2 20 11 15
5 10
0 15 10
u2=5 2 12 7 9 20 25
10 0
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Updated Allocation
v1 = 10 v2 = 2 v3 = 13 v4 = 24
I II III IV Supply
u1=0
1 10 2 20 11 15
5 10
15
u2=5 2 12 7 9 20 25
10 0
u3= 3 5 5
3 4 14 16 18 10
Demand 5 15 15 15
Updated Allocation
I II III IV Supply
5 10
1 10 2 20 11 15
10 15
2 12 7 9 20 25
5 5
3 4 14 16 18 10
Demand 5 15 15 15
Cost (This is improvement!)
I II III IV Supply
5 10
1 10 2 20 11 15
10 15
2 12 7 9 20 25
5 5
3 4 14 16 18 10
Demand 5 15 15 15
Demand 5 15 15 15
All Δ are negative and therefore this is optimal solution (transportation
cost is minimum) and minimum cost is 435
Transportation Problem
Solution Using R (The Problem)
Transportation Problem
Solution Using R (The set-up)
You have to have the library lpSolve pre installed and loaded
Transportation Problem
Solution Using R (The solution)
R will give one solution even if there are multiple optima...
This should not be a matter of concern
THANK YOU