Simplex Slides
Simplex Slides
Simplex Slides
Linear Programming:
The Simplex Method
To accompany
Quantitative Analysis for Management, Tenth Edition,
by Render, Stair, and Hanna © 2008 Prentice-Hall,
Power Point slides created by Jeff Heyl © 2009 Prentice-Hall, Inc.
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
1. Introduction
2. How to Set Up the Initial Simplex
Solution
3. Simplex Solution Procedures
4. The Second Simplex Tableau
5. Developing the Third Tableau
6. Review of Procedures for Solving
LP Maximization Problems
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 © 2009 Prentice-Hall, Inc. 9–9
Converting the Constraints
to Equations
Each slack variable must appear in every
constraint equation
Slack variables not actually needed for an
equation have a coefficient of 0
So
2T + 1C + 1S1 + 0S2 = 100
4T + 3C +0S1 + 1S2 = 240
T, C, S1, S2 ≥ 0
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 | T
|–
Figure 9.1 40 60
80
© 2009 Prentice-Hall, Inc. 9 – 13
Number of Tables
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
ix
es
es
t
m
ni
bl
bl
u
n on
ns ria
ns ia
n r
n t
m ti
m e
m a
m n
m ar
lu it p
lu k v
lu uc
lu sta
lu l v
co rod
co lac
co rof
co on
co ea
R
C
S
P
P
T 30
C 40
=
S1
S
02
0
© 2009 Prentice-Hall, Inc. 9 – 17
The First Simplex Tableau
Substitution rates
The numbers in the body of the tableau are the
coefficients of the constraint equations
These can also be thought of as substitution
rates
Using the variable T as an example, if Flair
were to produce 1 table (T = 1), 2 units of S1
and 4 units of S2 would have to be removed
from the solution
Similarly, the substitution rates for C are 1 unit
of S1 and 3 units of S2
Also, for a variable to appear in the solution
mix, it must have a 1 someplace in its column
and 0s in every other place in that column
© 2009 Prentice-Hall, Inc. 9 – 18
The First Simplex Tableau
Adding the objective function
We add a row to the tableau to reflect the
objective function values for each variable
These contribution rates are called Cj and
appear just above each respective variable
In the leftmost column, Cj indicates the unit
profit for each variable currently in the solution
mix
Cj $70 $0
$50 QUANTITY
S2
$0 $0 0 100
$0 SOLUTION 1 240
MIX T C S1
© 2009 Prentice-Hall, Inc. 9 – 19
S1 2 1
1
S2 4 3
0
The First Simplex Tableau
The Zj and Cj – Zj rows
We can complete the initial tableau by adding
two final rows
These rows provide important economic
information including total profit and whether
the current solution is optimal
We compute the Zj value by multiplying the
contribution value of each number in a column
by each number in that row and the jth column,
and summing
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
$0
Table 9.3 Pivot column
2 1
1 0.5 1* 0.5 0 100
2 2 2 2 0 2 50
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.
50
For the T row :0.5 100
chairs
40
For the S2 row : 1 40
chairs © 2009 Prentice-Hall, Inc. 9 – 40
Developing the Third Tableau
These ratios correspond to the values of C at points
F and C in Figure 9.2. The S2 row has the smallest
ratio so S2 will leave the basis and will be replaced
by C.
Cj $70 $50 $0 $0
SOLUTION
MIX T C S1 S2
$70 T 1 0.5 0.5 QUANTITY
0 50
$0 0 1 –2 1 40
S2 Pivot number Pivot row
Zj $70 $35 $35 $0 $3,500
Cj - Zj $0 $15 –$35 $0
Pivot column
Table 9.5
© 2009 Prentice-Hall, Inc. 9 – 41
Developing the Third Tableau
$5 C 0 1 –2 1 40
Cj SOLUTION MIX T C S1 S2
QUANTITY
$70 T 1 0 1.5 –0.5 30
$50 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
$70 T 1 0 1.5 QUANTITY 30
–0.5
$50 C 0 1 –2 1 40
Zj $70 $50 $5 $15 $4,100
Cj - Zj $0 $0 –$5 –$15
Table 9.6
surplus
units
Surplus and Artificial Variables
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
Constraint 1completed : 5 X 1 10 X 2 8 X 3 S1 A1
210
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
≥0
Rules of the Simplex Method for
Minimization Problems
Minimization problems are quite similar to the
maximization problems tackled earlier
The significant difference is the Cj - Zj row
We will now choose the variable with the
negative
Cj - Zj that gives the largest improvement
We select the variable that decreases costs the
most
In minimization problems, an optimal solution is
reached when all the numbers in the Cj - Zj are 0
or positive
All other steps in the simplex method remain the
same
© 2009 Prentice-Hall, Inc. 9 – 64
Steps for Simplex Minimization
Problems
Cj SOLUTION MIX X1 X2 S1 S2 A1 A2
QUANTITY
$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
© 2009 Prentice-Hall, Inc. 9 – 66
First Simplex Tableau for the Muddy
River Chemical Corporation Example
The numbers in the Zj are computed by
multiplying the Cj column on the far left of the
table times the corresponding numbers in each
other column
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 1 0 1 0 0 0 300
$M A2 0 1 0 –1 0 1 150
S1
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 1,000
(this is an undefined ratio,
300
For the S1 row 0 so we ignore it)
(smallest quotient,
150
For the A2 row 1 150 indicating pivot row)
$M $6 $0
Table 9.8
–$M + $5 $0 $0
Pivot column © 2009 Prentice-Hall, Inc. 9 – 75
Developing a Third Tableau
850
For the A1 row 1 850
150
For the X 2 row 0 undefined
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) © 2009 Prentice-Hall, Inc. 9 – 77
Table 9.9
550
For the A1 row 550 (row to be replaced)
1
300
For the X1 row (undefined)
0
(not considered
150
For the X 2 row because it is negative)
1
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)
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
$9 –1 1 2 QUANTITY
0 30
X2
$0 –2 0 –1 1 10
Z –$9 $9 $18 $0 $270
S2j
Cj - Zj $15 $0 – $0
$18
Pivot column
Table 9.12
30
Ratio for the X 2 row :
Negative ratios
1
unacceptable
10
Ratio for the S row :
2
2
Since both pivot column numbers are negative,
an unbounded solution is indicated
Cj $5 $8 $2 $0 $0 $0
SOLUTION
X1 X2 X3 S1 S2 S3
MIX
QUANTITY
$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 :0.25 40
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
Linear
Programming
Models: Graphical
and Computer
Methods
Prepared by Lee Revere and John Large
100 2T + 1C ≤ 100
Painting/Varnishing
Number of Chairs
80
60
40 4T + 3C ≤ 240
Carpentry
20
0
20 40 60 80 100
Number of Tables
To accompany Quantitative Analysis 7-13 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Flair Furniture Company
Feasible Region
120
Painting/Varnishing
Number of Chairs
100
80
60
Carpentry
40
Feasible
20 Region
0
20 40 60 80 100
Number of Tables
To accompany Quantitative Analysis 7-14 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Isoprofit Lines Steps
1. Graph all constraints and find the
feasible region.
2. Select a specific profit (or cost) line
and graph it to find the slope.
3. Move the objective function line in
the direction of increasing profit (or
decreasing cost) while maintaining
the slope. The last point it touches in
the feasible region is the optimal
solution.
4. Find the values of the decision
variables at this last point and
compute the profit (or cost).
100
Painting/Varnishing
Number of Chairs
80 7T + 5C = 210
60 7T + 5C = 420
40 Carpentry
20
0
20 40 60 80 100
Number of Tables
To accompany Quantitative Analysis 7-20 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Flair Furniture Company
Optimal Solution
120
Isoprofit Lines
100
Painting/Varnishing
Number of Chairs
80
Solution
60
(T = 30, C = 40)
40 Carpentry
20
0
20 40 60 80 100
Number of Tables
To accompany Quantitative Analysis 7-21 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Flair Furniture Company
Corner Point
Corner Point Solution Method
A second approach to solving LP
problems
It involves looking at the profit at
every corner point of the feasible
region
The mathematical theory behind LP is
that the optimal solution must lie at
one of the corner points in the feasible
region
80
Solution
60
(T = 30, C = 40)
40 Carpentry
3
20
1
0
20 4 60
40 80 100
Number of Tables
To accompany Quantitative Analysis 7-25 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Solving Minimization
Problems
Many LP problems minimize an objective,
such as cost, instead of maximizing a
profit function. For example,
• A restaurant may wish to develop a work
schedule to meet staffing needs while
minimizing the total number of employees.
Or,
A manufacturer may seek to distribute its
products from several factories to its many
regional warehouses in such a way as to
minimize total shipping costs.
Or,
A hospital may want to provide a daily
meal plan for its patients that meets certain
nutritional standards while minimizing food
purchase costs.
To accompany Quantitative Analysis 7-26 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Solving Minimization
Problems
Minimization problems can be solved
graphically by
first setting up the feasible solution
region and then using either
the corner point method or
an isocost line approach (which is
analogous to the isoprofit approach in
maximization problems)
to find the values of the decision variables
(e.g., X1 and X2) that yield the minimum
cost.
Subject to:
5X1 + 10X2 90 oz. (A)
4X1 + 3X2 48 oz. (B)
½ X1 1 ½ oz. (C)
X1 , X2 0 (D)
where,
X 1 = # of pounds of brand 1 feed purchased
X 2 = # of pounds of brand 2 feed
purchased A constraint
(A) = ingredient
(B) = ingredient B constraint
(C) = ingredient C constraint
(D) = non-negativity constraints
To accompany Quantitative Analysis 7-28 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
Holiday Meal Turkey
Ranch
Using the Corner Point Method
To solve this problem:
1. Construct the feasible solution region.
This is done by plotting each of the three
constraint equations.
2. Find the corner points.
This problem has 3 corner points, labeled
a, b, and c.
2. Unbounded Solutions:
- when the objective function in a maximization
problem can be infinitely large, the problem is
unbounded and is missing one or more constraints.
3. Redundancy:
- a redundant constraint is one that does not affect
the feasible solution region.
6
Region Satisfying
4
3rd Constraint
2
2 4 6 8 X1
15 X1 > 5
X2 < 10
10
Feasible Region
5
X1 + 2X2 > 10
0
5 10 15 X1
30
10
X1 + X2 < 20
5
0 Feasible
Region
X1
5 10 15 20 25 30
To accompany Quantitative Analysis 7-37 © 2006 by Prentice Hall, Inc.
for Management, 9e Upper Saddle River, NJ 07458
by Render/Stair/Hanna
An Example of Alternate
Optimal Solutions
8
Optimal Solution Consists of
7
All Combinations of X1 and
6
X2 Along the AB Segment
5 A Isoprofit Line for $8
4
Isoprofit
3 B for
Line$12
2 AB
Overlays Line
1
Segment
0 1 2 3 4 5 6 7 8