Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
¨ Introduction
¨ Standard Form
¨ Simplex Method
¨ Big M Method
¨ Two-Phase Method
¨ Special Cases
¨ Subject’s website:
sites.google.com/hcmiu.edu.vn/or1
¨ TA: ptuananh@hcmiu.edu.vn
1. Introduction
¨ The graphical method for solving LP problems:
Only works for two-dimensional problems, i.e. problems that
have two variables
It requires solving a system of equations for every corner point.
1
The journal Computing in Science and Engineering
2. Standard Form
Preview of The Simplex Algorithm
The geometric of the simplex method
x2
Maximize Z = 3x1 + 5x2
Subject to
9 3 x1 2 x2 18
x1 ≤4
8
2x2 ≤ 12 (2,6) x 4
7 1
3x1 + 2x2 ≤ 18 Z= 36 2 x2 12
x1 ≥0 (0,6) 6
x2 ≥ 0. Z= 30 5
Start at any feasible extreme 4
point. 3
Feasible
region
(4,3)
Move to an adjacent extreme 2 Z= 27
point with better objective value. 1
0 1 2 3 4 5 6 7 x1
Continue until no adjacent
extreme point has a better
(0,0) (4,0)
Z=0 Z= 12
The Algebra of The Simplex Method
LP Standard form:
• All variables are non-negativity.
• All remaining constraints are expressed as equality constraints.
• The right hand side vector, b, is non-negative.
Slack variables:
• Added since the constraints are in terms of inequalities (≤).
Surplus variable:
• Added since the constraints are in terms of inequalities ().
Before After
x1 + 2x2 + x3 - x4 5 x1 + 2x2 + x3 - x4 +s1 = 5
s1 0
s1 : slack variable
• Converting “” constraints
-2x1 - 4x2 + x3 + x4 -1;
Step 1. Eliminate the negative RHS
2x1 + 4x2 - x3 - x4 1
Step 2. Convert to an equality
2x1 + 4x2 - x3 - x4 – s2 = 1
s2 0
s2 : surplus variable
The Algebra of The Simplex Method (cont.)
Original form After converting
Convert to LP
standard form
Optimal
End
solution Yes
No
Z -3 -5 0 0 0 0
S1 1 0 1 0 0 4
0
S2 0 2 0 1 0 12 12/2
S3 3 2 0 0 1 18 18/2
x1 = 0
x2 = 9
No initial feasible solution
s1 = 4
s2 = -6 (violate)
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0,
Maximize Z = 3x1+ 5x2 +(0)s1 +(0)s2 – (M)A1
subject to Initial feasible solution
x 1 + s1 = 4 Nonbasic variables:
2x2 + s2 =12 x1 = 0, x2 = 0
3x1 +2x2 + A1= 18 Basic variables:
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0, A1 ≥0 s1 = 4, s2=12, A1 = 18.
s1 (1) 1 0 1 0 0 4
0
s2 (2) 0 2 0 1 0 12
A1 (3) 3 2 0 0 1 18
This graph shows the sequence of Coner Point Feasible solutions for
phase 1 (0, 1, 2, 3) and then for phase 2 ([0] ,[1])
6. Four Special Cases in Simplex Method
1. Degeneracy
2. Alternative Optimal
3. Unbounded Solution
4. Infeasible Solution
6.1. Degeneracy
( no improvement in objective)
x1 + 4x2 + s1= 8
x1 + 2x2 + s2= 4
x1, x2 ,s1,s2≥ 0
Let x1=0, x2=0
Z=0, s1=8, s2=4
Degeneracy – Special cases (cont.)
X2 will enter the basis because of having minimum
objective function coefficient.
¨ Initial Tableau
Entering Variable
Leaving Variable
Basis X1 X2 S1 S2 RHS Ratio
Z -3 -9 0 0 0
S1 1 4 1 0 8 8/4=2
S2 1 2 0 1 4 4/2=2
Z -3/4 0 9/4 0 18
X2 1/4 1 1/4 0 2 8
S2 ½ 0 -1/2 1 0 0 min
Feasible Region
6.2. Alternative Optimal
• If the Z-row value for one or more non basic
variables is 0 in the optimal tableau, alternate
optimal solution exists.
• When the objective function is parallel to a binding
constraint, objective function will assume same
optimal value. So this is a situation when the value
of optimal objective function remains the same.
Alternative optimal – Special cases (cont.)
Example:
Max Z= 2x1+ 4 x2
Subject to
x1 + 2x2 ≤ 5
x 1 + x2 ≤ 4
x1, x2 ≥0
Alternative optimal – Special cases (cont.)
The solution
Max Z=2x1+ 4x2
Let S1and S2 be the slack variables
x1 + 2x2 + s1= 5
x1 + x 2 + s 2 = 4
x1, x2, s1, s2 ≥0
Initial solution
Let x1 = 0, x2 = 0,
Z=0, s1= 5, s2 = 4
45
Alternative optimal – Special cases (cont.)
¨ Initial Tableau
Entering Variable
Leaving
Variable
Alternative optimal – Special cases (cont.)
¨ Optimal solution is 10 when x2=5/2, x1=0.
Basi X1 X2 S1 S2 RHS Rati
s o
Z 0 0 2 0 10
X2 1/2 1 1/2 0 5/2 5
S2 1/2 0 -1/2 1 3/2 3
min
Basis X1 X2 S1 S2 RH Ratio
S
Z 0 0 2 0 10
X2 1/2 1 1/2 0 5/2 5
S2 1/2 0 -1/2 1 3/2 3
The coefficient of x1 =0 that x1 can enter the basic solution without
changing the value of Z. Optimal solution is Z=10, x1=0, x2=5/2.
Alternative optimal – Special cases (cont.)
¨ The second alternative optimal is:
Basis X1 X2 S1 S2 RHS
X2 0 1 1 -1 1
X1 1 0 -1 2 3
f 0 0 2 0 10
49
Alternative optimal – Special cases (cont.)
Objective Function
6.3. Unbounded Solution
Basis X1 X2 S1 S2 RH Ratio
S
Z -2 -1 0 0 0
S1 1 -1 1 0 10 10 min
S2 2 0 0 1 40 20
Unbounded Solution – Special cases (cont.)
Objective
function
Unbounded
Solution
0
≤1
Space
2
2x1 ≤ 40 –x
x1
Optimal
Point
6.4. Infeasible Solution
Example
MAX Z= 2x1 + 6x2
Subject to
4x1 + 3x2 < 12
2x1 + x2 > 8
x1, x2 > 0
Infeasible Solution -Special cases (cont.)
x1 x2 s1 s2 A1 RHS
Z -2-2M 6-M 0 M 0 -8M
S1 4 3 1 0 0 12
A1 2 1 0 -1 1 8
x1 x2 s1 s2 A1 RHS
Z 0 15/2+ 1/2M 1/2+1/2M M 0 6-2M
S1 1 3/4 1/4 0 0 3
A1 0 1/2 -1/2 -1 1 2
An artificial variable( A1=2) is still positive, so the problem is infeasible
Graphical Solution
x2
2x1 + x2 > 8
2x1 + 6x2 =Z
x1