Documente Academic
Documente Profesional
Documente Cultură
Simplex Method
2003 Thomson/South-Western
Slide 1
Formulate
Formulate
Problem
as
as LP
Put In
Standard
Standard
Form
2003 Thomson/South-Western
Put In
In
Tableau
Tableau
Form
Execute
Execute
Simplex
Method
Method
Slide 2
A Minimization Problem
MIN 2x1 - 3x2 - 4x3
s. t.
X 1 + x2 + x3 < 30
2x1 + x2 + 3x3 > 60
x 1 - x2 + 2x3 = 20
x1, x2, x3 > 0
2003 Thomson/South-Western
Slide 3
Standard Form
An LP is in standard form when:
All variables are non-negative
All constraints are equalities
Putting an LP formulation into standard
form involves:
Adding slack variables to <
constraints
Subtracting surplus variables from
> constraints.
2003 Thomson/South-Western
Slide 4
x1 + x2 + x3 + s1
= 30
2x1 + x2 + 3x3
- s2 = 60
x1 - x2 + 2x3
= 20
x1, x2, x3, s1, s2 > 0
2003 Thomson/South-Western
Slide 5
Tableau Form
Slide 6
Tableau Form
To
2003 Thomson/South-Western
Slide 7
MIN
s. t.
x1 + x2 + x3 + s1
= 30
2x1 + x2 + 3x3 - s2 + a2
= 60
x1 - x2 + 2x3
+ a3 = 20
x1, x2, x3, s1, s2, a2, a3 > 0
2003 Thomson/South-Western
Slide 8
Simplex Tableau
The
simplex tableau is a
convenient means for performing
the calculations required by the
simplex method.
2003 Thomson/South-Western
Slide 9
2003 Thomson/South-Western
Slide 10
2003 Thomson/South-Western
Slide 11
Slide 12
Slide 13
Simplex Method
Step 1: Determine Entering Variable
Identify the variable with the most
positive value in the cj - zj row. (The
entering column is called the pivot
column.)
Step 2: Determine Leaving Variable
For each positive number in the entering
column, compute the ratio of the righthand side values divided by these entering
column values.
2003 Thomson/South-Western
Slide 14
Simplex Method
2003 Thomson/South-Western
Slide 15
Simplex Method
Step 3: Generate Next Tableau
Divide the pivot row by the pivot element
(the entry at the intersection of the pivot
row and pivot column) to get a new row.
We denote this new row as (row *).
Replace each non-pivot row i with:
[new row i] = [current row i] - [(aij) x (row *)],
where aij is the value in entering column j of
row i
2003 Thomson/South-Western
Slide 16
Simplex Method
Step 4: Calculate zj Row for New
Tableau
For each column j, multiply the
objective function coefficients
of the basic variables by the
corresponding numbers in column
j and sum them.
2003 Thomson/South-Western
Slide 17
Simplex Method
Step 5: Calculate cj - zj Row for New Tableau
Slide 18
Simplex Method
Slide 19
2x1 + 3x2 +
x1 -
4x3 < 50
x2 x3 > 0
x2 - 1.5x3 > 0
x1, x2, x3 > 0
2003 Thomson/South-Western
Slide 20
2003 Thomson/South-Western
Slide 21
s.t.
2x1 + 3x2 + 4x3 + s1
- x1 + x2 +
x3
+ s2
-x2 + 1.5x3
+ s3
= 50
= 0
= 0
2003 Thomson/South-Western
Slide 22
(* row)
s3
s1
s2
0
0
zj
c j - zj
x 2 x3 s 1 s 2 s 3
12 18 10
2
-1
3
1
1
0
0
1
0
0
4
1
-1 1.5 0
0
0
0
12 18 10
2003 Thomson/South-Western
0
0
0
1
0
0
50
0
0
0
0
Slide 23
2003 Thomson/South-Western
Slide 24
minimum
Slide 25
2003 Thomson/South-Western
Slide 26
Slide 27
Slide 28
x 2 x3 s1 s2 s3
Basis cB
s1
0
50 (* row)
x2 18
s3
0
-1
zj
cj - zj
12 18 10
1 -3
-1
1
1 0 1
0 2.5 0
1 1
0
0
-18 18 18
30 0 -8
0
0
2003 Thomson/South-Western
0
0
18
-18
Slide 29
2003 Thomson/South-Western
Slide 30
2003 Thomson/South-Western
Slide 31
2003 Thomson/South-Western
Slide 32
2003 Thomson/South-Western
Slide 33
2003 Thomson/South-Western
Slide 34
2003 Thomson/South-Western
Slide 35
x2 x 3
s1 s2 s3
Basis cB 12 18 10
(* row)
s3
x1
12
x2
0
18
0
zj
.2
.2 -.6 0
0
1 1.2 .2 .4 0
0 2.7 .2 .4 1
10
12 18
24
0 -14 -6
10
10
300
cj - zj
2003 Thomson/South-Western
Slide 36
Special Cases
Infeasibility
Unboundedness
Alternative
Optimal Solution
Degeneracy
2003 Thomson/South-Western
Slide 37
Infeasibility
Infeasibility is detected in the
simplex method when an artificial
variable remains positive in the
final tableau.
2003 Thomson/South-Western
Slide 38
Example: Infeasibility
LP Formulation
MAX 2x1 + 6x2
s. t.
2003 Thomson/South-Western
Slide 39
Example: Infeasibility
Final Tableau
x1
Basis CB
x1
a2
zj 2
+3/2
x2
2
3/4
-M 0
-1/2
s1
6
s2
0
1/4
-1/2
(1/2)M (1/2)M
+1/2
+6
cj - zj 0 -(1/2)M -(1/2)M
+9/2
-1/2
2003 Thomson/South-Western
a2
0
-M
-1
M
-M
-2M
-M
Slide 40
Example: Infeasibility
In the previous slide we see that the
tableau is the final tableau because all
cj - zj < 0. However, an artificial
variable is still positive, so the problem
is infeasible.
2003 Thomson/South-Western
Slide 41
Unboundedness
A linear program has an unbounded
solution if all entries in an entering
column are non-positive.
2003 Thomson/South-Western
Slide 42
Example: Unboundedness
LP Formulation
MAX 2x1 + 6x2
s. t.
x1, x2 > 0
2003 Thomson/South-Western
Slide 43
Example: Unboundedness
Final Tableau
x1
x2
s1
s2
Basis cB
x2
s1
4
0
3
2
1
0
0
1
-1
-1
8
3
zj
12
-4
32
cj - zj
-9
2003 Thomson/South-Western
Slide 44
Example: Unboundedness
In the previous slide we see that c4 - z4
= 4 (is positive), but its column is all
non-positive. This indicates that the
problem is unbounded.
2003 Thomson/South-Western
Slide 45
2003 Thomson/South-Western
Slide 46
Final Tableau
x1
x2
x3 s1 s2
s3
s4
cB
-2
-1
Basis
0
s3
0
x2
0
x1
0
-1
s4
1
0
1
0
4
2
8
6
4
12
2003 Thomson/South-Western
Slide 47
Slide 48
x1 = 7, x2 = 0, x3 = 3, and z = 32
2003 Thomson/South-Western
Slide 49
x3
2
0
4
-1
s2
6
0
.5
- .5
.5
1.5
- .5
zj 2
cj - z j
4
0
6
0
10
0
s4
s1
2003 Thomson/South-Western
s3
s4
0
2
2.5
0
-10
00
-1 1
0
0
0
0 0
32
0
Slide 50
Degeneracy
A degenerate solution to a linear
program is one in which at least
one of the basic variables equals 0.
This can occur at formulation or if
there is a tie for the minimizing
value in the ratio test to determine
the leaving variable.
2003 Thomson/South-Western
Slide 51
Degeneracy
When degeneracy occurs, an optimal
solution may have been attained
even though some cj zj > 0.
Thus, the condition that cj zj < 0 is
sufficient for optimality, but not
necessary.
2003 Thomson/South-Western
Slide 52
Food of thought
I used to love mathematics for its own
sake, and I still do, because it allows
for no hypocrisy and no vagueness.
2003 Thomson/South-Western
Slide 53