Professional Documents
Culture Documents
Lec 5
Lec 5
Abou-El-Enien
Page 1 of 5
DS321-Linear & Integer Programming -2021-2022- Prof. Dr. Tarek H. M. Abou-El-Enien
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
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
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