Professional Documents
Culture Documents
Chapter 3 - Simplex Method
Chapter 3 - Simplex Method
¨Introduction
¨Standard Form
¨Simplex Method
¨Big M Method
¨Two-Phase Method
¨Special Cases
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 3x1 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
Feasible
point. 3 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
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
x1 + 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
1. Infeasible Solution
2. Unbounded Solution
3. Degeneracy (Redundant Constraints)
4. Alternative Optimal (Multiple Optimal Solutions)
Case 1: Infeasible
X1 0
X2 0
Indication of Infeasibility
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
Case 2: Unbounded Solutions
¨When value of Objective function
approached to infinity we said that the
problem is unbounded or missing one or
more constraints;
¨The LP did not provide a finite solutions,
this implies the objective function
approaches to infinity without violating
any constraint.
Open ended problem
(4,∞ ), Z=∞
¨Example: x2
X1 0 6 (4,6), Z=42
5
X2 0 4 (4,4), Z=32
3
X1 4 2 (4,2), Z=22
1
0 1 2 3 4 5 6 7 x1
Number of batches of product 1
Indication
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
Case 3: Degeneracy
¨ Degeneracy: It is situation when the solution of
the problem degenerates.
¨ It occurs due to redundant constraints.
¨A redundant constraint is a constraint that will not
affect to the solution space
¨In practice, this will usually happen when number of
constraints and number of variables are very large.
x2
Example:
9
X1 0
X2 0
Indication
¨ No improvement in objective value
¨ Degenerate Solution: A Solution of the
problem is said to be degenerate solution if
value or values of basic variable(s) become
zero
Degeneracy – Special cases (cont.)
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
Case 4 : Multiple solutions
(Alternative Optimal)
0 1 2 3 4 5 6 7 x1
Number of batches of product 1
Indication
Example:
Max Z= 2x1+ 4 x2
Subject to
x1 + 2x2 ≤ 5
x1 + 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
63
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
67
Alternative optimal – Special cases (cont.)
Objective Function