Beruflich Dokumente
Kultur Dokumente
Linear Programming:
The Simplex Method
To accompany
Quantitative Analysis for Management, Tenth Edition,
by Render, Stair, and Hanna © 2008 Prentice-Hall, Inc.
Power Point slides created by Jeff Heyl © 2009 Prentice-Hall, Inc.
Learning Objectives
After completing this chapter, students will be able to:
1. Convert LP constraints to equalities with slack,
surplus, and artificial variables
2. Set up and solve LP problems with simplex
tableaus
3. Interpret the meaning of every number in a
simplex tableau
4. Recognize special cases such as infeasibility,
unboundedness, and degeneracy
5. Use the simplex tables to conduct sensitivity
analysis
6. Construct the dual problem from the primal
problem
© 2009 Prentice-Hall, Inc. 9–2
Chapter Outline
9.1 Introduction
9.2 How to Set Up the Initial Simplex
Solution
9.3 Simplex Solution Procedures
9.4 The Second Simplex Tableau
9.5 Developing the Third Tableau
9.6 Review of Procedures for Solving
LP Maximization Problems
9.7 Surplus and Artificial Variables
2T + 1C + S1 = 100
2(40) +1(10) + S1 = 100
S1 = 10
There will be 10 hours of slack, or unused
painting capacity
Number of Chairs
80 –
problem 2T + 1C ≤ 100
–
60 –
–
40 – C = (30, 40)
–
20 – 4T + 3C ≤ 240
– D = (50, 0)
(0, 0) A |– | | | |
0 20 40 60 80 T
Figure 9.1 Number of Tables
© 2009 Prentice-Hall, Inc. 9 – 13
The First Simplex Tableau
Constraint equations
It simplifies handling the LP equations if we
put them in tabular form
These are the constraint equations for the Flair
Furniture problem
QUANTITY
SOLUTION MIX T C S1 S2 (RIGHT-HAND SIDE)
S1 2 1 1 0 100
S2 4 3 0 1 240
T 0
C 0
=
S1 100
S2 240
© 2009 Prentice-Hall, Inc. 9 – 16
The First Simplex Tableau
Variables in the solution mix, called the basis in
LP terminology, are referred to as basic variables
Variables not in the solution mix or basis (value
of 0) are called nonbasic variables
The optimal solution was T = 30, C = 40, S1 = 0,
and S2 = 0
The final basic variables would be
T 30
C 40
=
S1 0
S2 0
COLUMN
T C S1 S2
Cj for column $70 $50 $0 $0
Zj for column 0 0 0 0
Cj – Zj for column $70 $50 $0 $0
Table 9.2
© 2009 Prentice-Hall, Inc. 9 – 29
The Second Simplex Tableau
Step 2. Select the variable to be replaced. Either S1
or S2 will have to leave to make room for T in the
basis. The following ratios need to be calculated.
For the S1 row
100(hours of painting time available)
50 tables
2(hours required per table)
For the S2 row
240(hours of carpentry time available)
60 tables
4(hours required per table)
Table 9.3
2 1 1* 0 100
1 0.5 0.5 0 50
2 2 2 2 2
Cj $70 $50 $0 $0
SOLUTION QUANTITY
MIX T C S1 S2 (RHS)
$0 T 1 0.5 0.5 0 50
$0 S2 0 1 –2 1 40
Zj $70 $35 $35 $0 $3,500
Cj - Zj $0 $15 –$35 $0
Table 9.4
© 2009 Prentice-Hall, Inc. 9 – 36
Interpreting the Second Tableau
Current solution
The solution point of 50 tables and 0 chairs
(T = 50, C = 0) generates a profit of $3,500. T is
a basic variable and C is a nonbasic variable.
This corresponds to point D in Figure 9.2.
Resource information
Slack variable S2 is the unused time in the
carpentry department and is in the basis. Its
value implies there is 40 hours of unused
carpentry time remaining. Slack variable S1 is
nonbasic and has a value of 0 meaning there is
no slack time in the painting department.
Table 9.5
© 2009 Prentice-Hall, Inc. 9 – 41
Developing the Third Tableau
0 1 2 1 40
0 1 2 1 40
1 1 1 1 1
$5 C 0 1 –2 1 40
T = 30 tables
C = 40 chairs
S1 = 0 slack hours in the painting department
S2 = 0 slack hours in the carpentry department
profit = $4,100 for the optimal solution
Cj $70 $50 $0 $0
SOLUTION
MIX T C S1 S2 QUANTITY
$70 T 1 0 1.5 –0.5 30
$50 C 0 1 –2 1 40
Zj $70 $50 $5 $15 $4,100
Cj - Zj $0 $0 –$5 –$15
Table 9.6
Surplus variables
Greater-than-or-equal-to (≥) constraints
require a different approach than the less-
than-or-equal-to (≤) constraints we have seen
They involve the subtraction of a surplus
variable rather than the addition of a slack
variable
The surplus variable tells us how much the
solution exceeds the constraint amount
This is sometimes called negative slack
Artificial variables
There is one more step in this process
If a surplus variable is added by itself, it would
have a negative value in the initial tableau
where all real variables are set to zero
5(0) 10(0) 8(0) S1 210
0 S1 210
S1 210
Minimize cost $5 X 1 $9 X 2 $7 X 3
where
X1 = number of pounds of phosphate
X2 = number of pounds of potassium
Graphical analysis
Because there are only two decision variables,
we can plot the constraints and the feasible
region as shown in Figure 9.3
Because X1 + X2 = 1,000 is an equality, the
optimal solution must lie on this line
It must also lie between points A and B
because of the X1 ≤ 300 constraint
It turns out the X2 ≥ 150 is redundant and
nonbinding
The optimal corner point is point B (300, 700)
for a total cost of $5,700
800 –
B
600 –
X1 + X2 = 1,000
400 –
X2 ≥ 150
200 – F G H
100 –
0 |–E | D| | | |C
200 400 600 800 1,000 X1
Figure 9.3
© 2009 Prentice-Hall, Inc. 9 – 61
The Muddy River Chemical
Corporation Example
COLUMN
X1 X2 S1 S2 A1 A2
Cj for column $5 $6 $0 $0 $M $M
Zj for column $M $2M $0 –$M $M $M
Cj – Zj for column –$M + $5 –$2M + $6 $0 $M $0 $0
X1 0
X2 0
S1 300
S2
= 0
A1 1,000
A2 150
Cj $5 $6 $0 $0 $M $M
SOLUTION
X1 X2 S1 S2 A1 A2 QUANTITY
MIX
$M A1 1 1 0 0 1 0 1,000
$0 S1 1 0 1 0 0 0 300
$M A2 0 1 0 –1 0 1 150
Pivot number Pivot row
Zj $M $M $0 –$M $M $M $1,150M
Cj – Zj –$M + $5 –2M + $6 $0 $M $0 $0
Pivot column
Table 9.7
1,000
For the A1 row 1,000
1
300 (this is an undefined ratio,
For the S1 row so we ignore it)
0
150 (smallest quotient,
For the A2 row 150 indicating pivot row)
1
Cj $5 $6 $0 $0 $M $M
SOLUTION
MIX X1 X2 S1 S2 A1 A2 QUANTITY
$M A1 1 0 0 1 1 –1 850
$0 S1 1 0 1 0 0 0 300
Pivot number Pivot row
$6 X2 0 1 0 –1 0 1 150
$850M +
Zj $M $6 $0 $M – 6 $M –$M + 6
$900
Cj – Zj –$M + $5 $0 $0 –$M + $6 $0 $2M – 6
Pivot column
Table 9.8
850
For the A1 row 850
1
300
For the S1 row 300 (smallest ratio)
1
150
For the X 2 row undefined
0
A1 Row S1 Row
0 = 1 – (1)(1) 0 = 0 – (0)(1)
0 = 0 – (1)(0) 1 = 1 – (0)(0)
–1 = 0 – (1)(1) 0 = 0 – (0)(1)
1 = 1 – (1)(0) –1 = –1 – (0)(0)
1 = 1 – (1)(0) 0 = 0 – (0)(0)
–1 = –1 – (1)(0) 1 = 1 – (0)(0)
550 = 850 – (1)(300) 150 = 150 – (0)(300)
COLUMN
X1 X2 S1 S2 A1 A2
Cj for column $5 $6 $0 $0 $M $M
Zj for column $5 $6 –$M + 5 $M – 6 $M –$M + 6
Cj – Zj for column $0 $0 $M + 5 –$M + 6 $0 $2M – 6
© 2009 Prentice-Hall, Inc. 9 – 78
Developing a Third Tableau
$M A1 0 0 –1 1 1 –1 550
Pivot number Pivot row
$5 X1 1 0 1 0 0 0 300
$6 X2 0 1 0 –1 0 1 150
Zj $5 $6 –$M + 5 $M – 6 $M –$M + 6 $550M + 2,400
Cj – Zj $0 $0 $M – 5 –$M + 6 $0 $2M – 6
Pivot column
Table 9.9
550
For the A1 row 550 (row to be replaced)
1
300
For the X 1 row (undefined)
0
150 (not considered
For the X 2 row
1 because it is negative)
X1 Row X2 Row
1 = 1 – (0)(0) 0 = 0 – (–1)(0)
0 = 0 – (0)(0) 1 = 1 – (–1)(0)
1 = 1 – (0)(–1) –1 = 0 – (–1)(–1)
0 = 0 – (0)(1) 0 = –1 – (–1)(1)
0 = 0 – (0)(1) 1 = 0 – (–1)(1)
0 = 0 – (0)(–1) 0 = 1 – (–1)(–1)
300 = 300 – (0)(550) 700 = 150 – (–1)(550)
COLUMN
X1 X2 S1 S2 A1 A2
Cj for column $5 $6 $0 $0 $M $M
Zj for column $5 $6 –$1 $0 $6 $0
Cj – Zj for column $0 $0 $1 $0 $M – 6 $M
© 2009 Prentice-Hall, Inc. 9 – 82
Fourth Tableau for Muddy River
Cj $5 $6 $0 $0 $M $M
SOLUTION
MIX X1 X2 S1 S2 A1 A2 QUANTITY
$0 S2 0 0 –1 1 1 –1 550
$5 X1 1 0 1 0 0 0 300
$6 X2 0 1 –1 0 1 0 700
Zj $5 $6 –$1 $0 $6 $0 $5,700
Cj – Zj $0 $0 $1 $0 $M – 6 $M
Table 9.10
Illustration of infeasibility
Cj $5 $8 $0 $0 $M $M
SOLUTION
MIX X1 X2 S1 S2 A1 A2 QUANTITY
$5 X1 1 0 –2 3 –1 0 200
$8 X2 0 1 1 2 –2 0 100
$M A2 0 0 0 –1 –1 1 20
Zj $5 $8 –$2 $31 – M –$21 – M $M $1,800 + 20M
Cj – Zj $0 $0 $2 $M – 31 $2M + 21 $0
Table 9.11
Cj $6 $9 $0 $0
SOLUTION MIX X1 X2 S1 S2 QUANTITY
$9 X2 –1 1 2 0 30
$0 S2 –2 0 –1 1 10
Zj –$9 $9 $18 $0 $270
Cj - Zj $15 $0 –$18 $0
Pivot column
Table 9.12
30
Ratio for the X 2 row :
1
Negative ratios
unacceptable
10
Ratio for the S2 row :
2
Cj $5 $8 $2 $0 $0 $0
SOLUTION
X1 X2 X3 S1 S2 S3 QUANTITY
MIX
$8 X2 0.25 1 1 –2 0 0 10
$0 S2 4 0 0.33 –1 1 0 20
$0 S3 2 0 2 0.4 0 1 10
Zj $2 $8 $8 $16 $0 $0 $80
Cj - Zj $3 $0 –$6 –$16 $0 $0
Pivot column
Table 9.13
10
For the X 2 row : 40
0.25
20
For the S2 row : 5 Tie for the smallest
4 ratio indicates
degeneracy
10
For the S3 row : 5
2
Cj $3 $2 $0 $0
SOLUTION MIX X1 X2 S1 S2 QUANTITY
$2 X2 1.5 1 1 0 6
$0 S2 1 0 0.5 1 3
Zj $3 $2 $2 $0 $12
Cj - Zj $0 $0 –$2 $0
Table 9.14
X2 = 20 receivers Basic
S2 = 40 hours slack in technician time variables
X1 = 0 CD players Nonbasic
S1 = 0 hours slack in electrician time variables
0– | | | | | |
10 20 30 40 50 60 X1
Figure 9.4 c = (20, 0) (CD players)
© 2009 Prentice-Hall, Inc. 9 – 100
Changes in the
Objective Function Coefficient
Optimal solution by the simplex method
Cj $50 $120 $0 $0
SOLUTION
X1 X2 S1 S2 QUANTITY
MIX
$120 X2 0.5 1 0.25 0 20
$0 S2 2.5 0 –0.25 1 40
Zj $60 $120 $30 $0 $2,400
Cj - Zj –$10 $0 –$30 $0
Table 9.15
Cj $50 $120 + $0 $0
SOLUTION
MIX X1 X2 S1 S2 QUANTITY
Table 9.16
–30 – 0.25 ≤ 0
–30 ≤ 0.25
–120 ≤ or ≥ –120
Cj $50 $120 $0 $0
SOLUTION
X1 X2 S1 S2 QUANTITY
MIX
$120 X2 0.5 1 0.25 0 20
$0 S2 2.5 0 –0.25 1 40
Zj $60 $120 $30 $0 $2,400
Cj - Zj –$10 $0 –$30 $0
Table 9.17
QUANTITY S1 RATIO
20 0.25 20/0.25 = 80
Program 9.1a
© 2009 Prentice-Hall, Inc. 9 – 119
Sensitivity Analysis by Computer
Program 9.1b
Minimize
opportunity = 80U1 + 60U2 + 0S1 + 0S2 + MA1 + MA2
cost
subject to: 2U1 + 3U2 – 0S1 + 1A1 = 50
4U1 + 1U2 – 0S2 + 1A2 = 120
Cj 80 60 0 0 M M
SOLUTION
U1 U2 S1 S2 A1 A2 QUANTITY
MIX
First
$M A1 2 3 –1 0 1 0 50
tableau
$M A2 4 1 0 –1 0 1 120
Zj $6M $4M –$M –$M $M $M $170M
Cj – Zj 80 – 6M 60 – 4M M M 0 0
Second
$80 U1 1 1.5 –0.5 0 0.5 0 25
tableau
$M A2 0 –5 2 –1 –2 1 20
$120 – $2,000 + 20M
Xj $80 –$40 + 2M –$M $40 – 2M $M
5M
Cj – Xj 0 5M – 60 –2M + 40 M 3M – 40 0
Table 9.18