Download presentation
Presentation is loading. Please wait.
Published byJasmine Shanon McKinney Modified over 6 years ago
1
Table of Contents Chapter 5 (What-If Analysis for Linear Programming)
Continuing the Wyndor Case Study (Section 5.2) 5.2 Changes in One Objective Function Coefficient (Section 5.3) 5.3–5.9 Simultaneous Changes in Objective Function Coefficients (Section 5.4) 5.10–5.17 Single Changes in a Constraint (Section 5.5) 5.18–5.23 Simultaneous Changes in the Constraints (Section 5.6) 5.24–5.26 Sensitivity Analysis (UW Lecture) 5.27–5.43 These slides are based upon a lecture to first-year MBA students at the University of Washington that discusses sensitivity analysis for linear programming models (as taught by one of the authors). © The McGraw-Hill Companies, Inc., 2003
2
Wyndor (Before What-If Analysis)
Figure 5.1 The spreadsheet model and its optimal solution for the original Wyndor problem before beginning what-if analysis. © The McGraw-Hill Companies, Inc., 2003
3
Using the Spreadsheet to do Sensitivity Analysis
Figure 5.2 The revised Wyndor problem where the estimate of the unit profit for doors has been decreased from PD = $300 to PD = $200, but no change occurs in the optimal solution. The profit per door has been revised from $300 to $200. No change occurs in the optimal solution. © The McGraw-Hill Companies, Inc., 2003
4
Using the Spreadsheet to do Sensitivity Analysis
Figure 5.3 The revised Wyndor problem where the estimate of the unit profit for doors has been increased from PD = $300 to PD = $500, but no change occurs in the optimal solution. The profit per door has been revised from $300 to $500. No change occurs in the optimal solution. © The McGraw-Hill Companies, Inc., 2003
5
Using the Spreadsheet to do Sensitivity Analysis
Figure 5.4 The revised Wyndor problem where the estimate of the unit profit for doors has been increased from PD = $300 to PD = $1,000, which results in a change in the optimal solution. The profit per door has been revised from $300 to $1,000. The optimal solution changes. © The McGraw-Hill Companies, Inc., 2003
6
Using Solver Table to do Sensitivity Analysis
Figure 5.5 Expansion of the spreadsheet to prepare for using the Solver Table to show the effect of systematically varying the estimate of the unit profit for doors in the Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
7
Using Solver Table to do Sensitivity Analysis
Figure 5.6 An application of the Solver Table that shows the effect of systematically varying the estimate of the unit profit for doors in the Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
8
Using the Sensitivity Report to Find the Allowable Range
Figure 5.7 Part of the sensitivity report generated by the Excel Solver for the original Wyndor problem, where the last three columns enable identifying the allowable ranges for the unit profits for doors and windows. © The McGraw-Hill Companies, Inc., 2003
9
Graphical Insight into the Allowable Range
Figure 5.8 The two dashed lines that pass through the solid constraint boundary lines are the objective function lines when PD (the unit profit for doors) is at an endpoint of its allowable range, 0 ≤ PD ≤ 750, since either line or any objective function line in between still yields (D, W) = (2, 6) as an optimal solution for the Wyndor problem. The two dashed lines that pass through the solid constraint boundary lines are the objective function lines when PD (the unit profit for doors) is at an endpoint of its allowable range, 0 ≤ PD ≤ 750. © The McGraw-Hill Companies, Inc., 2003
10
Using the Spreadsheet to do Sensitivity Analysis
Figure 5.9 The revised Wyndor problem where the estimates of the unit profit for doors and windows have been changed to PD = $450 and PW = $400, respectively, but no change occurs in the optimal solution. The profit per door has been revised from $300 to $450. The profit per window has been revised from $500 to $400. No change occurs in the optimal solution. © The McGraw-Hill Companies, Inc., 2003
11
Using the Spreadsheet to do Sensitivity Analysis
Figure The revised Wyndor problem where the estimates of the unit profit for doors and windows have been changed to PD = $600 and PW = $300, respectively, which results in a change in the optimal solution. The profit per door has been revised from $300 to $600. The profit per window has been revised from $500 to $300. The optimal solution changes. © The McGraw-Hill Companies, Inc., 2003
12
Using Solver Table to do Sensitivity Analysis
Figure Expansion of the spreadsheet to prepare for using a two-dimensional Solver Table to show the effect on total profit of systematically varying the estimates of the unit profits for doors and windows for the Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
13
Using Solver Table to do Sensitivity Analysis
Figure A two-dimensional application of the Solver Table that shows the effect on total profit of systematically varying the estimates of the unit profits of doors and windows for the Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
14
Using Solver Table to do Sensitivity Analysis
Figure A two-dimensional application of the Solver Table that shows the effect on the optimal solution of systematically varying the estimates of the unit profits of doors and windows for the Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
15
The 100 Percent Rule The 100 Percent Rule for Simultaneous Changes in Objective Function Coefficients: If simultaneous changes are made in the coefficients of the objective function, calculate for each change the percentage of the allowable change (increase or decrease) for that coefficient to remain within its allowable range. If the sum of the percentage changes does not exceed 100 percent, the original optimal solution definitely will still be optimal. (If the sum does exceed 100 percent, then we cannot be sure.) © The McGraw-Hill Companies, Inc., 2003
16
Graphical Insight into 100 Percent Rule
The estimates of the unit profits for doors and windows change to PD = $525 and PW = $350, which lies at the edge of what is allowed by the 100 percent rule. Figure When the estimates of the unit profits for doors and windows change to PD = $525 and PW = $350, which lies at the edge of what is allowed by the 100 percent rule, the graphical method shows that (D, W) = (2, 6) still is an optimal solution, but now every other point on the line segment between this solution and (4, 3) also is optimal. © The McGraw-Hill Companies, Inc., 2003
17
Graphical Insight into 100 Percent Rule
Figure When the estimates of the unit profits for doors and windows change to PD = $150 and PW = $250 (half their original values), the graphical method shows that the optimal solution still is (D, W) = (2, 6) even though the 100 percent rule says that the optimal solution might change. When the estimates of the unit profits for doors and windows change to PD = $150 and PW = $250 (half their original values), the graphical method shows that the optimal solution still is (D, W) = (2, 6) even though the 100 percent rule says that the optimal solution might change. © The McGraw-Hill Companies, Inc., 2003
18
Using the Spreadsheet to do Sensitivity Analysis
Figure The revised Wyndor problem where the hours available in plant 2 per week have been increased from 12 to 13, which results in an increase of $150 in the total profit per week. The hours available in plant 2 have been increased from 12 to 13. The total profit increases by $150 per week. © The McGraw-Hill Companies, Inc., 2003
19
Using the Spreadsheet to do Sensitivity Analysis
Figure A further revision of the Wyndor problem to further increase the hours available in plant 2 from 13 to 18, which results in a further increase in total profit of $750 (amounting to $150 per hour added in plant 2). The hours available in plant 2 have been further increased from 13 to 18. The total profit increases by $750 per week ($150 per hour added in plant 2). © The McGraw-Hill Companies, Inc., 2003
20
Using the Spreadsheet to do Sensitivity Analysis
Figure A further revision of the Wyndor problem to further increase the hours available in plant 2 from 18 to 20, which results in no change in total profit because the optimal solution cannot make use of these additional hours. The hours available in plant 2 have been further increased from 18 to 20. The total profit does not increase any further. © The McGraw-Hill Companies, Inc., 2003
21
Using Solver Table to do Sensitivity Analysis
Figure An application of the Solver Table that shows the effect of varying the number of hours of production time being made available per week in plant 2 for Wyndor’s new products. © The McGraw-Hill Companies, Inc., 2003
22
Using the Sensitivity Report
Figure The complete sensitivity report generated by the Excel Solver for the original Wyndor problem. © The McGraw-Hill Companies, Inc., 2003
23
Graphical Interpretation of the Allowable Range
Figure A graphical interpretation of the allowable range 6 ≤ RHS2 ≤ 18, for the right-hand side of Wyndor’s plant 2 constraint. © The McGraw-Hill Companies, Inc., 2003
24
Using the Spreadsheet to do Sensitivity Analysis
Figure The revised Wyndor problem where column G has been changed by shifting one of the hours available in plant 3 to plant 2 and then re-solving. One available hour in plant 3 has been shifted to plant 2. The total profit increases by $50 per week. © The McGraw-Hill Companies, Inc., 2003
25
Using Solver Table to do Sensitivity Analysis
Figure By inserting a formula into cell G8 that keeps the total number of hours available in plant 2 and 3 equal to 30, this one-dimensional application of Solver Table shows the effect of shifting more and more of the hours available from plant 3 to plant 2. © The McGraw-Hill Companies, Inc., 2003
26
The 100 Percent Rule The 100 Percent Rule for Simultaneous Changes in Right-Hand Sides: The shadow prices remain valid for predicting the effect of simultaneously changing the right-hand sides of some of the functional constraints as long as the changes are not too large. To check whether the changes are small enough, calculate for each change the percentage of the allowable change (decrease or increase) for that right-hand side to remain within its allowable range. If the sum of the percentage changes does not exceed 100 percent, the shadow prices definitely will still be valid. (If the sum does exceed 100 percent, then we cannot be sure.) © The McGraw-Hill Companies, Inc., 2003
27
A Production Problem Weekly supply of raw materials: Products:
8 Small Bricks 6 Large Bricks Products: Slides 5.27–5.43 are based upon a lecture introducing sensitivity analysis for linear programming models to first-year MBA students at the University of Washington (as taught by one of the authors). The lecture is largely based upon a production problem using lego building blocks. This example is based upon an example introduced in an OR/MS Today article. To start the example, students are given a set of legos (8 small bricks and 9 large bricks)—one set per two students works pretty well. Tell them to set aside 3 of the large bricks to begin with (so they have a total of 6 to work with). These are their “raw materials”. They are then to produce tables and chairs out of these legos (see the diagram on the slide). These are their “products”. Each table generates $20 profit and each chair generates $15 profit. Their goal is to use their limited resources (the bricks) to make products (tables and chairs) so as to make as much profit as possible. The next slide contains some questions to be answered, one-by-one. The lego building blocks can be used to help answer the questions. Table Profit = $20 / Table Chair Profit = $15 / Chair © The McGraw-Hill Companies, Inc., 2003
28
Sensitivity Analysis Questions
With the given weekly supply of raw materials and profit data, how many tables and chairs should be produced? What is the total weekly profit? What if one more large brick were available. How much would you be willing to pay for it? What if an additional two large bricks were available (to make a total of 9). How much would you be willing to pay for these two additional bricks? What if the profit per table were now $25. (Assume now there are only 6 large bricks again.) How many tables and chairs should now be produced? What if the profit per table were now $35. How many tables and chairs should now be produced? With 6 large bricks and 8 small bricks, with $20 profit per table and $15 profit per chair, the optimal solution is to build 2 tables and 2 chairs. Suppose they purchase the large bricks from an outside supplier, and this supplier is offering one more large brick. How much are you willing to pay for it? Initial inspection leads some to believe they are worthless. All the bricks are being used up to make the 2 tables and 2 chairs. Eventually, someone stumbles upon the fact that with one more large brick, you can turn a chair into a table. The extra profit from this is $5, so you should be willing to pay up to $5 for it. Without realizing it (at this point), they have found the shadow price for large bricks ($5). Now suppose that the vendor offers yet two more large bricks at the bargain price of $6 for both of them (well less than $5 each). However, if two additional large bricks are made available (for a total of 9), they are no longer worth $5 each. The ninth brick is worthless, since only one more chair can be made into a table. Thus, at this point they have discovered the allowable range (without realizing it at this point). The $5 shadow price (value of the large bricks) is only valid for two extra large bricks. Now put the 3 extra large bricks away (go back to 6 total). If the profit per table is now $25, what’s the best production plan? Many think (at first) it should be 3 tables and no chairs since this gives $75 profit (an increase of $5). However, keeping 2 tables and 2 chairs generates a profit of $80 (an increase of $10). They have now seen that for small changes in an objective coefficient, the solution does not change. If the profit per table is now $35, what’s the best production plan? Now it is 3 tables and 0 chairs, with a weekly profit of $105. They have now seen the allowable range in action. For small changes in an objective coefficient, the solution does not change. However, if the coefficient changes enough, the solution does change. © The McGraw-Hill Companies, Inc., 2003
29
Graphical Solution (Original Problem)
Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0. © The McGraw-Hill Companies, Inc., 2003
30
7 Large Bricks Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 7 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0. If one more large brick is available, this moves the large- brick constraint-boundary line out. This, in turn, increases the size of the feasible region. The optimal solution is still at the same corner (at the corner of the small brick and large brick constraint boundary lines), but this corner has moved from (2,2) to (3,1). The profit increases by $5. At this point, you may want to introduce the idea of the “shadow price”. © The McGraw-Hill Companies, Inc., 2003
31
9 Large Bricks Maximize Profit = ($20)T + ($15)C subject to 2T + C ≤ 9 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0. If two additional large bricks are available, this moves the large- brick constraint-boundary line further out, so it is now beyond the small-brick constraint (intersecting the T-axis at 4.5). This, in turn, increases the size of the feasible region. The optimal solution moves out with the large brick constraint until the large brick constraint moves past the small-brick constraint. At this point, the optimal solution is “stuck” at (4,0). The main point here is that the objective function increases by $5 for each increase in the right-hand-side of the large-brick constraint, but only up to a point (an increase of 2). Beyond that, the shadow price changes from $5 to $0. At this point, you may want to introduce the idea of the “allowable range”. © The McGraw-Hill Companies, Inc., 2003
32
$25 Profit per Table Maximize Profit = ($25)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0. If the profit per table changes to $25, this changes the slope of the objective function line (it is now flatter). However, the same corner point is still optimal, so the solution does not change. The main point here is that for small changes in the objective function coefficients, the optimal solution remains the same. The solution will only change once the slope changes enough so that a new corner point is optimal. (See next slide.) © The McGraw-Hill Companies, Inc., 2003
33
$35 Profit per Table Maximize Profit = ($35)T + ($15)C subject to 2T + C ≤ 6 large bricks 2T + 2C ≤ 8 small bricks and T ≥ 0, C ≥ 0. If the profit per table changes to $35, this changes the slope of the objective function line (it is now significantly flatter). Now a new corner point (3 tables and 0 chairs) is optimal. The main point here is that for small changes in an objective function coefficient, the optimal solution remains the same. However, once the objective function coefficient changes enough, a new corner point will be optimal. At this point, you may want to introduce the idea of the “allowable range”. © The McGraw-Hill Companies, Inc., 2003
34
Generating the Sensitivity Report
After solving with Solver, choose “Sensitivity” under reports: © The McGraw-Hill Companies, Inc., 2003
35
The Sensitivity Report
© The McGraw-Hill Companies, Inc., 2003
36
The Sensitivity Report
Allowable range (Solution stays the same) The solution Usage of the resource (Left-hand-side of constraint) Allowable range (Shadow price is valid) Increase in objective function value per unit increase in right-hand-side (RHS) ∆Z = (shadow price)(∆RHS) © The McGraw-Hill Companies, Inc., 2003
37
$35 Profit per Table Some interesting things to point out on this sensitivity report: There’s slack in the small bricks constraint (6 used, 8 available), and the shadow price = 0. Point out that slack > 0 always implies shadow price = 0. (If you’ve got extra anyway, more will be of no value.) The shadow price is 17.5 for the large brick constraint. At this solution, there are 3 tables, 0 chairs, and 2 leftover small bricks. You might think that with one more large brick, you would combine it with the 2 leftover small bricks and make a chair (profit = $15). But why is the shadow price $17.50? It turns out to be better to take one small brick and one large brick and make half a table (profit = half of $35 = $17.50). The 1E+30 value appears in three locations. This is Excel’s representation for ∞. Explain the intuition of why each of these values is ∞. © The McGraw-Hill Companies, Inc., 2003
38
7 Large Bricks © The McGraw-Hill Companies, Inc., 2003
39
9 Large Bricks © The McGraw-Hill Companies, Inc., 2003
40
100% Rule for Simultaneous Changes in the Objective Coefficients
For simultaneous changes in the objective coefficients, if the sum of the percentage changes does not exceed 100%, the original solution will still be optimal. (If it does exceed 100%, we cannot be sure—it may or may not change.) Profit/Table = $24 (increase of 4), Profit/Chair = 13 (decrease of 2) (40% of allowable increase) + (40% of allowable decrease)= 80% ≤ 100% Solution stays the same. Profit/Table = $25 (increase of 5), Profit/Chair = $12 (decrease of 3) (50% of allowable increase) + (60% of allowable decrease) = 110% > 100% Solution may or may not change. It turns out it does in this case (to 3 tables and 0 chairs, profit = $75) Profit/Table = $28 (increase of 8), Profit/Chair = $18 (increase of 3) (80% of allowable increase) + (60% of allowable increase) = 140% > 100% Solution may or may not change. It turns out in this case it does not (2 tables, 2 chairs, profit = $92) Examples: (Does solution stay the same?) Profit per Table = $24 & Profit per Chair = $13 Profit per Table = $25 & Profit per Chair = $12 Profit per Table = $28 & Profit per Chair = $18 © The McGraw-Hill Companies, Inc., 2003
41
100% Rule for Simultaneous Changes in the Right-Hand-Sides
For simultaneous changes in the right-hand-sides, if the sum of the percentage changes does not exceed 100%, the shadow prices will still be valid. (If it does exceed 100%, we cannot be sure—they may or may not be valid.) (+1 large brick) & (+2 small bricks) (50% of allowable increase) + (50% of allowable increase) = 100% ≤ 100% shadow prices valid ∆Z = (5)(+1) + (5)(+2) = +$15 (one more chair) (+1 large brick) & (–1 small brick) (50% of allowable increase) + (50% of allowable decrease) = 100% ≤ 100% ∆Z = (5)(+1) + (5)(–1) = $0 New solution = 3.5 tables, 0 chairs, profit = $70 Examples: (Are the shadow prices valid? If so, what’s the new total profit?) (+1 Large Brick) & (+2 Small Bricks) (+1 Large Brick) & (–1 Small Brick) © The McGraw-Hill Companies, Inc., 2003
42
Summary of Sensitivity Report for Changes in the Objective Function Coefficients
Final Value The value of the decision variables (changing cells) in the optimal solution. Reduced Cost Increase in the objective function value per unit increase in the value of a zero-valued variable (for small increases)—may be interpreted as the shadow price for the nonnegativity constraint. Objective Coefficient The current value of the objective coefficient. Allowable Increase/Decrease Defines the range of the coefficients in the objective function for which the current solution (value of the decision variables or changing cells in the optimal solution) will not change. © The McGraw-Hill Companies, Inc., 2003
43
Summary of Sensitivity Report for Changes in the Right-Hand-Sides
Final Value The usage of the resource (or level of benefit achieved) in the optimal solution—the left-hand side of the constraint. Shadow Price The change in the value of the objective function per unit increase in the right-hand-side of the constraint (RHS): ∆Z = (Shadow Price)(∆RHS) (Note: only valid if change is within the allowable range—see below.) Constraint R.H. Side The current value of the right-hand-side of the constraint. Allowable Increase/Decrease Defines the range of values for the RHS for which the shadow price is valid and hence for which the new objective function value can be calculated. (NOT the range for which the current solution will not change.) © The McGraw-Hill Companies, Inc., 2003
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.