Module 2 3 LPP Transportation
Module 2 3 LPP Transportation
Plotting :
0 2
-2 0
Q1 (same as Q1 of LPP-1)
Maximize
𝐬𝐮𝐛𝐣𝐞𝐜𝐭 𝐭𝐨
𝟐 𝒙𝟏 +𝟑 𝒙 𝟐 ≤ 60
𝟒 𝒙 𝟏+ 𝟑 𝒙𝟐 ≤ 96
0
𝐬𝐮𝐛𝐣𝐞𝐜𝐭 𝐭𝐨 𝐬𝐮𝐛𝐣𝐞𝐜𝐭 𝐭𝐨
𝟐 𝒙𝟏 +𝟑 𝒙 𝟐 ≤ 60 𝟐 𝒙𝟏 +𝟑 𝒙 𝟐+ 𝒔𝟏=60 : slack
variable for
𝟒 𝒙 𝟏+ 𝟑 𝒙𝟐 ≤ 96 constraint 1
: slack
0 𝟒 𝒙 𝟏+ 𝟑 𝒙𝟐 + 𝒔 𝟐=96
variable for
constraint 2
Non-negativity
,0 for all
variables in
Remember: When the inequation is type then the amount of available of raw the system
materials can either be used at full level or less than the level.
The slack variable represents of underutilization of resources if it exists. If there is
no under utilization then the slack variable will come as 0 at the end of the solution
Note that
only in the
first tables
Step 2 : Simplex initial Table it is the
RHS
𝒄 𝒋 𝟒𝟎𝟑𝟓 𝟎 𝟎
𝑪𝑩 B 𝒙 𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 b Ratio=b/
corresponding
𝒔𝟏 𝟎0 ∗23
2 1 0 60 60
variable in entry
=30
𝒔𝟐 𝟎+¿
0 ∗4
4 3 0 1 96
column
2
96
4
= 24 Exiting
variable
-
0-0 𝟑𝟓 𝟎 𝟎
𝒄 𝒋 𝟒𝟎𝟑𝟓 𝟎 𝟎
𝑷𝒓𝒐𝒇𝒊𝒕 𝒙 𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 b Ratio=b/
𝑪 Basic Var. corresponding
❑
𝒔 0 ∗23 2
1 0 60 60
𝟎𝑩 variable in entry
=30
𝒔𝟐
𝟏
𝟎 +¿
4 3 0 1 96
column
2
96
4
= 24 Exiting
variable
-
0-0 𝟑𝟓 𝟎 𝟎
Note that
only in the
first tables
Step 2 : Simplex initial Table it is the
RHS
𝒄 𝒋 𝟒𝟎𝟑𝟓 𝟎 𝟎
𝑪𝑩 B 𝒙 𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 b Ratio=b/
corresponding
𝒔𝟏 𝟎0 ∗23
2 1 0 60 60
variable in entry
=30
𝒔𝟐 𝟎+¿
0 ∗4
4 3 0 1 96
column
2
96
4
= 24 Exiting
variable
-
0-0 𝟑𝟓 𝟎 𝟎
𝑪𝑩 𝟒𝟎𝒙 𝟏
𝟑𝟓𝒙 𝟐𝒔 𝟏 𝒔 𝟐
𝒄B 𝒋 𝟎𝟎 b Ratio
𝟐 𝒔𝟏
Ratio=b/
𝑪𝒔𝑩 B0 𝒙 𝒙
3 𝒔 𝟐1 b corresponding
𝟏
3
2 −
1
𝟏
0
12 8 1
12
variable in entry
𝒔𝟏 0 0
2
1
2
2
−1 12 3
=8
column
Exiting
variable
𝒙 40 1 3 24224
𝒙𝟏 𝟏 40 14
3
4 0 14
0 4 2432 3
= 32
-
- 𝟓
𝟎-30=5
-40=0 𝟎
𝟎 − 𝟏𝟎
𝟎−𝟏𝟎=− 𝟏𝟎 4
- 𝟎𝟎 − 25 1 000
3
Since all - ≤ 0 we have reached optimal ; the values of variables are read from the column
b of the table . =18 and 8 and the profit = (40*18)+(35*8)=Rs. 1000
• A firm produces three products A, B and C each of which passes through
three departments: Fabrication, Finishing and Packaging. Each unit of
product A requires 3,4 and 2 ; a unit of B requires 5,4 and 4 while each
unit of product C requires 2,4 and 5 hours respectively in the three
departments. Every day 60 hours are available in the fabrication
department, 72 hours available in the finishing departments and 100 hours
in the packaging department. The unit contribution of product A is Rs 5, of
product B is Rs. 10 and product C is Rs. 8.
• (a) Formulate the problem as a LPP.
• (b) Determine the number of units of each product that should be made
each day to maximize the total contribution.
(c) Also determine if any capacity would remain unutilized.
Formulation
A B C Available
hours
Where Definition of Variables:
Fabricati
Let number of units of product A to be produced 3 5 2 60
number of units of product B to be produced on
number of units of product C to be produced Finishin 4 4 4 72
g
Packagin 2 4 5 100
g
Step 1 : Formulation and then Convert
the inequalities to equations
Maximize Maximize+0 +0 +0
𝐬𝐮𝐛𝐣𝐞𝐜𝐭 𝐭𝐨 𝐬𝐮𝐛𝐣𝐞𝐜𝐭 𝐭𝐨
𝟑 𝒙𝟏 +𝟓 𝒙 𝟐+𝟐 𝒙 𝟑 ≤60 𝟑 𝒙𝟏 +𝟓 𝒙 𝟐+𝟐 𝒙 𝟑 +𝒔𝟏 =60 : slack
variable for
𝟒 𝒙 𝟏+𝟒 𝒙𝟐 +𝟒 𝒙 𝟑 ≤72 constraint 1
𝟒 𝒙 𝟏+𝟒 𝒙𝟐 +𝟒 𝒙 𝟑 +𝒔𝟐 =72 : slack
𝟐 𝒙𝟏 +𝟒 𝒙𝟐 +𝟓 𝒙𝟑 ≤ 100 variable for
𝟐 𝒙𝟏 +𝟒 𝒙𝟐 +𝟓 𝒙𝟑 +𝒔 𝟑=100 constraint
: slack 2
0 variable for
,0 constraint 3
Non-negativity
for all
Remember: When the inequation is type then the amount of available of raw variables in
materials can either be used at full level or less than the level. the system
The slack variable represents of underutilization of resources if it exists. If
there is no under utilization then the slack variable will come as 0 at the end of
the solution
𝟓𝟏𝟎𝟖𝟎 𝟎𝟎
𝑿𝑪
𝑩 𝑩
𝒙𝟏
𝒙𝟐𝒙𝟑
𝒔𝟏𝒔𝟐
𝒔𝟑𝒃 𝐑𝐚𝐭𝐢𝐨
𝟎
𝒔𝟏 𝟑𝟓 𝟐𝟏 𝟎𝟎 𝟔𝟎𝟏𝟐 Exiting
variable
𝒔𝟐
𝟎 𝟒𝟒 𝟒𝟎 𝟏𝟎 𝟕𝟐𝟏𝟖
𝟎
𝒔𝟑 𝟐𝟒 𝟓𝟎 𝟎𝟏 𝟏𝟎𝟎
𝟐𝟓
- 𝟓𝟏𝟎𝟖𝟎 𝟎𝟎
For a maximization problem if- ≤ 0 we have reached
optimal, if not then take the most positive value as entry
variable
𝟓 𝟏𝟎𝟖 𝟎 𝟎𝟎
𝑿𝑪
𝑩 𝑩𝒙𝟏 𝒙𝟐𝒙𝟑 𝒔𝟏 𝒔𝟐
𝒔𝒃𝟑 𝐑𝐚𝐭𝐢𝐨
𝒙𝟐 𝟏
𝟏𝟎𝟑 / 𝟓 𝟐/ 𝟓𝟏/ 𝟓𝟎𝟎 𝟏𝟐 𝟑𝟎
𝒔𝟐𝟎𝟖 / 𝟓
𝟎 𝟏𝟐 /𝟓 - 𝟏 𝟎 𝟐𝟒𝟏𝟎
𝒔𝟑
𝟎− 𝟐 /𝟓
𝟎 𝟏𝟕 /𝟓 - 𝟎𝟏 𝟓𝟐 𝟐𝟔𝟎 /𝟏𝟕
- −𝟏 𝟎 𝟒 −𝟐 𝟎𝟎
Table 3
𝟓 𝟏𝟎𝟖𝟎 𝟎 𝟎
𝒙𝟏 𝒙𝟐 𝒔𝟏
𝒙𝟑 𝒔𝟐 𝒔𝒃𝟑
𝒙𝟐
𝟏𝟎𝟏 / 𝟑𝟏 𝟎𝟏/ 𝟑− 𝟏 /𝟔
𝟎 𝟖
𝒙𝟑𝟎𝟐 / 𝟑𝟎 𝟏- 𝟓/𝟏𝟐 𝟎 𝟏𝟎
𝒔𝟑
𝟎− 𝟖 /𝟎𝟑 𝟎𝟏/ 𝟑−𝟏𝟕 /𝟏𝟐𝟏 𝟏𝟖
- − 𝟏/𝟎
𝟑 𝟎− 𝟐/−
𝟑𝟓/𝟎 𝟑
For a maximization problem since- ≤ 0 we have reached
optimal
The values of production variables are read from the column b of
the table .
=0 , 8 and 10
Minimization
objective
function :
Coefficient of
artificial variable
as –M In the
objective
function
Maximization
objective
function
Coefficient of
artificial variables
in +M in the
objective
function
Simplex
• LPP
• Objective Function – Maximize or Minimize
• Constraints – greater than equal to, less than equal to
and equal to
• Non-negativity
• Maximize , subject to less than equal to constraints
• Maximization
• Less than equal to
• Greater than equal --- -surplus add artificial
• Equality --- add articficial
• Maximization 3x1+ 4x2 • Maximization 3x1 + 4x2
• Subject to constraints • Subject to
• 5x1+5x2<= 15 • 5x1 + 5x2 + s1 =15
• 3x1 + 6x2 >=20 • 3x1 + 6x2 – s2 = 20
• 4x1+5x2=15 • 4x1 + 5x2 =15
• X1,x2 >=0
Special Cases : Simplex
• Unbounded solution : if at any stage while solving through the tables, an
entry variable exists but there is no leaving variable then it is a case of
unbounded solution. (leaving ratio- minimum positive)
• A minimum positive ratio will not exist if the ratio is negative or undefined.
• MCQ : If the leaving ratios are -4, 0, -8 for a simplex table what will you choose ? 0
• Leaving ratio as -4,-5, 7/0 choose the correct leaving ratio – none of the options
• Multiple optimal : If there are values of cj-zj of non-basic elements as 0 in
the optimal table then this is the case of multiple optimal solution.
• Degeneracy : if there is a tie in the case of leaving ratio, then the solution is
said to have degeneracy
• Infeasibility : there is an artificial variable that exists in the final table ( cj-zj
condition matched) then it is case of infeasibility
Q15 Solution
Q18 Solution
Q19 Solution
Q19 Solution Contd.
Q19 Solution Contd.
Q19 Solution Contd.
Multiple Optimal Solution
• You arrive at an optimal solution
• Once you arrive at the optimal --- there is an other option
which is equally good
• Maximize 120 x1 + 120 x2 = 120*3+120*6
• 120*6+120*3
• X1= 3 , x2= 6
• X1=6 X2= 3
Other topics LPP
• Duality – relationship between primal and dual
• Sensitivity
Transportation Problem
Objective is to find
best cost / Minimum
cost for transporting
goods from multiple Step I: Initial Solution to To find out the initial
starting Points to Start with solution (Step I ) we have 3
multiple destinations methods
Origins
Destinations
P Q R S
A 12 10 12 13
Origins
B 7 11 8 14
C 6 16 11 7
Steps for NWC
1. Before solving a transportation problem check TS=TD
(balanced TP)
2. Choose the north-west corner of the transportation matrix
3. Start allocation by first checking the supply and demand
combinations. The allocations are made on the condition
that origins cannot supply more than their capacity and
destination points cannot take in more than what they
have.
4. Make allocation till we have exhausted the demand and
supply.
5. Find total cost for this initial solution
So Let’s get are note books out and get to work
Solution of IBFS : By north-
west corner
Destinations
P Q R S Supply
A 12 180 10 150 12 170 13 500 320 170 0
Origins
B 7 11 8 180 14 120 300 120 0
C 6 16 11 7 200 200
Demand 180 150 350 320 1000
0 0 180 200
0
TS=TD
Solution of IBFS : By north-
west corner (Allocations)
Destinations
P Q R S
A 12 180 10 150 12 170 13
Origins
B 7 11 8 180 14 120
C 6 16 11 7 200
Total Cost =
(12*180)+(10*150)+(12*170)+(14*120)+(7*200)=10220
Steps for LCM
1. Before solving a transportation problem check TS=TD
(balanced TP)
2. Search the least cost cell in the matrix
3. If there is a tie in the least cost then choose the one with
which allows for maximum allocation. If again there is a tie
in the allocation also, then choose either cell to start
allocation.
4. Start with allocation from least cost cell.
5. Allocations are carried out by matching demand and supply
values. Allocation in a particular cell will not be more than
corresponding supply or demand.
6. Continue allocation till exhausting supply.
Q2 a IBFS : LCM
TD=TS=1000
P Q R S Sup.
A 12 10
10 12
12 13 500
500
500
(150) (350)
(350)
(50) (300) (300)
(300)
B 7 11 8 14 300
8 (0)
300
(0)
C 6 16 (300)
11 7 200
6 7 200
(20)
(0)
Req. (180)
180 150 350 (20)
320 100
0
180 (150) 350
350 320
320
(0) (0) (50)(50) (300)
(300)
(0) (0)
Q2 a IBFS : LCM Allocation
P Q R S Sup.
A 12 10 12 13 500
(300)
C 6 16 11 7 200
Req. (180)
180 150 350 (20)
320 100
0
Total Cost =
(10*150)+(12*50)+(13*300)+(8*300)+(6*180)+(7*20)=9620
Steps IBFS : VAM
1. Before solving a transportation problem check TS=TD
(balanced TP)
B 9 7 9 800
C 6 5 8 150
D 4 3 3 400
Dema 750 200 500 1450 Is TD=TS? Notice TD>TS
nd
B 9 7 9 800 2 2
(600) (100) (100) 2
C 6 5 8 150
150 1 1
(150) (0) 1
D 4 3 3 400
400
0 ---
(400) (0) ----
Deman 750
750 200200 500
500
d (600) (100) (100)
I 2 1 5
II 2 1 1
III 3 2 1
Checking for Optimality after VAM
Check if m(no. of origins )+ n(no. of destinations)
-1 is equal to no. of allocation s
If this condition is met then you can go ahead for
MODI method
For allocated
D E F ui cells
A 8 4 10 cij =(ui+vj)
(100) [4] u1=-3
[2]
B 9 7 9
(600) (100) (100) u2=0 For
unallocated
C 6 5 8 cells
(150) u3=-3
[1] [2] Deltaij=
D 4 3 3 u4=-6 cij -(ui+vj)
[1] [2] (400)
I 20 18 10 8
II -- 18 10 8
III --- --- 10 8
IV --- --- 10 43
--- --- 33 ---
Conditions to Check
Remember to check the m+n-1 condition
after the updated allocation
Have you calculated the total cost?
All delta values are Start loop from cell Obtain theta which is For updated next
not positive therefore with most negative minimum of table , add theta to
optimality not delta. You are allowed allocations of cell allocation of cells
reached to turn only at the marked by - marked + in the loop
Thus construct loop allocated cells and subtract from
Let’s see how the You are supposed to allocation of cells
Theta min = min
loop is constructed come back at the marked as -
(8,3)=3
same cell from where
you started to close
the loop
Next Table after Updating
1 2 3 4 ui
A 20 30 50 17
(5) (2) u1=-31
[26] [41] Current Expenditure
B 70 35 40 60 u2=0 on Transport Rs. 1200
[19] (3) (7) [12] Total Saving (by using
C 40 12 60 25 transportation
(5) (13) u3=-23 solution)
[12] [43] =Rs.(1200-904)
vj v1=51 v2=35 v3=40 v4=48 =Rs. 296
D1 D2 D3 D4 Avail.
P1 19 30 50 12 7
P2 70 30 40 60 10
P3 40 10 60 20 8
Req. 5 8 7 15
D1 D2 D3 D4 Avail.
P1 19 30 50 12 7
P2 70 30 40 60 10
P3 40 10 60 20 8
P4 0 0 0 0 10
Req. 5 8 7 15 35 TD=TS
Q6 DIY IBFS by VAM
D1 D2 D3 D4 Avail. I II III IV
P1 19 30 50 12 5 750 7 7 7 7
2
P2 70 30 40 60 10 10 30 10
8 2 02 10
P3 40 10 60 20 8 80 10 10 20
20 --
P4 03 0 07 0 10
30 0 0 0 0
Req. 520 80 70 15
70 35
I 19 10 40 12
II 19 10 -- 12
III 19 -- -- 12
IV 19 -- -- 12
Q6 DIY Start Checking for
Optimality
Is m+n-1 = no.
D1 D2 D3 D4 Avail. of allocations?
P1 19 30 50 12 5 7
2
P2 70 30 40 60 10
8 2 Yes?
P3 40 10 60 20 8
8
P4 03 0 07 0 10 Then move
Req. 5 8 7 15 35 ahead to
obtain
optimal
solution by
MODI
Q6 DIY Start Checking for Optimality
All delta values are not positive therefore
optimality not reached
Thus construct loop
Let’s see how the loop is constructed
+3 7 u4=-19
[37] - [7] Theta min = min
vj (2,2,7)=2
v1=19 v2=-18 v3=19 v4=12
Moreover, tell me You will notice that some Will explain how to handle
are all the delta or one delta cell value is 0 multiple optimal solutions
values >0 … this can be identified as in the next slide
a case of multiple solution
case
Q6 DIY For getting alternate optimal
Since one of the delta values D1 D2 D3 D4 ui
is 0, thus we have the case of P1 19 30 50 12
multiple optimal solution u1=12
[7] [28] [38] 7
This means we can find an P2 70 - 30 40 60
+
alternate optimal solution [30] 8 2 [20] u2=40
P3 40 10 60 20
To get the alternate optimal + -
[20] 8 u3=20
solution , we start making a P4 0 0[0] [40]
0 0
loop from the cell which has
delta value as 0 5 5 u4=0
[10] - E +