Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Decision Models and Analytics

05 Sensitivity Analysis

Professor Jiawei Zhang

1
Agenda
Wyndor Glass Co. Revisited
Perturbing input parameters: Solver Sensitivity Report
Shadow prices: Economic interpretation
Range of validity of shadow prices
Simultaneous perturbation of multiple parameters: The 100% Rule
Reduced costs
Effect of perturbing the coefficients of the objective function

Reading from Optimization Modeling


– Chapter 4

Templates: Your completed model for the Wyndor Glass Company problem.
2
Recap: Wyndor Glass Company
The Wyndor Glass Company produces high-quality glass products,
including windows and glass doors that feature handcrafting and the finest
workmanship.

Although the products are expensive, they fill a market niche by providing
the highest quality available in the industry for the most discriminating
buyer.

The company has three plants

– Plant 1 produces aluminum frames and hardware.


– Plant 2 produces wood frames
– Plant 3 produces produces the glass and assembles the windows
and doors.

Adapted from Frederick S. Hillier and Mark S. Hillier, Introduction to Management Science: A Modeling
and Case Studies Approach with Spreadsheets, 5/e, p 23-25.
3
Recap: Wyndor Glass Company
Because of declining sales for certain products, top management has
decided to revamp the company’s product line.

Unprofitable products are being discontinued, releasing production


capacity to launch two new products that have been recently developed:

• An 8-foot glass door with aluminum framing.


• A 4-foot × 6-foot double-hung, wood-framed window.

4
Recap: Wyndor Glass Company
It is estimated that each door will require one hour of production time in
Plant 1 and three hours in Plant 3.

For each window, about two hours will be needed in Plant 2 and two hours
in Plant 3.

The production facilities in Plant 1 needed for the 8-foot glass doors will
be available approximately 40 hours per week. (The rest of the time Plant 1
will continue with current products.)

The production facilities in Plant 2 will be available for the 4-foot × 6-


foot double-hung windows about 90 hours per week.

The facilities needed for both products in Plant 3 will be available


approximately 180 hours per week.

5
Recap: Wyndor Glass Company

By analyzing the cost data and pricing decision, the Accounting


Department estimates the profit from the products. The projection is that
the profit per unit will be $300 for the doors and $500 for the windows.

With the limited production capacity, management now needs to decide


what should be the product mix—the number of units of each produced
per week—for the two new products.

6
Recap: Mathematical Formulation

90
180

7
Recap: An Optimal Solution 8

The best product-mix is to produce 30 doors and 45 windows!

Capacities at plants 2 and 3 are 100% utilized.

The profit will be $31500.

8
Generating Answer Report
Answer Report

OFV: 300×30+500×45

What if we increase the hours available at the three plants?

10
Wyndor Co.: Effect of Changing the RHS
• Let’s make one-at-a-time changes to the available hours and make three
more Solver runs (one for each change).

• Effect of marginal changes in the time availabilities at the plants


‒ Plant 1: 31,500 – 31,500 = 0
‒ Plant 2: 31,650 – 31,500 = 150
‒ Plant 3: 31,600 – 31,500 = 100

• Solver makes these calculations without needing to resolve the model!

11
Generating Sensitivity Report

12
Sensitivity Report

13
Sensitivity Report: Constraint Status

• Constraint R.H. Side refers to the original constant in the RHS of the
constraint.
• Final Value refers to the total value of the LHS when the variables take the
optimal values.
• Note: To have a clean interpretation of the Sensitivity Report, it is critical
to have only constants in the RHS and all the variables in the LHS.

14
Sensitivity Report: Shadow Prices
Changing the level of a resource
Shadow prices: They reflect the marginal instantaneous increment
(decrement) in the objective value Z if the corresponding resource is
marginally increased (decreased).

15
Shadow Price
Let’s make a change by more than one unit (30 units) for Plant 2.

First run: $36,000 = $31,500 + $150*30


Second run: $40,500 = $31,500 + $150*60
Third run: $45,000 = $31,500 + $150*90
Fourth run: $45,000 < $31,500 + $150*120 =$49,500

What’s wrong?

16
Allowable Increase and Decrease
The shadow price is valid only
– for its allowable increase and allowable decrease, AND
– for changing only one constraint at a time

The allowable increase on a constraint RHS is the maximum amount the


RHS can increase without the shadow price changing.

The allowable decrease on a constraint RHS is the maximum amount the


RHS can decrease without the shadow price changing.

17
Sensitivity Report: Changing a Resource Level
Changing the level of a resource: Binding constraint

Interpretation: By how much we could perturb the RHS without changing


the set of binding constraints that define the optimal solution

Example: For Plant 2 Time RHS, the reference value is 90. From here,
• Increase: RHS could be increased up to 90+90=180.
• Decrease: RHS could be decreased down to 90−30=60.

18
Sensitivity Report: Changing a Resource Level
Changing the level of a resource: Non-binding constraint

Interpretation for the range: By how much we could perturb the RHS
without changing the optimal corner point

Example: For Plant 1 Time RHS, the reference value is 40. From here,
• Increase: RHS could be increased up to 40+∞=∞
• Decrease: : RHS could be decreased down to 40−10=30

19
A Note about Shadow Prices
• The shadow price anticipates the effect of changing the RHS of a
constraint in the OFV but not in the decision variables.
– For instance, increasing the RHS of Plant 2 from 90 to 180 will imply
an increase in the OFV of 90×150=13,500, from 31,500 to 45,000
– In order to get the new optimal solution, we need to resolve

20
Shadow Prices: Decreasing Marginal Returns
• Scarce resource (i.e., constraint is binding): below the “Allowable
Decrease”, the resource is more valuable than the original shadow price
– In Wyndor, Plant 2 Time is binding. Reducing the RHS below 90-
30=60 will increase (in fact, non decrease) the corresponding shadow
price. For instance, when RHS=59, the sensitivity report gives:

Increases from 150

• Analogously, for a scarce resource, when the availability goes above the
“Allowable Increase”, the resource is less valuable than the original
shadow price

21
Simultaneous Changes in the RHS
• When using the shadow price in calculations we assume that only one
constraint RHS is changed.
• If we change two or more constraint RHS then we must use the
“100% rule”.
• The shadow prices are valid (i.e., tell the actual OFV change) as long as
the percentage increase/decrease used up does not exceed 100% of the
allowable ranges.

Predicted new profit:


$31,500 + $150×30 + $100×10 = $37,000
Actual new profit: $37,000

22
Simultaneous Changes in the RHS
• When we simultaneously increase & decrease the RHS of several
constraints, the total cumulative change (in absolute terms) has to
be calculated.
- The 100% rule applies on this grand total

Predicted new profit:


$31,500 + $150×30 − $100×20 = $34,000
Actual new profit: $34,000

23
Simultaneous Changes in the RHS
• 100% Rule: The shadow prices are valid (i.e., tell the actual
change) as long as the percentage increase/decrease used up does
not exceed 100%.
• Question: What if we go beyond 100%?

Predicted new profit:


$31,500 + $150×60 − $100×40 = $36,500
Actual new profit: $35,000

Here, the predicted new profit is incorrect!

• When the 100% rule does not hold, we cannot anticipate with certainty the
impact of the changes (i.e., shadow prices may or may not be valid). We need
to resolve!
24
Other Uses of Shadow Prices
Suppose that Wyndor Glass Co. evaluates adding a new Product #3 to its
mix:

– Required time per batch:


• one hour in Plant 2, and
• two hours in Plant 3
– Profit per unit: $250

Would it be profitable to produce it?

25
Other Uses of Shadow Prices
New model setup:

Max Z = 300 x1 + 500 x2 + 250 x3


Subject to:
1 x1  40
2 x2 + 1 x3  90
3 x1 + 2 x2 + 2 x3  180
x1, x2, x3  0.

26
Other Uses of Shadow Prices
• The production of each unit of Product 3 would imply the
consumption of some of the resources devoted to the other
products:
– The consumption of 1 hour at Plant 2 would reduce profits by $150
– The consumption of 2 hours at Plant 3 would reduce profits by
2×$100=$200
• In total, the profit would be reduced by $350.

• This reduction would be partially offset by the $250 increase in


profit from the production of #3.

• So, per unit net profit is 250 − 350 = -100


• This is the Reduced Cost of the decision variable. representing
Product #3. 27
Sensitivity Report: Reduced Costs
Reduced costs: Per-unit amount the product contributes to profits minus per-
unit value of the resources it consumes.

Max Z = 300 x1 + 500 x2 + 250 x3


Subject to: Other reduced costs:
1 x1  40 • Product #1: 300 - 1×0 - 3×100=0
• Product #2: 500 - 2×150 -2×100=0
2 x2 + 1 x3  90
3 x1 + 2 x2 + 2 x3  180
x1, x2, x3  0.

28
Sensitivity Report: Reduced Costs

29
Reduced Cost: Interpretations
One common way to interpret a reduced cost:

– When there are bound(s) on the variables, and the bounds are
binding at optimality, the reduced cost of a variable is the shadow
price on the binding bound constraint of that variable.

30
Reduced Cost: Bounds on the Dec. Vbles.
• New Constraint: Assume that we require that no more than 15 doors and 45
windows can be sold in a week.

31
Reduced Cost: Bounds on the Dec. Vbles.
• New Constraint: Assume that we require that no more than 15 doors and 45
windows can be sold in a week.

When there are bounds on the variables, the reduced cost is the shadow
price on the binding bound constraints.

32
“Anomalies” in the Sensitivity Report
Degeneracy

The solution to an LP is degenerate if the RHS values of any of the


constraints have an allowable increase or decrease of zero.

The presence of degeneracy impacts the interpretation of the Sensitivity


Report in a couple of ways:

1. The shadow prices and their ranges may still be interpreted in the usual
way, but they may not be unique.
A different set of shadow prices and ranges may also apply to the problem
(even if the optimal solution is unique)

2. The reduced cost of the variables may not be unique.

33
Degenerate Solution: Example
Max Z = 300 x1 + 500 x2
Subject to:
1 x1  40
2 x2  90
3 x1 + 2 x2  180
3 x1 + 3 x2  225 New constraint
x1, x2  0.

Note: Constraint is
binding, but shadow price
is zero

34
Objective Coefficient Sensitivity
• Solver provides useful economic information about objective
coefficients.

• Without resolving the LP we can answer questions such as:


– If the profit margin on windows went up by one dollar what would
the new optimal production quantities and profit be?
– If we could increase the profit margin of one of the products by one
dollar which product should we choose?
– How much would the profit margin of windows have to increase in
order for it to be optimal to produce more windows?

• The Solver sensitivity report provides the answers!

35
Sensitivity Report: Objective Function
Changing the coefficients in the objective function

• By how much we could perturb the coefficients of the objective function


(one-at-a-time) without changing the optimal solution
For instance, the coefficient that goes with x1 could be increased from 300 up to
300+450=750, or decreased from 300 to 300−300=0, without changing the
optimal solution
36
Sensitivity Report: Objective Function
Changing coefficients simultaneously in the objective function

The 100% rule still applies!

Predicted new profit:


$31,500 + $200×30 + $300×45 = $51,000

Actual new profit: $51,000


37
“Anomalies” in the Sensitivity Report
Alternate Optimal Solutions

Max Z = 300 x1 + 200 x2


Subject to:
1 x1  40 Z* = 300×40 + 200×30 =18,000
2 x2  90
3 x1 + 2 x2  180
x1, x2  0.

38
“Anomalies” in the Sensitivity Report
Alternate Optimal Solutions
When the allowable increase or decrease of the objective function coefficient
for one or more variables is zero and the solution is non-degenerate, there exists
an alternate optimal solution.

Allowable increase = 0

Non-degenerate

39
Alternate Solutions: How to Find Them?
Procedure

1. Add a constraint to the model that holds the objective function at the
current optimal value.

Max Z = x2
Subject to:
1 x1  40
2 x2  90
3 x1 + 2 x2  180
300 x1 + 200 x2 = 18000 New constraint
x1, x2  0.

40
Alternate Solutions: How to Find Them?

Procedure

2. Change the objective function to maximize or minimize the value of one


of the decision variables that had an objective function coefficient with an
allowable increase or decrease of zero.

New solution: x*= (30, 45)

Note: The approach involves some trial and error in step 2.

41
Summary
• The sensitivity analysis corresponds to the impact of perturbing some of the
input parameters of the model
‒ Focus is on the RHS of the constraints, and on the coefficients of the
objective function
‒ Considers one-at-a-time perturbations
‒ Extension with the “100% rule” for simultaneous changes

• Sensitivity Analysis provides useful information about


‒ Marginal value of a resource (i.e. Shadow Prices)
‒ Effects of a changing environment on decisions
‒ Reduced cost of a product capturing the potential profitability

• Anomalies
‒ Degeneracy & alternate optimal solutions

42
An (Artificial) Problem 43

• A department store asks Wyndor to produce windows and doors that


will be sold under the store’s brand name.

• Wyndor has only limited capacities in the three plants.

• Wyndor has to decide whether to produce its own windows/doors or


produce for the department store. How much to charge the store to
break-even?
– For each window that Wyndor sacrifices
• Wyndor loses $500
• But gains 2hrs at Plant 2, and 2 hrs at Plant 3
– For each door that Wyndor sacrifices
• Wyndor loses $300
• But gains 1hr at Plant 1, and 3 hrs at Plant 3
Linear Programming Formulation 44

Let y1 >=0 be the value of one production hr at Plant 1

y2 >=0 be the value of one production hr at Plant 2

y3 >=0 be the value of one production hr at Plant 3

– Wyndor can use the resources to produce window


• 2 * y2 + 2 * y3 >= $500
– Wyndor can use the resource to produce door
• 1 * y1 + 3 * y3 >= $300
– But the store does not want to pay too much
minimize 40 * y1 + 90* y2 + 180 * y3
s.t. 1 * y1 + 0 * y2 + 3 * y3 >= 300
0 * y1 + 2 * y2 + 2 * y3 >= 500
y1 >= 0, y2 >= 0, y3 >= 0
Primal and Dual Standard Formulation 45

You might also like