This document summarizes a presentation on optimization techniques for transportation problems. It discusses the optimality test, MODI method, and stepping stone method to check if a solution is optimal. The MODI and stepping stone methods are compared, and their application in finding optimal solutions is explained. The document also provides code examples in R and C++ for solving transportation problems using these optimization techniques.
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
MODI_SteppingStone.pptx
1. Presentation Topics-
Optimality test, MODI,
Stepping Stone Method
Group 3 Members-
Harsh, Nishant, Sakshi,
Shivansh, Soumya
Submitted To-
Dr. Harsh Pradhan Sir
2. Table of Contents
1. Introduction
2. MODI
3. Stepping Stone
4. Degeneracy
5. LPP Transformation
6. R code-Optimal solution
7. lp.transport function
8. Codes
3. Test for Optimality
● Optimality is the condition where there is no other
set of transportation routes that will further reduce
the transportation cost.
● To test optimality,Evaluate each unoccupied cell
in the transportation table in terms of an
opportunity of reducing total transportation cost.
4. How do the Modi and stepping stone methods differ?
In the stepping stone method, we have to draw as many closed paths as equal to the unoccupied
cells for their evaluation. To the contrary, in MODI method, only closed path for the unoccupied cell
with highest opportunity cost is drawn.
Application of these tests-
Both of these tests are used to find the optimal solution but the prior condition is to have a feasible solution
to use these test.
So, one can use VAM/NW/LC method to find feasible solution solution first and then check for the
optimality.
Techniques of
Optimality
MODI/U-V
Method
Stepping
Stone Method
6. Step 1- Calculate Initial Basic Feasible Solution(IBFS) using
any of the three methods
(m+n-1 = 6 = No. of allocated cells) So, Solution is non-degenerate
Transportation cost = 19x5+10x2+40x7+60x2+8x8+20x10 = Rs 779
7. Step 2- Find out set of ui & vj for each rows and column
satisfying Cij,=ui+ vj for each occupied cell
Assign v4= 0, we get
u1+ v4 = C14 — u1 + 0 = 10 or u1= 10
u2+ v4 = C24 — u2 + 0 = 60 or u2= 60
u3+ v4 = C34 — u3 + 0 = 20 or u3= 20
u1+ v1 = C11 — 10 +v1 = 19 or v1= 9
u3+ v2 = C32 — 20 +v2= 8 or v2= -12
u2 + v3 = C23 — 60 +v3= 40 or v3= -20
8. Step 3 - Find the cell evaluations dij = Cij – (ui + vj) for each
unoccupied cell (i,j)
d12= 30-[10+(-12)] = 32
d13= 50-[10+(-20)] = 60
d21= 70-[60+9] = 1
d22= 30-[60+(-12)]=-18
d31= 40-[20+9] = 11
d33 = 70-[20-(-20)] = 70
If all the values of dij >0 then solution is optimum. If any one value of dij <0 then solution
is not optimum. Then we go to step 4
9. Step-4 Making loop
Select the empty cell having the most
negative value of dij.
From the cell drawn a closed loop by
drawing horizontal and vertical lines and
take a turn from allocated cells only.
10. Step 5 - Making new iteration
Now chose the least negative
occupied value from traced path
and make new iteration by adding
least negative value where there
is plus and subtract least negative
value where there is minus in the
traced path and go to step 2
again.
Min(2,8) =2
11. Step 5 - New Iteration
Now chose the least negative
occupied value from traced path
and make new iteration by
adding least negative value
where there is plus and subtract
least negative value where there
is minus in the traced path and
go to step 2 again.
Min(2,8) =2
14. Stepping Stone
Step 1:Calculate Initial Basic Feasible Solution(IBFS) using any of
the three methods (Vogel’s)
(m+n-1 = 6 = No. of allocated cells) So, Solution is non-degenerate
Transportation cost = 19x5+10x2+40x7+60x2+8x8+20x10 = Rs 779
15. Step 2: Now make a closed loop for all unoccupied cells to
calculate net change for unoccupied cells
C(1,2) = 30-8+20-10 = 32
C(1,3) = 50-40+60-10 = 60
C(2,1) = 70-60+10-19 = 1
C(2,2) = 30-8+20-60 = -18
C(3,1) = 40 -20+10-19 = 11
C(3,3) = 70-20+60-40 = 70
If C(i ,j) > 0 , solution is optimum but
here C(2,2) is negative.
19 5 30 + 50 10 - 2
70 30 40 7 60 2
40 8 - 8 70 20 + 10
16. Step 3:
Choose cell (2,2) and make a
closed loop and assign alternate
plus minus sign at turning point
17. Step-4
Now choose the least negative
allocated value from the traced path and
make a new iteration.
19. Degeneracy in transportation problem
Phase 1 : Find the initial basic feasible solution using NWCN , Least cost or
VAM.
Phase 2: Optimising the basic feasible solution using UV Method.
Step 1: Check whether m+n-1 = (no. of allocated cell) , If no , go to step 2; If yes
, go to step 3.
20. Step 2: Convert the necessary no. of
unallocated cell into allocated cell to
satisfy the above condition.
● starting from the least value of
the unoccupied cell
● There should be no closed loop
formation.
● Select that cell as a new
allocated cell and assign ‘ε’.
60
20
ε
80
50
23. LPP TRANSFORMATION
Let, F1 transport a units to warehouse W1,
F1 transport b units to warehouse W2,
F1 transport c units to warehouse W3,
F1 transport d units to warehouse W4,
F2 transport e units to warehouse W1,
F2 transport f units to warehouse W2,
F2 transport g units to warehouse W3,
F2 transport h units to warehouse W4,
F3 transport k units to warehouse W1,
F3 transport l units to warehouse W2,
F3 transport m units to warehouse W3, and
F3 transport n units to warehouse W4
24. LPP TRANSFORMATION
Equations become like-
a+b+c+d <= 7
e+f+g+h <= 9
k+l+m+n <= 18
a+e+k = 5
b+f+l = 8
c+g+m = 7
d+h+n = 14
There are 8 equations and 12 variables.
We need to minimize our objective function, Z=
19a+30b+50c+10d+70e+30f+40g+60h+40k+8l+70m+20n
EXCEL LINK-
25. R CODES FOR TRANSPORTATION PROBLEM (OPTIMAL SOL.)
# Import lpSolve package
library(lpSolve)
# Set transportation costs matrix
costs <- matrix(c(19, 30, 50, 10,
70, 30, 40, 60,
40, 8 , 70, 20), nrow = 3, byrow = TRUE)
# Set Inequality/equality signs for factories
row.signs <- rep("<=", 3)
# Set right hand side coefficients for factories
row.rhs <- c(7, 9, 18)
# Set Inequality/equality signs for warehouses
col.signs <- rep("=", 4)
# Set right hand side coefficients for warehouses
col.rhs <- c(5, 8, 7, 14)
# Final value (z)
lp.transport(costs, "min", row.signs, row.rhs, col.signs, col.rhs)
# Variables final values
lp.transport(costs, "min", row.signs, row.rhs, col.signs,
col.rhs)$solution
#solution matrix
sol = lp.transport(costs, "min", row.signs, row.rhs, col.signs,
col.rhs)$solution
#set column names and row names
rownames(sol) <- c("Factory 1", "Factory 2", "Factory 3")
colnames(sol) <- c("Warehouse 1", "Warehouse 2",
"Warehouse 3", "Warehouse 4")
sol