The Two-Phase Simplex Method
The Two-Phase Simplex Method
Method
LI Xiao-lei
Preview
When a basic feasible solution is not readily availabl
e, the two-phase simplex method may be used as a
n alternative to the big M method.
In the two-phase simplex method, we add artificial v
ariables to the same constraints as we did in big M
method. Then we find a bfs to the original LP by solv
ing the Phase I LP.
In the Phase I LP, the objective function is to minimi
ze the sum of all artificial variables.
At the completion of Phase I, we reintroduce the orig
inal LP’s objective function and determine the optim
al solution to the original LP.
The two-phase simplex method
Step 1
Modify the constraints so that the right-hand side of each cons
traint is nonnegative. This requires that each constraint with
a negative right-hand side be multiplied through by -1.
Step 1’
Identify each constraint that is now an = or ≥ constraint. In ste
p 3, we will add an the artificial variable to each of these co
nstraints.
Step 2
Convert each inequality constraint to standard form.
For ≤ constraint i, we add a slack variable si;
For ≥ constraint i, we add an excess variable ei;
The two-phase simplex method
Step 4
For now, ignore the original LP’s objective function.
Instead solve an LP whose objective function is
min w’=(sum of all the artificial variables). This is
called the Phase I LP. The act of solving the
phase I LP will force the artificial variables to be
zero.
The two-phase simplex method
Since each ai≥0, solving the Phase I LP will result in one of
the following three cases:
Case 1
The optimal value of w’ is greater than zero. In this case, the
original LP has no feasible solution.
Case 2
The optimal value of w’ is equal to zero, and no artificial
variables are in the optimal Phase I basis. In this case, we
drop all columns in the optimal Phase I tableau that
correspond to the artificial variables. We now combine the
original objective function with the constraints from the
optimal Phase I tableau. This yields the Phase II LP. The
optimal solution to the Phase II LP is the optimal solution to
the original LP.
The two-phase simplex method
Case 3
The optimal value of w’ is equal to zero and at least
one artificial variable is in the optimal Phase I basi
s. In this case, we can find the optimal solution to t
he original LP if at the end of Phase I we drop fro
m the optimal Phase I tableau all nonbasic artificia
l variables and any variable from the original probl
em that has a negative coefficient in row 0 of the o
ptimal Phase I tableau.
Phase I and II feasible solutions
Suppose the original LP is infeasible. Then the only
way to obtain a feasible solution to the Phase I LP is
to let at least one artificial variable be positive. In
this situation, w’>0 will result.
On the other hand, if the original LP has a feasible
solution, this feasible solution is feasible in the
Phase I LP and yields w’=0. This means that if the
original LP has a feasible solution, the optimal
Phase I solution will have w’=0.
Example 5
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
Example 5
Solution
As in the Big M method, step 1-3 transform the
constraints into
1/2 x1+1/4x2+s1 =4
x1+ 3x2 -e2+a2 =20
x1+ x2 +a3 =10
Example 5
Note:
The row 0 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 row 0 before
we can solve Phase I.
To eliminate a2 and a3 from row 0,
Row 0: w’ -a2-a3 =0
+Row 2: x1+3x2-e2+a2 =20
+Row 3: x1+ x2 +a3=10
=New row 0: w’ +2x1+4x2-e2 =30
Example 5
0 ½ ¼ 1 0 0 0 4 s1=4 16
0 1 ③ 0 -1 1 0 20 a2=20 20/3*
0 1 1 0 0 0 1 10 a3=10 10
1 0 0 0 0 -1 -1 0 W’=0
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 -e2+a2 =36
x1+ x2 +a3 =10
From this set of equations, we see that the initial Phase I bf
s is s1=4,a2=36 and a3=10.
Example 6
0 ½ ¼ 1 0 0 0 4 s1=4 16
0 1 3 0 -1 1 0 36 a2=36 12
0 1 ① 0 0 0 1 10 a3=10 10*
1 -2 0 0 -1 0 -4 6 W’=6
0 -2 0 0 -1 1 -3 6 a2=6
0 1 1 0 0 0 1 10 x2=10
Example 6