0% found this document useful (0 votes)
27 views5 pages

Lec 5

The document describes the two-phase method for solving linear programming problems. It explains that the two-phase method eliminates the need for a large penalty value M used in other methods. The two-phase method solves the problem in two phases: phase I finds a starting feasible solution and phase II solves the original problem using this starting point. An example demonstrates applying the two-phase method to find the optimal solution for a sample linear programming problem.

Uploaded by

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

Lec 5

The document describes the two-phase method for solving linear programming problems. It explains that the two-phase method eliminates the need for a large penalty value M used in other methods. The two-phase method solves the problem in two phases: phase I finds a starting feasible solution and phase II solves the original problem using this starting point. An example demonstrates applying the two-phase method to find the optimal solution for a sample linear programming problem.

Uploaded by

zoro madara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M.

Abou-El-Enien

Notes on Lesson (5)

The Two-Phase Method

Importance of the Two-Phase Method:


In the M-method, the use of the penalty M, which by definition must be
large relative to the actual objective coefficients of the model, can result in
roundoff error that may impair the accuracy of the simplex calculations. The
two-phase method alleviates this difficulty by eliminating the constant M
altogether.

General idea of the Two-Phase Method:


The method solves the LP in two phases:
1) Phase I attempts to find a starting basic feasible solution, and if one is
found,
2) Phase II is invoked to solve the original problem.

Summary of the steps of the Two-Phase Method:


Phase (I):
1) Put the problem in equation form, and add the necessary artificial
variables to the constraints (exactly as in the M method) to secure a
starting basic solution.
2) Find a basic solution of the resulting equations that, regardless of
whether the LP is maximization or minimization, always minimize the
sum of artificial variables.
3) If the minimum value of the sum is positive, the LP problem has no
feasible solution, which ends the process (recall that a positive artificial

Page 1 of 5
DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M. Abou-El-Enien

signifies that an original constraint is not satisfied). Otherwise, proceed


to Phase II.
Phase (II):
4) Use the feasible solution from Phase I as a starting basic feasible
solution for the original problem.

Example:
Use the two-phase Method to find the optimal solution for the following
linear programming (LP) problem (If exist):

Minimize F= 4x1 + x2
subject to
3x1 + x2 = 3
4 x1 + 3x2 ≤ 6
x1 + 2x2 ≤ 4
x1 , x2 ≥ 0

Solution:
Minimize F= 4x1 + x2 + 0s1 + 0s2
subject to
3x1 + x2 = 3
4 x1 + 3x2 – s1 = 6
x1 + 2x2 + s2 = 4
x1 , x2 , s1 , s2 ≥ 0

Page 2 of 5
DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M. Abou-El-Enien

Minimize F= 4x1 + x2 + 0s1 + 0s2 + MR1 + MR2


subject to
3x1 + x2 + R1 =3
4 x1 + 3x2 – s1 + R2 = 6
x1 + 2x2 + s2 = 4
x1 , x2 , s1 , R1 , R2 , s2 ≥ 0 ,

Phase (I):
Minimize r = R1 +R2
subject to
3x1 + x2 + R1 =3
4 x1 + 3x2 – s1 + R2 = 6
x1 + 2x2 + s2 = 4
x1 , x2 , s1 , R1 , R2 , s2 ≥ 0 ,

n = 6, m = 3 , n – m =6 – 3 =3
x1 , x2 , s1 = 0 ⟹ R1 = 3 , R2 = 6 , s2 = 4 ,

Basic x1 x2 s1 R1 R2 s2 Solution
r 0 0 0 -1 -1 0 0
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
s2 1 2 0 0 0 1 4

R1=3 - 3 x1 - x2
R2 = 6 - 4 x1 - 3 x2 + s1
r = R1 +R2 = (3-3 x1 - x2) + (6 - 4 x1 - 3 x2 + s2) = -7 x1 - 4 x2 + s2 + 9
Page 3 of 5
DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M. Abou-El-Enien

Basic x1 x2 s1 R1 R2 s2 Solution
r 7 4 -1 0 0 0 9
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
s2 1 2 0 0 0 1 4

Basic x1 x2 s1 R1 R2 s2 Solution
r 0 1.67 -1 -2.33 0 0 2
x1 1 0.33 0 0.33 0 0 1
R2 0 1.67 -1 -1.33 1 0 2
s2 0 1.67 0 -0.33 1 0 3

Basic x1 x2 s1 R1 R2 s2 Solution
r 0 0 0 -1 -1 0 0
x1 1 0 0.2 -0.2 -0.2 0 0.6
x2 0 1 -0.6 -0.8 0.6 0 1.2
s2 0 0 1 1 -1 1 1

Phase (II):
Minimize F= 4x1 + x2
subject to
x1 + 0.2 s1 = 0.6
x2 – 0.6 s1 = 1.2
s1 + s2 = 1
x1 , x2 , s1 , s2 ≥ 0

Page 4 of 5
DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M. Abou-El-Enien

Basic x1 x2 s1 s2 Solution
F -4 -1 0 0 0
x1 1 0 0.2 0 0.6
x2 0 1 -0.6 0 1.2
s2 0 0 1 1 1

F = 4x1 + x2 = 4(0.6 – 0.2 s1) + (1.2 + 0.6 s1) = -0.2 s1 + 3.6

Basic x1 x2 s1 s2 Solution
F 0 0 0.2 0 3.6
x1 1 0 0.2 0 0.6
x2 0 1 -0.6 0 1.2
s2 0 0 1 1 1

Basic x1 x2 s1 s2 Solution
F 0 0 0 -0.2 3.4
x1 1 0 0 -0.2 0.4
x2 0 1 0 0.6 1.8
s1 0 0 1 1 1
x1 = 0.4 , x2=1.8 , F = 3.4

Page 5 of 5

You might also like