Title: EM 540 Operations Research
1- EM 540 Operations Research/
- DecS 581 Operations Management
Chapter 9 Linear Programming The Simplex Method
2Mid Term Critique
- We are Always trying to improve
- The Midterm course evaluations have been
started. Students can go to their Academics page
in MyWSU and they will see a link for the midterm
evaluations for each course that is
participating. - If students and/or faculty have problems with
the evaluations please ask them to send a help
request at http//support.ctlt.wsu.edu. -
3Chapter Outline
- 9.1 Introduction
- 9.2 How to Set Up the Initial Solution
- 9.3 Simplex Solution Procedures
- 9.4 The Second Simplex Tableau
- 9.5 Developing the Third Simplex Tableau
- 9.6 Review of Procedures for Solving LP
Maximization Problems
4Chapter Outline - continued
- 9.7 Surplus and Artificial Variables
- 9.8 Solving Minimization Problems
- 9.9 Review of Procedures for Solving LP
Minimization Problems - 9.10 Special Cases
5Learning Objectives
- Students will be able to
- Convert LP constraints to equalities with slack,
surplus, and artificial variables. - Set up and solve both simple maximization and
minimization LP problems with simplex tableaus. - Interpret the meaning of the numbers in a simplex
tableau.
6Learning Objectives - continued
- Students will be able to
- Recognize cases of infeasibility, unboundedness,
degeneracy, and multiple optimal solutions in a
simplex output. - Understand the relationship between the primal
and dual and when to formulate and use the dual.
7Flair Furniture Company
Hours Required to Produce One Unit
Available Hours This Week
X1 Tables
X2 Chairs
Department
Carpentry Painting/Varnishing
4 2
3 1
240 100
Profit/unit Constraints
7
5
Maximize
Objective
8George Dantzig studied mathematics at the
University of Maryland, receiving his A.B. in
1936. The following year he received an M.A. in
mathematics from the University of Michigan.
Dantzig worked as a Junior Statistician in the
U.S. Bureau of Labor Statistics from 1937 to
1939, then, from 1941 to 1946, he was head of the
Combat Analysis Branch, U.S.A.F. Headquarters
Statistical Control. He received his doctorate in
mathematics from the University of California,
Berkeley in 1946. In that year he was appointed
Mathematical Advisor for USAF Headquarters. In
1947 Dantzig made the contribution to mathematics
for which he is most famous, the simplex method
of optimization. It grew out of his work with the
U.S. Air Force where he become an expert on
planning methods solved with desk calculators. In
fact this was known as "programming", a military
term that, at that time, referred to plans or
schedules for training, logistical supply or
deployment of men.
Born 8 Nov 1914 in Portland, Oregon
9Dantzigs Challenge
However, writing in 1991, Dantzig noted that-
... it is interesting to note that the original
problem that started my research is still
outstanding - namely the problem of planning or
scheduling dynamically over time, particularly
planning dynamically under uncertainty. If such a
problem could be successfully solved it could
eventually through better planning contribute to
the well-being and stability of the world.
We solve this in EM 530 Applications in
Constraints Management
10Math Review
One Equation with One Unknown
Eq. 1 X5 Eq. 2 Y62-10/5
One Equation with Two Unknowns
Eq. 1 XY7 Eq. 2 Y is a function of X
Y(X)7-X
11More Math
Two Equations with Two Unknowns
Eq. 1 XY7 Eq. 2 X - Y1
Adding these two equations (equalities) together
Eq. 3 2X0Y8
Or
Eq. 4 X 4
Substituting into Eq. 1
Eq. 5 4 Y7Eq. 6 Y3
12Checking
We started with
Eq. 1 XY7 Eq. 2 X - Y1
We found
Eq. 4 X 4
Eq. 6 Y3
Checking
Eq. 1 4 37 Eq. 2 4 - 31
Looks Correct!
13Try another one a bit tougher
Lets try
Eq. 1 2X 1Y 100 Eq. 2 4X 3Y 240
14Solving for X
Lets try
Eq. 1 2X 1Y 100 Eq. 2 4X 3Y 240
Eq. 3 6X 3Y 300
Eq. 2 4X 3Y 240
Subtracting Eq. 2 from Eq. 3 gives
Eq. 4 2X 0Y 60
15Solving for Y
Then we have
Eq. 2 4X 3Y 240
Eq. 4 2X 0Y 60
Eq. 5 4X 0Y 120
Eq. 2 4X 3Y 240
Subtracting Eq. 5 from Eq. 2 gives
Eq. 6 0X 3Y 120
16We have X and Y
17You may remember Matrix Manipulation
We write
Eq. 1 2X 1Y 100 Eq. 2 4X 3Y 240
18Its Easy to Solve A Matrix
To solve this Matrix
X Y RHS Row 1
2 1 100 Row 2 4 3 240
19Its been a while, so just for fun!
We start with
2 1 100 4 3 240
20A bit more Manipulation
21And the Answer...
Yeah, no math error!
22But with InEqualities?
Lets try
Eq. 1 2X 1Y lt 100 Eq. 2 4X 3Y lt 240
23What is the answer?
Lets try
Eq. 1 2X 1Y lt 100 Eq. 2 4X 3Y lt 240
24We need to solve our InEqualities Differently
Cleverly, we can cause an inequality to vanish by
adding a dummy or Slack Variable to each
equation.
Eq. 1 2X 1Y lt 100 Eq. 2 4X 3Y lt 240
As long asS1 and S2 are gt 0 the original
inequalities hold.
New Eq. 1 2X 1Y S1 100 New Eq. 2
4X 3Y S2 240
25This may look messy, but a matrix solution
doesnt care
2X 1Y S1 100 4X 3Y S2
240
26So, Just for Practice (and to prepare us for the
Simplex Method)
Lets solve this inequality matrix
X Y S1 S2 RHS 2 1 1 0
100 4 3 0 1 240
27Solving is the same fashion as before
We start with
2 1 1 0 100 4 3 0 1 240
28Then
29Dividing Each Row
30Dividing Each Row
The Slack Variables (in conjunction with the
Objective Function (not shown or used here) would
tell us if X30 and Y40 was not the correct
solution!
31Now, lets revisit Flair Furniture
Let X1 Number of Tables produced Let X2
Number of Chairs produced Where profits are 7
per table and 5 per chair Maximize 7 X1
5X2 Subject to Paint 2X1 1X2
lt 100 Carpenter 4X1 3X2 lt240 Where
X1, X2 gt0
32Flair Furniture Company's Feasible Region
Corner Points
X2
100 80 60 40 20
B (0,80)
Number of Chairs
C (30,40)
Feasible Region
D (50,0)
0 20 40 60 80 100
X1
Number of Tables
33Flair Furniture - Adding Slack Variables
Constraints
240
3
4
)
(carpentry
X
X
2
1
100
1
2
)
varnishing
(painting
X
X
2
1
Constraints with Slack Variables
240
3
4
)
(carpentry
S
X
X
1
2
1
100
1
2
)
varnishing
(painting
S
X
X
2
2
1
Objective Function
5
7
X
X
2
1
Objective Function with Slack Variables
0
0
5
7
S
S
X
X
2
1
2
1
34Flair Furnitures Initial Simplex Tableau
Profit per Unit Column
Real Variables Columns
Production Mix Column
Constant Column
Solution Mix
X1
X2
S1
S2
2
1
1
0
S1
100
4
3
0
1
S2
240
?(Cj X1)
35Flair Furnitures Initial Simplex Tableau
Profit per Unit Column
Real Variables Columns
Slack Variables Columns
Production Mix Column
Constant Column
Profit per unit row
Cj
7
5
0
0
Solution Mix
X1
X2
S1
S2
Quantity
Constraint equation rows
2
1
1
0
0
S1
100
4
3
0
1
0
S2
240
Gross profit row
0
0
0
0
0
Zj
Net profit row
7
5
0
0
Cj - Zj
0
36Which Column Gives the Best Improvement?
Profit per Unit Column
Real Variables Columns
Slack Variables Columns
Production Mix Column
Constant Column
Profit per unit row
Cj
7
5
0
0
Solution Mix
X1
X2
S1
S2
Quantity
Constraint equation rows
2
1
1
0
0
S1
100
4
3
0
1
0
S2
240
Gross profit row
0
0
0
0
0
Zj
Net profit row
7
5
0
0
Cj - Zj
0
37How Far up the Curve can we go? (Least Positive)
Profit per Unit Column
Real Variables Columns
Slack Variables Columns
Production Mix Column
Constant Column
Profit per unit row
Cj
7
5
0
0
Solution Mix
X1
X2
S1
S2
Quantity
Constraint equation rows
100
2
1
1
0
0
S1
4
3
0
1
0
S2
240
Gross profit row
0
0
0
0
0
Zj
Net profit row
7
5
0
0
Cj - Zj
0
38Pivot Row, Pivot Number Identified in the Initial
Simplex Tableau
The math approach will be Drive the Pivot
Number to 1. Cause all other numbers in the
Pivot Column to go to Zero. Adjust Cj and sums.
39Calculating the New X1 Row
7
5
0
0
Solution Mix
X1
X2
S1
S2
Quantity
2
1
1
0
S1
100
40Calculating the new S2 line
X1
X2
S1
S2
Quantity
1
1/2
1/2
0
X1
50
4
3
0
1
S2
240
Subtracting New X1 from S2
41After the First Simplex Tableau for Flair
Furniture
42Which Column has the Best Improvement Option?
43How far up the curve can we go? (Least Positive)
44Pivot Row, Column, and Number Identified in
Second Simplex Tableau
45The Pivot Number is Already 1
5 X2
46Adjusting the X1 Row
Pivot column
X1
X2
S1
S2
1
1/2
1/2
0
X1
50
0
1
-2
1
S2
40
Subtracting New S2 From X1
47Are There Further Improvements Possible?
48Final Simplex Tableau for the Flair Furniture
Problem
49Why is it Final?
We recognize the solution, but could it be
better? The Shadow prices are all zero or
negative. Cant get any better. So, its final.
50Total Value then is
51Simplex Steps for Maximization
- 1. Choose the variable with the greatest positive
Cj - Zj to enter the solution. - 2. Determine the row to be replaced by selecting
that one with the smallest (non-negative)
quantity-to-pivot-column ratio. - 3. Calculate the new values for the pivot row.
- 4. Calculate the new values for the other row(s).
- 5. Calculate the Cj and Cj - Zj values for this
tableau. If there are any Cj - Zj values greater
than zero, return to Step 1.
52Surplus Artificial Variables
Constraints
Constraints-Surplus Artificial Variables
Objective Function
Objective Function-Surplus Artificial Variables
53Simplex Steps for Minimization
- 1. Choose the variable with the greatest negative
Cj - Zj to enter the solution. - 2. Determine the row to be replaced by selecting
that one with the smallest (non-negative)
quantity-to-pivot-column ratio. - 3. Calculate the new values for the pivot row.
- 4. Calculate the new values for the other row(s).
- 5. Calculate the Cj and Cj - Zj values for this
tableau. If there are any Cj - Zj values less
than zero, return to Step 1.
54Special CasesInfeasibility in Minimization
55Special Cases Unboundedness Maximize
Solution is Infinite
Pivot Column
56Special CasesDegeneracy
10/1/4 20/4 10/2
To Fix Remove Redundant Constraint
4 X1 0Y1 lt20 2 X1 0Y1 lt10are the same
line.
Can lock up computer iterations in loops
Pivot Column
57Special CasesMultiple Optima
58Sensitivity AnalysisHigh Note Sound Company
120
50
X
Max
X
1
2
to
Subject
80
4
2
X
X
2
1
60
1
3
X
X
2
1
59Sensitivity AnalysisHigh Note Sound Company
60Simplex SolutionHigh Note Sound Company
So, Whats the answer?
61Simplex SolutionHigh Note Sound Company
Discovering the Solution
62Non-basic Objective Function Coefficients
How much does the Cj for X1 have to increase
before it becomes Basic?
Cj -(Cj-Zj) is Break
63Basic Objective Function Coefficients
X2 wont leave until Cj for X2 drops 20.
?gt-20
?gt-120
S1 enter until Cj for X2 drops 120.
Sensitivity Analysis about the Solution Point!
64Simplex SolutionHigh Note Sound Company
Objective increases by 30 if 1 additional hour of
electricians time is available.
65Shadow Prices
- Shadow Price Value of One Additional Unit of a
Scarce Resource - Found in Final Simplex Tableau in Cj-Zj Row
- Negatives of Numbers in Slack Variable Column
66Steps to Form the Dual
- To form the Dual
- If the primal is max., the dual is min., and vice
versa. - The right-hand-side values of the primal
constraints become the objective coefficients of
the dual. - The primal objective function coefficients become
the right-hand-side of the dual constraints. - The transpose of the primal constraint
coefficients become the dual constraint
coefficients. - Constraint inequality signs are reversed.
67Primal Dual
The Dual is very helpful at speeding massive
solutions of certain types and provides some
additional information.
Dual
Fold over
68Comparison of the Primal and Dual Optimal Tableaus
The solution of the Dual is the Shadow price of
the Primal
Cj
50
120
0
0
Solution Mix
Quantity
X1
X2
S1
S2
Primals Optimal Solution
7
X2
20
1/2
1
1/4
0
5
S2
40
5/2
0
-1/4
1
Zj
2,400
60
120
30
0
Cj - Zj
-10
0
-30
0
Duals Optimal Solution
69Additional Pointers
- During your Homework, step through the Tableaus
and watch as QM for Windows Calculates each
cycle.
70(No Transcript)
71Cost Data at WXYZ
72Decision Options at WXYZ
- Accounting Produce items with Highest Profit
Margin - Z (52)(16 ea) - (20)(16) - (2 workers)(8
hours)(10/hour) 352 /day - Marketing Sell the product with the Highest
Selling Price (commission) - Y (55)(16 ea) - (25)(16) - (2 )(8 )(10)
320 /day
73Other Opinions at WXYZ
- Production Produce items with Most Efficiency
(Keep everyone busy) - X (50)(24 ea) - (25)(24) - (2 workers)(8
hours)(10/hour) 440 /day - Global Thinking Produce items with Most
Throughput per unit time of Constraint - W (50)(24 ea) - (20)(24) - (2)(8)(10)
560 /day
74PQ Corp
This example problem taken from Sifting
Infomation Out of the Data Ocean The Haystack
Syndrome by Eli Goldratt Used by permission,
James R. Holt, Associate Professor, Engineering
Management, Washington State University-Vancouver,
Jan 1999
75Marginal Profit LP of PQUsing Cost Accounting
Maximize 7.20 P 28.50Q s.t. A
15 P 10 Qlt2400 B
15 P 30 Qlt2400 C 15
P 5 Qlt2400 D 15 P
5 Qlt2400Demand P 1 P
lt100Demand Q
1 Qlt50
76LP PQ Solution
Will we actually make any money if we make 60 P
and 50 Q? We must pay the bills of 6000 per
week! Why wont we? Is there any other option?
Why is it better?
77PQ Corp
This example problem taken from Sifting
Infomation Out of the Data Ocean The Haystack
Syndrome by Eli Goldratt Used by permission,
James R. Holt, Associate Professor, Engineering
Management, Washington State University-Vancouver,
Jan 1999
78Marginal Profit LP of PQUsing Contribution Margin
Maximize 45 P 60 Q s.t. A
15 P 10 Qlt2400 B 15
P 30 Qlt2400 C 15 P
5 Qlt2400 D 15 P
5 Qlt2400Demand P 1 P
lt100Demand Q 1
Qlt50
79Revised PQ Problem
Will we actually make any money if we make 100 P
and 30 Q? We must pay the bills of 6000 per
week! Yes, we will generate 6300 this week!