6-lp simplex (two phase method)
TRANSCRIPT
-
7/29/2019 6-LP Simplex (Two Phase Method)
1/6
1
Linear ProgrammingTwo-Phase Simplex Method
Learning OutcomesSolving LP problems using the Two-Phase Method
Introduction
When a basic feasible solution is not readily available, the two-phase simplexmethod may be used as an alternative to the big M method.
In the two-phase simplex method, we add artificial variables to the sameconstraints 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 artificialvariables.
At the completion of Phase I, we reintroduce the original LPs objective functionand in Phase II, we determine the optimal solution to the original LP.
Phase I
Step 1: Express the given LP problem in a standard form by introducing slack, surplus
and artificial variables.
Step 2: Formulate an artificial objective function.
Min Z= A1 + A2 +...+An
For now, ignore the original LPs objective function. Instead , solve an LP whose
objective function is Min Z=(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 optimal solution obtained at the end of phase 1 will be a bfs for
the real problem which is solved in Phase II.
ECS716: Operational ResearchPn Paezah Hamzah
Do not assign coefficient M tothe artificial variables; this is
not the big-M method.
Phase I LP is always a minimization problem, even if the original LP is amaximization roblem.
-
7/29/2019 6-LP Simplex (Two Phase Method)
2/6
2
Outcome of Phase I
Since each artificial variable Ai0, solving the Phase I LP will result in one of the following
three cases:
Case 1: The optimal value of Z, i.e. min Z > 0.
In this case, the original LP has no feasible solution. Hence, the original
LP is infeasible.
Case 2: Min Z =0, and no artificial variables are in the optimal Phase I basis.
In this case, we drop all artificial variable columns in the optimal Phase I
tableau. 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.
Case 3: Min Z=0 and at least one artificial variable is in the optimal Phase Ibasis.
In this case, we can find the optimal solution to the original LP if at the end
of Phase I we drop all nonbasic artificial variables, and any variable from the original problem that has a negative coefficient
in Cj-Zjfrom the optimal Phase I tableau.
Phase II
The bfs found at the end of Phase I is used as the starting solution for Phase II. The final simplex tableau of Phase I is taken as the initial tableau of Phase II. The atticial objective function is replaced by the original (real) objective function.
-
7/29/2019 6-LP Simplex (Two Phase Method)
3/6
3
Example: Refer to Marys Radiation Therapy [Hillier & Lieberman textbook,Chp. 3]
Next, we construct the initial tableau.
Iteration 1
Cj
Basis X1 X2 S1 A1 S2 A2
RHS0 0 0 1 0 1 ratio
0 S1 0.3 0.1 1 0 0 0 2.7 9
1 A1 0.5 0.5 0 1 0 0 6 12
1 A2 0.6 0.4 0 0 -1 1 6 10
Zj 1.1 0.9 0 1 -1 1 12
Cj-Zj -1.1 -0.9 0 0 1 0
Iteration 2
CjBasis
X1 X2 S1 A1 S2 A2
RHS0 0 0 1 0 1 ratio
0 X1 1 1/3 10/3 0 0 0 9 27
1 A1 0 1/3 -5/3 1 0 0 1.5 4.5
1 A2 0 0.2 -2 0 -1 1 0.6 3
Zj 0 16/30 -11/3 0 -1 1 2.1
Cj-Zj 0 -16/30 11/3 0 1 0
The Real Problem
Min Z = A1 + A2
s.t.0.3X1 + 0.1X2 + S1 = 2.70.5X1 + 0.5X2 +A1 = 6
0.6X1 +0.4X2 -S2 + A2 = 6
X1, X2, S1, S2 , A1, A2 0
Min Z = 0.4X1 + 0.5X2s.t.
0.3X1 + 0.1X2 2.7
0.5X1 + 0.5X2 = 60.6X1 + 0.4X2 6
X1, X2 0
Phase I:
Obj: Min Z= A1+A2
The Artificial Problem in
the standard form
Min Z = 0X1+ 0X2 + 0S1 + 1A1 + 0S2 + 1A2
0.3X1+ 0.1X2 + 1S1 + 0A1 + 0S2 + 0A2 = 2.70.5X1+ 0.5X2 + 0S1 + 1A1 + 0S2 + 0A2 = 60.6X1+ 0.4X2 + 0S1 + 0A1 - 1S2 + 1A2 = 6
In canonical form
MOST NEGATIVE
Cj-Zj
(a minimization problem)
SMALLEST
positive ratio
MOST NEGATIVE
Cj-Zj
-
7/29/2019 6-LP Simplex (Two Phase Method)
4/6
4
Iteration 3
CjBasis
X1 X2 S1 A1 S2 A2
RHS0 0 0 1 0 1 ratio
0 X1 1 0 20/3 0 5/3 -5/3 8 1.5
1 A1 0 0 5/3 1 5/3 -5/3 0.5 0.3
0 X2 0 1 -10 0 -5 5 3 ---Zj 0 0 5/3 0 5/3 -5/3 0.5
Cj-Zj 0 0 -5/3 0 -5/3 8/3
Iteration 4
CjBasis
X1 X2 S1 A1 S2 A2
RHS0 0 0 1 0 1
0 X1 1 0 0 -4 -5 5 6
0 S1 0 0 1 3/5 1 -1 0.3
0 X2 0 1 0 6 5 -5 6Zj 0 0 0 0 0 0 0
Cj-Zj 0 0 0 1 0 0
Phase I optimal solution: Min Z=0 and no artificial variable appears in the basis.
Phase II
Use the original objective function: Min Z = 0.4X1 + 0.5X2Since Phase I optimal solution is Case 2 solution, we drop all artificial variables. Thefollowing is the LP model for phase II.
Basically, the initial tableau for Phase II is developed as follows:
use the final tableau from Phase I, and drop all the artificial variable columns
CjBasis
X1 X2 S1 S2
RHS0 0 0 0
0 X1 1 0 0 -5 6
0 S1 0 0 1 1 0.3
0 X2 0 1 0 5 6
Zj 0 0 0 0 0
Cj-Zj 0 0 0 0
All Cj-Zj 0 optimal
Min Z = 0.4X1+0.5X2 + 0S1 + 0S2
0.3X1+ 0.1X2 + 1S1 + 0S2 = 2.7
0.5X1+ 0.5X2 + 0S1 + 0S2 = 60.6X1+ 0.4X2 + 0S1 + 1S2 = 6
Case 2
solution
-
7/29/2019 6-LP Simplex (Two Phase Method)
5/6
5
substitute Phase II objective function and restore proper form ( e.g. the Cjcolumn, Zj row and Cj-Zj row entries.
CjBasis
X1 X2 S1 S2
RHS0.4 0.5 0 0
0.4 X1 1 0 0 -5 6
0 S1 0 0 1 1 0.3
0.5 X2 0 1 0 5 6
Zj 0.4 0.5 0 0.5 5.4
Cj-Zj 0 0 0 -0.5
Carry out further iterations to obtain the optimal solution.
CjBasis
X1 X2 S1 S2
RHS0.4 0.5 0 0 ratio
0.4 X1 1 0 0 -5 6 -
0 S1 0 0 1 1 0.3 0.3
0.5 X2 0 1 0 5 6 6/5
Zj 0.4 0.5 0 0.5 5.4
Cj-Zj 0 0 0 -0.5
CjBasis
X1 X2 S1 S2
RHS0.4 0.5 0 0
0.4 X1 1 0 5 0 7.5
0 S2 0 0 1 1 0.3
0.5 X2 0 1 -5 0 4.5
Zj 0.4 0 -0.5 0 5.25
Cj-Zj 0 0 0.5 0
All Cj-Zj values are 0. Hence, solution is optimal.
Optimal solution: X1 = 7.5, X2=4.5Min Z = 5.25
To treat Marys tumor, the minimum absorption by healthy anatomy can be attained bygiving her radiation dose at the entry point of 7.5 kilorads for Beam 1, and 4.5 kiloradsfor Beam2.
Not optimal; NEGATIVECj-Zj
(a minimization problem)
-
7/29/2019 6-LP Simplex (Two Phase Method)
6/6
6
Exercises:
Solve the following LP problems using the Two-Phase method.
1.Min Z = 4X1 + 4X2 + X3s.t.
X1 + X2 + X3 22X1 + X2 3
2X1 + X2 + 3X3 3
X1, X2,X3 0
2. Max Z = 3X1 + X2s.t.X1 + X2 3
2X1 + X2 4
X1 + X2 = 3
X1, X2 0
3. Min Z = 3X1 + X2s.t.
2X1 + X2 6
3X1 + 2X2 = 4
X1, X2 0