You are on page 1of 37

Linear Programming

(LP)
The Simplex Method
A. Primal Simplex Method
A.1. Artificial Starting Solution
A.1.2 The Two-Phase Technique
The Two Phase Technique
The use of M (a very large value) may
cause computational error
Two Phase Technique emphasizes the
minimization of value the artificial variables
(every R
i
)
The Two Phase Technique:
Phase 1
Form a new objective function that seeks the
minimization of the sum of the artificial variables
(every R
i
) subject to the constraints of the
original problem modified by the artificial
variables
If all the artificial variables are zero then the
problem has a feasible solution
Else (there is any artificial variables with positive
minimum value) then the problem has no
feasible solution
The Two Phase Technique:
Phase 2
Use the optimum basic solution of phase I
as a starting solution for the original
problem
Original Problem
Objective Function
minimize z = 4x
1
+ x
2
+ R
1
+ R
2
Subject to (Constraints)
3x
1
+ x
2
+ R
1
= 3
4x
1
+ 3x
2
x
3
+ R
2
= 6
x
1
+ 2x
2
+ x
4
= 4
x
1
, x
2
, x
3
, x
4
, R
1
, R
2
0
Phase 1
Original Objective Function
minimize z = 4x
1
+ x
2
+ R
1
+ R
2
Phase 1 Objective Function
Minimize r = R
1
+ R
2
3x
1
+ x
2
+ R
1
= 3
4x
1
+ 3x
2
x
3
+ R
2
= 6
r = (3 3x
1
x
2
) + (6 4x
1
3x
2
+ x
3
)
r = 7x
1
4x
2
+ x
3
+ 9
Minimize r + 7x
1
+ 4x
2
x
3
= 9
Phase 1
Objective Function
Minimize r = Minimize r + 7x
1
+ 4x
2
x
3
= 9
Constraints
3x
1
+ x
2
+ R
1
= 3
4x
1
+ 3x
2
x
3
+ R
2
= 6
x
1
+ 2x
2
+ x
4
= 4
Starting Solution
x
1
= 0, x
2
= 0, x
3
= 0 then R
1
= 3, R
2
= 6, x
4
= 4
4 1 0 0 0 2 1 x
4
6 0 1 0 -1 3 4 R
2
3 0 0 1 0 1 3 R
1
9 0 0 0 -1 4 7 r
solution x
4
R
2
R
1
x
3
x
2
x
1
Basic
4
6
3
9
solution
4 1 0 0 0 2 1 x
4
3/2 0 1 0 -1 3 4 R
2
1 0 0 1 0 1 3 R
1
0 0 0 -1 4 7 r
Inter-
cept
x
4
R
2
R
1
x
3
x
2
x
1
Basic
PE
x
4
R
2
1 0 0 1/3 0 1/3 1 x
1
r
solution x
4
R
2
R
1
x
3
x
2
x
1
Basic
Pivot Element = 3
NPE
r
Coefficient of x
1
for r = 7
1 0 0 1/3 0 1/3 1 NPE
7 0 0 7/3 0 7/3 7
7
NPE
7 0 0 7/3 0 7/3 7
7
NPE
9 0 0 0 -1 4 7
r
(OLD)
2 0 0 -7/3 -1 5/3 0
r
(NEW)
x
4
R
2
1 0 0 1/3 0 1/3 1 x
1
2 0 0 -7/3 -1 5/3 0 r
solution x
4
R
2
R
1
x
3
x
2
x
1
Basic
R
2
Coefficient of x
1
for R
2
= 4
1 0 0 1/3 0 1/3 1 NPE
4 0 0 4/3 0 4/3 4
4
NPE
4 0 0 4/3 0 4/3 4
4
NPE
6 0 1 0 -1 3 4
R2
(OLD)
2 0 1 -4/3 -1 5/3 0
R2
(NEW)
x
4
2 0 1 -4/3 -1 5/3 0 R
2
1 0 0 1/3 0 1/3 1 x
1
2 0 0 -7/3 -1 5/3 0 r
solution x
4
R
2
R
1
x
3
x
2
x
1
Basic
x
4
Coefficient of x
1
for x
4
= 1
1 0 0 1/3 0 1/3 1 NPE
1 0 0 1/3 0 1/3 1
1
NPE
1 0 0 1/3 0 1/3 1
1
NPE
4 1 0 0 0 2 1
x
4
(OLD)
3 1 0 -1/3 0 5/3 0
x
4
(NEW)
3 1 0 -1/3 0 5/3 0 x
4
2 0 1 -4/3 -1 5/3 0 R
2
1 0 0 1/3 0 1/3 1 x
1
2 0 0 -7/3 -1 5/3 0 r
solution x
4
R
2
R
1
x
3
x
2
x
1
Basic
Result of Iteration 1
3
2
1
2
solution
9/5 1 0 -1/3 0 5/3 0 x
4
6/5 0 1 -4/3 -1 5/3 0 R
2
3 0 0 1/3 0 1/3 1 x
1
0 0 -7/3 -1 5/3 0 r
Intercept
x
4
R
2
R
1
x
3
x
2
x
1
Basic
6/5
solution
x
4
0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
x
2
x
1
Basic
Phase 2
Constraints
x
1
+ 1/5 x3 = 3/5 x
1
= 3/5 1/5 x
3
x
2
3/5 x3 = 6/5 x
1
= 6/5 + 3/5 x
3
x
3
+ x
4
= 1
x
1
, x
2
, x
3
, x
4
0
Objective Function
Minimize z = 4x
1
+ x
2
From Phase 1, feasible solution x
1
=3/5 and x
2
= 6/5
Starting solution : z = 4(3/5 1/5 x
3
) + (6/5 + 3/5 x
3
)
z = 18/5 1/5 x
3
z + 1/5 x
3
= 18/5
1
6/5
3/5
18/5
solution
1
-
3
intercept
1 1 0 0 x4
0 -3/5 1 0 x
2
0 1/5 0 1 x
1
0 1/5 0 0 z
x4 x3 x
2
x
1
Basic
PE
Entering Column
1
solution
1 1 0 0 x
3
x
2
x
1
z
x4 x
3
x
2
x
1
Basic
NPE
Pivot Element = 1
z
Coefficient of x
3
for z = 1/5
1 1 1 0 0 NPE
1/5 1/5 1/5 0 0
1/5
NPE
18/5 0 1/5 0 0
z
(OLD)
1/5 1/5 1/5 0 0
1/5
NPE
17/5 -1/5 0 0 0
z
(OLD)
1
17/5
solution
1 1 0 0 x
3
x
2
x
1
-1/5 0 0 0 z
x
4
x
3
x
2
x
1
Basic
x
1
Coefficient of x
3
for x
1
= 1/5
1 1 1 0 0 NPE
1/5 1/5 1/5 0 0
1/5
NPE
3/5 0 1/5 0 1
x
1
(OLD)
1/5 1/5 1/5 0 0
1/5
NPE
2/5 -1/5 0 0 1
x
1
(NEW)
1
2/5
17/5
solution
1 1 0 0 x
3
x
2
-1/5 0 0 1 x
1
-1/5 0 0 0 z
x
4
x
3
x
2
x
1
Basic
x
2
Coefficient of x
3
for x
1
= -3/5
1 1 1 0 0 NPE
-3/5 -3/5 -3/5 0 0
-3/5
NPE
6/5 0 -3/5 1 0
x
2
(OLD)
-3/5 -3/5 -3/5 0 0
-3/5
NPE
9/5 3/5 0 1 0
x
2
(NEW)
Artificial Variables
Removal of artificial variables in the end
of Phase 1 is effective only
if they are all non-basic
or they are in the zero level and become the
part of starting solution of Phase 2
Computation in Phase 2: prevent the
zero artificial variable from ever
assuming a positive value always a
non-positive value
1
9/5
2/5
17/5
solution
1 1 0 0 x
3
3/5 0 1 0 x
2
-1/5 0 0 1 x
1
-1/5 0 0 0 z
x
4
x
3
x
2
x
1
Basic
Result of iteration 1 = END
Rule of Non-Positive Artificial
Variable in Phase 2
In Entering Column
Positive Artificial Variable = Pivot Element
Zero Artificial Variable = unchanged
Negative Artificial Variable = will be positive
select negative coefficient as pivot element
Violating the minimum ratio rule
Still satisfying the feasibility condition (since the
artificial variable has a zero value)
In row operation: the right hand side of the tableau
will remain unchanged
The End
This is the end of Chapter 3A12

You might also like