NOTES 4 - Two-Phase Method
NOTES 4 - Two-Phase Method
Preview
When a basic feasible solution is not readily available, the
two-phase simplex method may be used as an alternative to
the big M method.
In the two-phase simplex method, we add artificial variables
to the same constraints as we did in big M method. Then we
find a BFS to the original LP by solving the Phase I LP.
In the Phase I LP, the objective function is to minimize the
sum of all artificial variables.
At the completion of Phase I, we reintroduce the original LP’s
objective function and determine the optimal solution to the
original LP.
6s-3 Linear Programming
Example
min z=2x1+3x2
s.t. 1/2x1+1/4x2≤4 (sugar constraint)
x1+ 3x2≥20 (vitamin C constraint)
x1+ x2=10 (10 oz in bottle of Oranj)
x1,x2≥0
6s-9 Linear Programming
Example
Solution
As in the Big M method, step 1-3 transform the
constraints into
1/2 x1+1/4x2+s1 =4
x1+ 3x2 -s2+A2 =20
x1 + x2 +A3 =10
6s-10 Linear Programming
Example
Step 4 yields the following Phase I LP:
min w = A2+A3
s.t. 1/2 x1+1/4x2+s1 =4
x1+ 3x2 -s2+A2 =20
x1+ x2 +A3 =10
This set of equations yields a starting BFS for Phase
I(s1=4,A2=20,A3=10).
6s-11 Linear Programming
Example
Note:
The z-row for this tableau (w-A2-A3=0) contains the basic
variables A2 and A3. As in the Big M method, A2 and A3
must be eliminated from z-row before we can solve Phase
I.
To eliminate A2 and A3 from z-row,
z-Row : w -A2-A3 =0
+Row 2: x1+3x2-s2+A2 =20
+Row 3: x1+ x2 +A3=10
=New z-row : w +2x1+4x2-s2 =30
6s-12 Linear Programming
Example
Combining the new z-row with the Phase I
constraints yields the initial Phase I tableau:
Initial Phase I tableau
Basic
var x1 x2 s1 s2 A2 A3 rhs ratio
s1 ½ ¼ 1 0 0 0 4 16
A2 1 ③ 0 -1 1 0 20 20/3*
A3 1 1 0 0 0 1 10 10
w 2 4 0 -1 0 0 30
Example
Example
After performing the necessary row operations, we
obtain the third tableau.
x2 0 1 0 -1/2 ½ -1/2 5
w 0 0 0 0 -1 -1 0
6s-15 Linear Programming
Example
Since w=0, Phase I has been concluded. The basic
feasible solution s1=1/4,x2=5,x1=5 has been found.
Since no artificial variables are in the optimal Phase I
basis, the problem is an example of Case 2.
We now drop the columns for the artificial variables
A2 and A3 and reintroduce the original objective
function.
min z=2x1+3x2 or z-2x1-3x2=0
6s-16 Linear Programming
Example
Since x1 and x2 are both in the optimal Phase I basis, they must
be eliminated from the Phase II z-row .
Phase II z-row : z-2x1-3x2 =0
+3(row 2): 3x 2-3/2s2=15
+2(row 3): 2x1 +s2=10
= New Phase II row 0: z -1/2s2=25
We now begin Phase II with the following set of equations:
min z -1/2s2=25
s.t s1-1/8s2=1/4
x2 -1/2s2=5
x1 +1/2s2=5
This is optimal.
The optimal solution is z=25 x1=5 x2=5 s1=1/4 s2=0.
6s-17 Linear Programming
Example
We modify the problem that 36 mg of vitamin C
are required. Then, we know that this problem is
infeasible. We begin with the original problem:
min z=2x1+3x2
s.t. 1/2x1+1/4x2≤4 (sugar constraint)
x1+ 3x2≥36 (vitamin C constraint)
x1+ x2=10 (10 oz in bottle of Oranj)
x1,x2≥0
6s-18 Linear Programming
Example
Solution
After completing steps 1-4 of the two-phase simplex,
we obtain the following Phase I problem:
min w= A2+A3
s.t. 1/2 x1+1/4x2+s1 =4
x1+ 3x2 -s2+A2 =36
x1+ x2 +A3 =10
From this set of equations, we see that the initial Phase
I BFS is s1=4,A2=36 and A3=10.
6s-19 Linear Programming
Example
Since the basic variables A2 and A3 occur in the
Phase I objective function, they must be eliminated
from the Phase I z-row.
z-Row: w -A2-A3 =0
+Row 2: x1+3x2-s2+A2 =36
+Row 3: x1+ x2 +A3 =10
=New z-row: w +2x1+4x2-s2 =46
6s-20 Linear Programming
Example
With the new w-row, the initial Phase I tableau is:
Basic
var x1 x2 s1 s2 A2 A3 rhs ratio
s1 ½ ¼ 1 0 0 0 4 16
A2 1 3 0 -1 1 0 36 12
A3 1 ① 0 0 0 1 10 10*
w 2 4 0 -1 0 0 46
s1 ¼ 0 1 0 0 -1/4 3/2
A2 -2 0 0 -1 1 -3 6
x2 1 1 0 0 0 1 10
w -2 0 0 -1 0 -4 6
6s-21 Linear Programming
Example
Since no variable in row w has a positive
coefficient, this is an optimal Phase I tableau.
Since the optimal value of w is 6>0, the original
LP must have no feasible solution.
6s-22 Linear Programming
Remarks
As with the Big M method, the column for any
artificial variable may be dropped from future
tableaus as soon as the artificial variable leaves the
basis.
The Big M method and Phase I of the two-phase
method make the same sequence of pivots. The
two-phase method does not cause roundoff errors
and other computational difficulties.