0% found this document useful (0 votes)
129 views14 pages

Two Phase Method Explained with Example

- The two-phase method is used when a linear programming problem contains constraints with equality or greater than/equal to signs. - In the first phase, a basic feasible solution is found by minimizing artificial variables added to convert inequalities to equalities. - In the second phase, the simplex method is applied to maximize the original objective function using the basic feasible solution from phase 1. - The example problem is solved using the two phase method by first finding a basic feasible solution in phase 1, then applying the simplex method in phase 2 to find the optimal solution.

Uploaded by

ABHISHEK SHARMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views14 pages

Two Phase Method Explained with Example

- The two-phase method is used when a linear programming problem contains constraints with equality or greater than/equal to signs. - In the first phase, a basic feasible solution is found by minimizing artificial variables added to convert inequalities to equalities. - In the second phase, the simplex method is applied to maximize the original objective function using the basic feasible solution from phase 1. - The example problem is solved using the two phase method by first finding a basic feasible solution in phase 1, then applying the simplex method in phase 2 to find the optimal solution.

Uploaded by

ABHISHEK SHARMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Two Phase Method

- Abhishek Sharma
- 2018pie5375
When should we use 2 phase method?
• If there is any constraint with = or ≥ sign , then we can use two-phase
method.
• It is an alternative to the Big M method.
• bfs is found at the first phase.
• Problem is solved using simplex method at the second phase.
Example 1

• Minimize z = -3x1 + x2 - 2x3 Maximize z = 3x1 – x2 + 2x3


• subject to
• x1 + 3x2 + x3 ≤ 5 x1 + 3x2 + x3 + x4 = 5
2x1 – x2 + x3 ≥ 2 2x1 – x2 + x3 – x5 + A1 = 2
4x1 + 3x2 - 2x3 = 5 4x1 + 3x2 - 2x3 + A2 = 5

• x1, x2, x3 ≥ 0 x1, x2, x3, x4, x5, A1, A2 ≥ 0


Basic Variable
Maximize z = 3x1 – x2 + 2x3

x1 + 3x2 + x3 + x4 = 5 • n-m=0
2x1 – x2 + x3 – x5 + A1 = 2 • n-m=4
4x1 + 3x2 - 2x3 + A2 = 5
• x1, x2, x3, x5 = 0
x1, x2, x3, x4, x5, A1, A2 ≥ 0
Phase 1
• Objective Function : Min z = sum of all artificial variables
• Assign a cost –1 to each artificial variable
• Maximize W= 0x1 + 0x2 + 0x3 + 0x4 + 0x5 + (–A1) + (–A2)
Phase 1
Phase1 cases

W>0
W=0
No feasible
solution

Without With artificial


artificial variable.
variable Cj of ‘A’=0
Two Phase Method: Table 1
Maximize W= 0x1 + 0x2 + 0x3 + 0x4 + 0x5 + (–A1) + (–A2)
cj 0 0 0 0 0 -1 -1
cB Basic x1 x2 x3 x4 x5 A1 A2 Solution
variables values
b (= XB)
B
0 x4 1 3 1 1 0 0 0 5
-1 A1 2 -1 1 0 -1 1 0 2
-1 A2 4 3 -2 0 0 0 1 5
cj-zj 6 2 -1 0 -1 0 0
Table 2

Cj- Zj 0 5 -4 0 2 0
Table 3
cj 0 0 0 0 -1
cB Basic x1 x2 x3 x4 x5 Solution
variables values
B b (= XB)

0 x4 0 0 33/10 1 -9/10 33/10


0 x1 1 0 1/10 0 -3/10 11/10
0 x2 0 1 -4/5 0 2/5 1/5
Cj- Zj 0 0 9/10 0 13/10
Phase 2 Table 1
Maximize z = 3x1 – x2 + 2x3
cj 3 -1 2 0 0
cB Basic x1 x2 x3 x4 x5 Solution
variables values
B b (= XB)
0 x4 0 0 33/10 1 -9/10 33/10
3 x1 1 0 1/10 0 -3/10 11/10
-1 x2 0 1 -4/5 0 2/5 1/5
Cj- Zj 0 0 9/10 0 13/10
Phase 2 Table 2
cj 3 -1 2 0 0
cB Basic x1 x2 x3 x4 x5 Solution
variables values
B b (= XB)

0 x4 0 9/4 3/2 1 0 15/4


3 x1 1 3/4 -1/2 0 0 5/4
0 x5 0 5/2 -2 0 1 1/2
Cj- Zj 0 -13/4 7/2 0 0
Phase 2 Table 3
cj 3 -1 2 0 0
cB Basic x1 x2 x3 x4 x5 Solution
variables values
B b (= XB)
2 x3 0 3/2 1 2/3 0 5/2
3 x1 1 3/2 0 1/3 0 5/2
0 x5 0 11/2 0 4/3 1 11/2
Cj- Zj 0 -17/2 0 -7/3 0
Result
• An optimal policy is x1 = 5/2, x2 = 0, x3 = 5/2.
• The associated optimal value of the objective function is
• z = 3 X (5/2) – 0 + 2 X (5/2) = 25/2.
ThankYou

25

You might also like