You are on page 1of 31

Chapter 5

What If Analysis for Linear Programming

Irwin/McGraw-Hill 5.1 © The McGraw-Hill Companies, Inc., 2003


Let’s think first

• What-if analysis addressing questions WHAT would happen to the optimal


solution IF different assumptions were made about future conditions

• In real applications, many of the numbers in the model may be only rough
estimates.

• What happens to the optimal solution if an error is made in estimating a


parameter of the model?

• What happens to the optimal solution if conditions change in the future?

• What happens if managerial policy decisions change?

McGraw-Hill/Irwin 5.2 © The McGraw-Hill Companies, Inc., 2013


The Important of What-If Analysis

• Many of the parameters of a linear programming model are only estimates of quantities
(e.g., unit profits) that cannot be determined precisely at this time. What-if analysis
reveals how close each of these estimates needs to be to avoid obtaining an erroneous
optimal solution, and therefore pinpoints the sensitive parameters that need extra
care because even small changes in their values can change the optimal solution

• If conditions change after the study has been completed (a common occurrence), what-if
analysis leaves signposts that indicate (without solving the model again) whether a
resulting change in a parameter of the model changes the optimal solution.

• When certain parameters of the model represent managerial policy decisions, what-if
analysis provides valuable guidance to management regarding the impact of altering
these policy decisions

• What-if analysis sometimes goes even further in providing helpful guidance to


management, such as when analyzing alternate scenarios for how business conditions
might evolve.

McGraw-Hill/Irwin 5.3 © The McGraw-Hill Companies, Inc., 2013


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.10
Simultaneous Changes in Objective Function Coefficients (Section 5.4) 5.11–5.18
Single Changes in a Constraint (Section 5.5) 5.19–5.24
Simultaneous Changes in the Constraints (Section 5.6) 5.25–5.28

McGraw-Hill/Irwin 5.4 © The McGraw-Hill Companies, Inc., 2013


Wyndor (Before What-If Analysis)

McGraw-Hill/Irwin 5.5 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

The profit per door has been revised from $300 to $200.
No change occurs in the optimal solution.

McGraw-Hill/Irwin 5.6 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

The profit per door has been revised from $300 to $500.
No change occurs in the optimal solution.

McGraw-Hill/Irwin 5.7 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

The profit per door has been revised from $300 to $1,000.
The optimal solution changes.

McGraw-Hill/Irwin 5.8 © The McGraw-Hill Companies, Inc., 2013


Setting up a Parameter Analysis Report

Select D4 and choose Optimization under the Parameters menu.

McGraw-Hill/Irwin 5.9 © The McGraw-Hill Companies, Inc., 2013


Setting up a Parameter Analysis Report

Under the Reports menu on the


RSPE ribbon, choose
Optimization>Parameter Analysis.

Specify which parameters to vary


and which results to show.

McGraw-Hill/Irwin 5.10 © The McGraw-Hill Companies, Inc., 2013


The Parameter Analysis Report

McGraw-Hill/Irwin 5.11 © The McGraw-Hill Companies, Inc., 2013


Using the Sensitivity Report to Find the Allowable Range

Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$12 Units Produced Doors 2 0 300 450 300
$D$12 Units Produced Windows 6 0 500 1E+30 300

McGraw-Hill/Irwin 5.12 © The McGraw-Hill Companies, Inc., 2013


Graphical Insight into the Allowable Range

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.
McGraw-Hill/Irwin 5.13 © The McGraw-Hill Companies, Inc., 2013
Using the Spreadsheet to do Sensitivity Analysis

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.

McGraw-Hill/Irwin 5.14 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

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.

McGraw-Hill/Irwin 5.15 © The McGraw-Hill Companies, Inc., 2013


Setting up a Two-Way Parameter Analysis Report

Select C4 and choose Optimization under the Parameters menu.


(Unit Profit per Door to be varied from $300 to $600)

Select D4 and choose Optimization under the Parameters menu.


(Unit Profit per Window to be varied from $100 to $500)

McGraw-Hill/Irwin 5.16 © The McGraw-Hill Companies, Inc., 2013


Setting up a Two-Way Parameter Analysis Report

McGraw-Hill/Irwin 5.17 © The McGraw-Hill Companies, Inc., 2013


Two-Way Parameter Analysis Reports
Total Profit:

Doors Produced: Windows Produced:

McGraw-Hill/Irwin 5.18 © The McGraw-Hill Companies, Inc., 2013


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.)

McGraw-Hill/Irwin 5.19 © The McGraw-Hill Companies, Inc., 2013


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.

McGraw-Hill/Irwin 5.20 © The McGraw-Hill Companies, Inc., 2013


Graphical Insight into 100 Percent Rule

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.
McGraw-Hill/Irwin 5.21 © The McGraw-Hill Companies, Inc., 2013
Using the Spreadsheet to do Sensitivity Analysis

The hours available in plant 2 have been increased from 12 to 13.


The total profit increases by $150 per week.

McGraw-Hill/Irwin 5.22 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

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).

McGraw-Hill/Irwin 5.23 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

The hours available in plant 2 have been further increased from 18 to 20.
The total profit does not increase any further.

McGraw-Hill/Irwin 5.24 © The McGraw-Hill Companies, Inc., 2013


Parameter Analysis Report for Hours Available in Plant 2

McGraw-Hill/Irwin 5.25 © The McGraw-Hill Companies, Inc., 2013


Using the Sensitivity Report

Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$12 Units Produced Doors 2 0 300 450 300
$D$12 Units Produced Windows 6 0 500 1E+30 300

Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$E$7 Plant 1 Used 2 0 4 1E+30 2
$E$8 Plant 2 Used 12 150 12 6 6
$E$9 Plant 3 Used 18 100 18 6 6

McGraw-Hill/Irwin 5.26 © The McGraw-Hill Companies, Inc., 2013


Graphical Interpretation of the Allowable Range

McGraw-Hill/Irwin 5.27 © The McGraw-Hill Companies, Inc., 2013


Using the Spreadsheet to do Sensitivity Analysis

One available hour in plant 3 has been shifted to plant 2.


The total profit increases by $50 per week.

McGraw-Hill/Irwin 5.28 © The McGraw-Hill Companies, Inc., 2013


Spreadsheet to Generate a Parameter Analysis Report

By inserting a formula into cell G8 that keeps the total number of hours
available in plant 2 and 3 equal to 30, it will be possible to generate a
one-way parameter analysis report that shows the effect of shifting
more and more of the hours from plant 3 to plant 2.

McGraw-Hill/Irwin 5.29 © The McGraw-Hill Companies, Inc., 2013


Parameter Analysis Report

This parameter analysis report shows the effect of shifting more and more of
the hours available from plant 3 to plant 2 for the Wyndor problem.

McGraw-Hill/Irwin 5.30 © The McGraw-Hill Companies, Inc., 2013


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.)

McGraw-Hill/Irwin 5.31 © The McGraw-Hill Companies, Inc., 2013

You might also like