SlideShare une entreprise Scribd logo
1  sur  25
Linear Programming
Two Phase Method
1
Two Phase Method
 For greater than or equal to constraint, the
slack variable has a negative co efficient
 Equality constraints do not have slack
variables
 If either of constraint is part of the model,
there is no convenient IBFS and hence two
phase method is used
2
Phase I
1. In this phase, we find an IBFS to the original
problem, for this all artificial variable are to be driven
to zero. To do this an artificial objective function (Z*)
is created which is the sum of all artificial variables.
The new objective function is then subjected to the
constraints of the given original problem using the
simplex method. At the end of Phase I, three cases
arises
A. If the minimum value of Z*=0, and no artificial
variable appears in the basis at a positive level then
the given problem has no feasible solution and
procedure terminates.
3
B. If the minimum value of Z*=0, and no artificial
variable appears in the basis, then a basic feasible
solution to the given problem is obtained.
C. If the minimum value of the Z*=0 and one or
more artificial variable appears in the basis at
zero level, then a feasible solution to the original
problem is obtained. However, we must take care
of this artificial variable and see that it never
become positive during Phase II computations.
4
Phase II
 When Phase I results in (B) or (C), we go on for Phase
II to find optimum solution to the given LP problem.
The basic feasible solution found at the end of Phase I
now used as a starting solution for the original LP
problem. Mean that find table of Phase I becomes
initial table for Phase II in which artificial (auxiliary)
objective function is replaced by the original objective
function. Simplex method is then applied to arrive at
optimum solution.
5
Example 1
 Solve given LPP by Two-Phase Method
1 2 3
1 2 3
1 2 3
1 2 3
5 4 3
Subject to 2 6 20
6 5 10 76
8 3 6 50
Max Z x x x
x x x
x x x
x x x
  
  
  
  
6
 Add artificial variable to the first constraint and slack
variable to second and third constraints.
 Phase I
 Assigning a cost 1 to artificial variable and cost o to
other variables, the objective function of the auxiliary
LPP is
1 2 3 1
1 2 3 1
1 2 3 1
1 2 3 1
1 2 3 2
* 0 0 0
* 0 0 0 0
Subject to 2 6 20
6 5 10 76
8 3 6 50
MinZ x x x A
MinZ x x x A
x x x A
x x x S
x x x S
   
    
   
   
   
7
-Max
Basis
Varia
ble
CB XB X1 X2 X3 S1 S2 A1
A1 -1 20 2 1 -6 0 0 1
S1 0 76 6 5 10 1 0 0
S2 0 50 8 -3 6 0 1 0
8
CJ 0 0 0 0 0 -1
X1 is entering variable and S2 is leaving variable
Basis
Variable
CB XB X1 X2 X3 S1 S2 A1 θ
A1 -1 20 2 1 -6 0 0 1 10
S1 0 76 6 5 10 1 0 0 76/6
S2 0 50 8 -3 6 0 1 0 50/8
ZJ -2 -1 6 0 0 -1
CJ- ZJ 2 1 -6 0 0 0
9
CJ 0 0 0 0 0 -1
 Row Calculations
 New R3=Old R3/8
 New R1=New R3*2-Old R1
 New R2=NewR3*6-Old R2
 X2 is entering variable and A1 is leaving variable
Basis
Variable
CB XB X1 X2 X3 S1 S2 A1 θ
A1 -1 7.5 0 1.75 -7.5 0 -1/4 1 4.28
S1 0 77/2 0 29/4 11/2 1 -0.75 0 5.31
X1 0 50/8 1 -3/8 6/8 0 1/8 0 ---
ZJ 0 -1.75 7.5 0 1/4 -1
CJ- ZJ 0 1.75 -7.5 0 -1/4 0
10
CJ 0 0 0 0 0 -1
X2 is entering variable and A1 is leaving variable
 Row Calculations
 New R1=Old R1/1.75
 New R2=New R1*29/4-Old R2
 New R3=NewR1*(3/8)+Old R3
As there is no artificial variable in the basis go to Phase II
Basis
Variable
CB XB X1 X2 X3 S1 S2
X2 0 4.28 0 1 -4.28 0 -0.14
S1 0 7.47 0 0 36.53 0 0.765
X1 0 7.85 1 0 -0.86 0 0.073
ZJ 0 0 0 0 0
CJ-ZJ 0 0 0 0 0
11
Phase II
 Consider the final Simplex table of Phase I, consider
the actual cost associated with the original variables.
Delete the artificial variable A1 column from the table
as it is eliminated in Phase II.
1 3 1 2
1 3 1 2
5 4 3 0 0
5 4 3 0 0 0
Max Z x x x S S
Max Z x x x S S
    
     
12
Basis
Variable
CB XB X1 X2 X3 S1 S2
X2 -4 4.28 0 1 -4.28 0 -0.14
S1 0 7.47 0 0 36.53 0 0.765
X1 5 7.85 1 0 -0.86 0 0.073
ZJ 5 -4 12.82 0 0.925
CJ-ZJ 0 0 -9.82 0 -0.925
13
CJ 5 -4 3 0 0
 As the given problem is of maximization and all the
values in CJ-ZJ row are either zero or negative, an
optimal solution is reached and is given by
 X1=7.855
 X2=4.28 and
 Z=5X1-4X2+3X3
 Z=5(7.855)-4(4.28)+3(0)
= 22.15
14
Example 2
 Solve by Two-Phase Simplex Method
1 2 3
1 2 3
1 2 3
1 2 3
4 3 9
Subject to 2 4 6 15
6 6 12
, , 0
Max Z x x x
x x x
x x x
x x x
   
  
  

15
 Add artificial variable to the first constraint and slack
variable to second and third constraints.
 Phase I
 Assigning a cost 1 to artificial variable and cost o to
other variables, the objective function of the auxiliary
LPP is
A new auxiliary linear programming problem
16
1 2 3 1 2
1 2
1 2 3 1 1
1 2 3 2 2
* 0 0 0
* 0
2 4 6 15
6 6 12
Min Z x x x A A
Min Z A A
x x x S A
x x x S A
    
  
    
    
Max - -
Phase I
Basis
Variable
CB XB X1 X2 X3 S1 S2 A1 A2
A1 -1 15 2 4 6 -1 0 1 0
A2 -1 12 6 1 6 0 -1 0 1
17
CJ 0 0 0 0 0 -1 -1
 Row Calculations
 New Z*=R3+R1+R2
X3 is entering variable and A2 is leaving variable
Basis
Variabl
e
CB XB X1 X2 X3 S1 S2 A1 A2 θ
A1 -1 15 2 4 6 -1 0 1 O 15/6
A2 -1 12 6 1 6 0 -1 0 1 12/6
ZJ -8 -5 -12 1 0 -1 -1
CJ-ZJ 8 5 12 -1 -1 0 0
18
CJ 0 0 0 0 0 -1 -1
 Row Calculations
 New R2=Old R2/6
 New R1= New R2*6-Old R1
X2 is entering variable and A1 is leaving variable
Basis
Variable
CB XB X1 X2 X3 S1 S2 A1 θ
A1 -1 3 -4 3 0 -1 1 1 1
X3 0 2 1 1/6 1 0 -1/6 0 12
ZJ 4 -3 0 1 -1 -1
CJ-ZJ -4 3 0 -1 1 0
19
CJ 0 0 0 0 0 -1
 Row Calculations
 New R1=Old R1/3
 New R2= New R1*(1/6)-Old R2
Optimality condition is satisfied as Z* is having zero
value
Basis
Variable
CB XB X1 X2 X3 S1 S2
X2 0 1 -4/3 1 0 -1/3 1/3
X3 0 11/6 11/9 0 1 1/18 -2/9
ZJ 0 0 0 0 0
CJ-ZJ 0 0 0 0 0
20
CJ 0 0 0 0 0
Phase II
 Original objective function is given as
 Consider the final Simplex table of Phase I, consider
the actual cost associated with the original variables.
Delete the artificial variable A1 column from the table
as it is eliminated in Phase II.
1 2 3 1 2
1 2 3 1 2
1 2 3 1
1 2 3 2
1 2 3
4 3 9 0 0
4 3 9 0 0
Subject to 2 4 6 0 15
6 6 0 12
, , 0
Max Z x x x S S
Max Z x x x S S
x x x S
x x x S
x x x
     
    
   
   

21
Initial Basic Feasible Solution
Basis
Variable
CB XB X1 X2 X3 S1 S2 θ
X2 -3 1 -4/3 1 0 -1/3 1/3 9/4
X3 -9 11/6 11/9 0 1 1/18 -2/9 1.5
ZJ -7 -3 -9 -1/2 -1
CJ-ZJ 3 0 0 1/2 1
22
CJ -4 -3 -9 0 0
X1 is entering variable and X3 is leaving variable
 Row Calculations
 New R2=Old R2/(11/9)
 New R1=New R2+Old R1
 As all the values in Z row are zero or negative, the
condition of optimality is reached.
Basis
Variable
CB XB X1 X2 X3 S1 S2
X2 -3 3 0 1 12/11 -3/11 13/33
X1 -4 3/2 1 0 9/11 1/22 -2/11
ZJ -4 -3 72/11 7/11 3/11
CJ-ZJ 0 0 -27/11 -7/11 -3/11
23
CJ -4 -3 -9 0 0
 X1=3/2
 X3=3
 Hence Z= -4X1 -3X2 -9X3
Z= -4(1.5)-3(3)-9(0)
Z= -15
24
Thank You
25

Contenu connexe

Tendances (20)

Simplex method
Simplex methodSimplex method
Simplex method
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method ppt
 
Big m method
Big   m methodBig   m method
Big m method
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Operations Research - The Dual Simplex Method
Operations Research - The Dual Simplex MethodOperations Research - The Dual Simplex Method
Operations Research - The Dual Simplex Method
 
Big M method
Big M methodBig M method
Big M method
 
the two phase method - operations research
the two phase method - operations researchthe two phase method - operations research
the two phase method - operations research
 
Graphical Method
Graphical MethodGraphical Method
Graphical Method
 
Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation Case
 
Duality
DualityDuality
Duality
 
Linear programming using the simplex method
Linear programming using the simplex methodLinear programming using the simplex method
Linear programming using the simplex method
 
simplex method
simplex methodsimplex method
simplex method
 
Simplex algorithm
Simplex algorithmSimplex algorithm
Simplex algorithm
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Simplex Method.pptx
Simplex Method.pptxSimplex Method.pptx
Simplex Method.pptx
 
Dual simplexmethod
Dual simplexmethodDual simplexmethod
Dual simplexmethod
 
Simplex algorithm
Simplex algorithmSimplex algorithm
Simplex algorithm
 
Canonical form and Standard form of LPP
Canonical form and Standard form of LPPCanonical form and Standard form of LPP
Canonical form and Standard form of LPP
 
Solving linear programming model by simplex method
Solving linear programming model by simplex methodSolving linear programming model by simplex method
Solving linear programming model by simplex method
 

Similaire à Two Phase Method- Linear Programming

Twophasemethod 131003081339-phpapp01
Twophasemethod 131003081339-phpapp01Twophasemethod 131003081339-phpapp01
Twophasemethod 131003081339-phpapp01kongara
 
Simplex Method
Simplex MethodSimplex Method
Simplex Methodkzoe1996
 
Linear programming
Linear programmingLinear programming
Linear programmingsabin kafle
 
simplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universitysimplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universityshobhakedari59
 
Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4Ed Dansereau
 
Lp model, simplex method
Lp model, simplex method   Lp model, simplex method
Lp model, simplex method praveenbabu63
 
Ouantitative technics
Ouantitative technics Ouantitative technics
Ouantitative technics Gayu Joseph
 
OR Linear Programming
OR Linear ProgrammingOR Linear Programming
OR Linear Programmingchaitu87
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear ProgrammingSukhpalRamanand
 
Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6Yasser Ahmed
 
Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisDagnaygebawGoshme
 
Simplextabular
SimplextabularSimplextabular
Simplextabularhushgas
 
OR presentation simplex.pptx
OR presentation simplex.pptxOR presentation simplex.pptx
OR presentation simplex.pptxpranalpatilPranal
 

Similaire à Two Phase Method- Linear Programming (20)

Twophasemethod 131003081339-phpapp01
Twophasemethod 131003081339-phpapp01Twophasemethod 131003081339-phpapp01
Twophasemethod 131003081339-phpapp01
 
Simplex Method
Simplex MethodSimplex Method
Simplex Method
 
Linear programming
Linear programmingLinear programming
Linear programming
 
simplex method-maths 4 mumbai university
simplex method-maths 4 mumbai universitysimplex method-maths 4 mumbai university
simplex method-maths 4 mumbai university
 
2. lp iterative methods
2. lp   iterative methods2. lp   iterative methods
2. lp iterative methods
 
Operations research 1_the_two-phase_simp
Operations research 1_the_two-phase_simpOperations research 1_the_two-phase_simp
Operations research 1_the_two-phase_simp
 
Simplex part 2 of 4
Simplex part 2 of 4Simplex part 2 of 4
Simplex part 2 of 4
 
MFCS2-Module1.pptx
MFCS2-Module1.pptxMFCS2-Module1.pptx
MFCS2-Module1.pptx
 
Lp model, simplex method
Lp model, simplex method   Lp model, simplex method
Lp model, simplex method
 
Chapter four
Chapter fourChapter four
Chapter four
 
Ouantitative technics
Ouantitative technics Ouantitative technics
Ouantitative technics
 
aaoczc2252
aaoczc2252aaoczc2252
aaoczc2252
 
OR Linear Programming
OR Linear ProgrammingOR Linear Programming
OR Linear Programming
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 
Linear programming
Linear programmingLinear programming
Linear programming
 
Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6
 
Unit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisisUnit.3. duality and sensetivity analisis
Unit.3. duality and sensetivity analisis
 
Simplextabular
SimplextabularSimplextabular
Simplextabular
 
OR presentation simplex.pptx
OR presentation simplex.pptxOR presentation simplex.pptx
OR presentation simplex.pptx
 
Metode simpleks dual
Metode simpleks dualMetode simpleks dual
Metode simpleks dual
 

Dernier

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 

Dernier (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 

Two Phase Method- Linear Programming

  • 2. Two Phase Method  For greater than or equal to constraint, the slack variable has a negative co efficient  Equality constraints do not have slack variables  If either of constraint is part of the model, there is no convenient IBFS and hence two phase method is used 2
  • 3. Phase I 1. In this phase, we find an IBFS to the original problem, for this all artificial variable are to be driven to zero. To do this an artificial objective function (Z*) is created which is the sum of all artificial variables. The new objective function is then subjected to the constraints of the given original problem using the simplex method. At the end of Phase I, three cases arises A. If the minimum value of Z*=0, and no artificial variable appears in the basis at a positive level then the given problem has no feasible solution and procedure terminates. 3
  • 4. B. If the minimum value of Z*=0, and no artificial variable appears in the basis, then a basic feasible solution to the given problem is obtained. C. If the minimum value of the Z*=0 and one or more artificial variable appears in the basis at zero level, then a feasible solution to the original problem is obtained. However, we must take care of this artificial variable and see that it never become positive during Phase II computations. 4
  • 5. Phase II  When Phase I results in (B) or (C), we go on for Phase II to find optimum solution to the given LP problem. The basic feasible solution found at the end of Phase I now used as a starting solution for the original LP problem. Mean that find table of Phase I becomes initial table for Phase II in which artificial (auxiliary) objective function is replaced by the original objective function. Simplex method is then applied to arrive at optimum solution. 5
  • 6. Example 1  Solve given LPP by Two-Phase Method 1 2 3 1 2 3 1 2 3 1 2 3 5 4 3 Subject to 2 6 20 6 5 10 76 8 3 6 50 Max Z x x x x x x x x x x x x             6
  • 7.  Add artificial variable to the first constraint and slack variable to second and third constraints.  Phase I  Assigning a cost 1 to artificial variable and cost o to other variables, the objective function of the auxiliary LPP is 1 2 3 1 1 2 3 1 1 2 3 1 1 2 3 1 1 2 3 2 * 0 0 0 * 0 0 0 0 Subject to 2 6 20 6 5 10 76 8 3 6 50 MinZ x x x A MinZ x x x A x x x A x x x S x x x S                      7 -Max
  • 8. Basis Varia ble CB XB X1 X2 X3 S1 S2 A1 A1 -1 20 2 1 -6 0 0 1 S1 0 76 6 5 10 1 0 0 S2 0 50 8 -3 6 0 1 0 8 CJ 0 0 0 0 0 -1
  • 9. X1 is entering variable and S2 is leaving variable Basis Variable CB XB X1 X2 X3 S1 S2 A1 θ A1 -1 20 2 1 -6 0 0 1 10 S1 0 76 6 5 10 1 0 0 76/6 S2 0 50 8 -3 6 0 1 0 50/8 ZJ -2 -1 6 0 0 -1 CJ- ZJ 2 1 -6 0 0 0 9 CJ 0 0 0 0 0 -1
  • 10.  Row Calculations  New R3=Old R3/8  New R1=New R3*2-Old R1  New R2=NewR3*6-Old R2  X2 is entering variable and A1 is leaving variable Basis Variable CB XB X1 X2 X3 S1 S2 A1 θ A1 -1 7.5 0 1.75 -7.5 0 -1/4 1 4.28 S1 0 77/2 0 29/4 11/2 1 -0.75 0 5.31 X1 0 50/8 1 -3/8 6/8 0 1/8 0 --- ZJ 0 -1.75 7.5 0 1/4 -1 CJ- ZJ 0 1.75 -7.5 0 -1/4 0 10 CJ 0 0 0 0 0 -1 X2 is entering variable and A1 is leaving variable
  • 11.  Row Calculations  New R1=Old R1/1.75  New R2=New R1*29/4-Old R2  New R3=NewR1*(3/8)+Old R3 As there is no artificial variable in the basis go to Phase II Basis Variable CB XB X1 X2 X3 S1 S2 X2 0 4.28 0 1 -4.28 0 -0.14 S1 0 7.47 0 0 36.53 0 0.765 X1 0 7.85 1 0 -0.86 0 0.073 ZJ 0 0 0 0 0 CJ-ZJ 0 0 0 0 0 11
  • 12. Phase II  Consider the final Simplex table of Phase I, consider the actual cost associated with the original variables. Delete the artificial variable A1 column from the table as it is eliminated in Phase II. 1 3 1 2 1 3 1 2 5 4 3 0 0 5 4 3 0 0 0 Max Z x x x S S Max Z x x x S S            12
  • 13. Basis Variable CB XB X1 X2 X3 S1 S2 X2 -4 4.28 0 1 -4.28 0 -0.14 S1 0 7.47 0 0 36.53 0 0.765 X1 5 7.85 1 0 -0.86 0 0.073 ZJ 5 -4 12.82 0 0.925 CJ-ZJ 0 0 -9.82 0 -0.925 13 CJ 5 -4 3 0 0
  • 14.  As the given problem is of maximization and all the values in CJ-ZJ row are either zero or negative, an optimal solution is reached and is given by  X1=7.855  X2=4.28 and  Z=5X1-4X2+3X3  Z=5(7.855)-4(4.28)+3(0) = 22.15 14
  • 15. Example 2  Solve by Two-Phase Simplex Method 1 2 3 1 2 3 1 2 3 1 2 3 4 3 9 Subject to 2 4 6 15 6 6 12 , , 0 Max Z x x x x x x x x x x x x            15
  • 16.  Add artificial variable to the first constraint and slack variable to second and third constraints.  Phase I  Assigning a cost 1 to artificial variable and cost o to other variables, the objective function of the auxiliary LPP is A new auxiliary linear programming problem 16 1 2 3 1 2 1 2 1 2 3 1 1 1 2 3 2 2 * 0 0 0 * 0 2 4 6 15 6 6 12 Min Z x x x A A Min Z A A x x x S A x x x S A                   Max - -
  • 17. Phase I Basis Variable CB XB X1 X2 X3 S1 S2 A1 A2 A1 -1 15 2 4 6 -1 0 1 0 A2 -1 12 6 1 6 0 -1 0 1 17 CJ 0 0 0 0 0 -1 -1
  • 18.  Row Calculations  New Z*=R3+R1+R2 X3 is entering variable and A2 is leaving variable Basis Variabl e CB XB X1 X2 X3 S1 S2 A1 A2 θ A1 -1 15 2 4 6 -1 0 1 O 15/6 A2 -1 12 6 1 6 0 -1 0 1 12/6 ZJ -8 -5 -12 1 0 -1 -1 CJ-ZJ 8 5 12 -1 -1 0 0 18 CJ 0 0 0 0 0 -1 -1
  • 19.  Row Calculations  New R2=Old R2/6  New R1= New R2*6-Old R1 X2 is entering variable and A1 is leaving variable Basis Variable CB XB X1 X2 X3 S1 S2 A1 θ A1 -1 3 -4 3 0 -1 1 1 1 X3 0 2 1 1/6 1 0 -1/6 0 12 ZJ 4 -3 0 1 -1 -1 CJ-ZJ -4 3 0 -1 1 0 19 CJ 0 0 0 0 0 -1
  • 20.  Row Calculations  New R1=Old R1/3  New R2= New R1*(1/6)-Old R2 Optimality condition is satisfied as Z* is having zero value Basis Variable CB XB X1 X2 X3 S1 S2 X2 0 1 -4/3 1 0 -1/3 1/3 X3 0 11/6 11/9 0 1 1/18 -2/9 ZJ 0 0 0 0 0 CJ-ZJ 0 0 0 0 0 20 CJ 0 0 0 0 0
  • 21. Phase II  Original objective function is given as  Consider the final Simplex table of Phase I, consider the actual cost associated with the original variables. Delete the artificial variable A1 column from the table as it is eliminated in Phase II. 1 2 3 1 2 1 2 3 1 2 1 2 3 1 1 2 3 2 1 2 3 4 3 9 0 0 4 3 9 0 0 Subject to 2 4 6 0 15 6 6 0 12 , , 0 Max Z x x x S S Max Z x x x S S x x x S x x x S x x x                     21
  • 22. Initial Basic Feasible Solution Basis Variable CB XB X1 X2 X3 S1 S2 θ X2 -3 1 -4/3 1 0 -1/3 1/3 9/4 X3 -9 11/6 11/9 0 1 1/18 -2/9 1.5 ZJ -7 -3 -9 -1/2 -1 CJ-ZJ 3 0 0 1/2 1 22 CJ -4 -3 -9 0 0 X1 is entering variable and X3 is leaving variable
  • 23.  Row Calculations  New R2=Old R2/(11/9)  New R1=New R2+Old R1  As all the values in Z row are zero or negative, the condition of optimality is reached. Basis Variable CB XB X1 X2 X3 S1 S2 X2 -3 3 0 1 12/11 -3/11 13/33 X1 -4 3/2 1 0 9/11 1/22 -2/11 ZJ -4 -3 72/11 7/11 3/11 CJ-ZJ 0 0 -27/11 -7/11 -3/11 23 CJ -4 -3 -9 0 0
  • 24.  X1=3/2  X3=3  Hence Z= -4X1 -3X2 -9X3 Z= -4(1.5)-3(3)-9(0) Z= -15 24