Title: Chapter 5' Sensitivity Analysis
1Chapter 5. Sensitivity Analysis
- presented as FAQs
- Points illustrated on a running example of glass
manufacturing. - Also the financial example from a previous
lecture
2Glass Example
- x1 of cases of 6-oz juice glasses (in 100s)
- x2 of cases of 10-oz cocktail glasses (in
100s) - x3 of cases of champagne glasses (in 100s)
- max 5 x1 4.5 x2 6 x3 (100s)
- s.t 6 x1 5 x2 8 x3 ? 60
(prod. cap. in hrs) - 10 x1 20 x2 10 x3 ? 150
(wareh. cap. in ft2) - x1 ?
8 (6-0z. glass dem.) - x1 ? 0, x2 ? 0, x3 ? 0
3FAQ. Could you please remind me what a shadow
price is?
- Let us assume that we are maximizing. A shadow
price is the improvement in the optimum objective
value per unit increase in a RHS coefficient, all
other data remaining equal. - The shadow price is valid in an interval.
4IMPORTANT
- To make your life easier, this is changed to the
books definition on p. 237. - The shadow price is the improvement in the
optimal objective value per unit increase in the
RHS. - The shadow price for a ? 0 constraint (i.e., a
sign condition) is called the reduced cost.
5FAQ. Of course, I knew that. But can you please
provide an example.
- Certainly. Let us consider the glass example.
Lets look at the objective function if we change
the production time from 60 and keep all other
values the same.
The shadow Price is 11/14.
6More changes in the RHS
The shadow Price is 11/14 until production 65.5
7FAQ. What is the intuition for the shadow price
staying constant, and then changing?
- Recall from the simplex method that the simplex
method produces a basic feasible solution. The
basis can often be described easily in terms of a
brief verbal description.
Glass Example
8The verbal description for the optimum basis for
the glass problem
- Produce Juice Glasses and cocktail glasses only
- Fully utilize production and warehouse capacity
- z 5 x1 4.5 x2
- 6 x1 5 x2 60
- 10 x1 20 x2 150
x1 6 3/7 x2 4 2/7 z 51 3/7
9LINDO INPUT FILE FOR 60 HOURS
- max 5 x1 4.5 x2 6 x3
- !(100s)
- s.t
- pr_capa) 6 x1 5 x2 8 x3 lt 60
- !(prod. cap. in hrs)
- wh_capa) 10 x1 20 x2 10 x3 lt 150
- !(wareh. cap. in ft2)
- oz6_dem) x1 lt 8
- !(6-0z. glass dem.)
- !all var nonnegative
- end
10LINDO OUTPUT FOR 60 HOURS
- LP OPTIMUM FOUND AT STEP 3
- OBJECTIVE FUNCTION VALUE
- 1) 51.428570
- VARIABLE VALUE REDUCED COST
- X1 6.428571 .000000
- X2 4.285714 .000000
- X3 .000000 .571428
- ROW SLACK OR SURPLUS DUAL PRICES
- PR_CAPA) .000000 .785714
- WH_CAPA) .000000 .028571
- OZ6_DEM) 1.571429 .000000
- NO. ITERATIONS 3
11FINAL TABLEAU FOR 60 HOURS
- THE TABLEAU
- ROW (BASIS) X1 X2
X3 SLK2 SLK3 - 1 ART .000 .000
.571 .786 .029 - PR_CAPA X1 1.000 .000
1.571 .286 -.071 - WH_CAPA X2 .000 1.000
-.286 -.143 .086 - OZ6_DEM SLK4 .000 .000 -1.571
-.286 .071 -
-
- ROW SLK4 RHS
- 1 .000 51.42951 3/7
- PR_CAPA .000 6.429 6 3/7
- WH_CAPA .000 4.286 4 2/7
- OZ6_DEM 1.000 1.571 1 4/7
-
12The verbal description for the optimum basis for
the glass problem
- Produce Juice Glasses and cocktail glasses only
- Fully utilize production and warehouse capacity
- z 5 x1 4.5x2
- 6 x1 5 x2 60 D
- 10 x1 20 x2 150
For D 5.5, x1 8, and the constraint x1 ? 8
is binding.
x1 6 3/7 2D/7 x2 4 2/7 D/7 z 51 3/7
11/14 D
13FAQ. How can shadow prices be used for managerial
interpretations?
- Let me illustrate with the previous example.
- How much should you be willing to pay for an
extra hour of production?
Glass Example
14FAQ. Does the shadow price always have an
economic interpretation?
- The answer is no, unless one wants to really
stretch what is meant by an economic
interpretation. - Consider ratio constraints
15Apartment Development
- x1 number of 1-bedroom apartments built
- x2 number of 2-bedroom apartments built
- x3 number of 3-bedroom apartments build
- x1/(x1 x2 x3) ? .5 ? x1 ? .5x1 .5x2
.5x3 - ? .5x1 .5x2 - .5x3 ? 0
-
- The shadow price is the impact of increasing the
0 to a 1. - This has no obvious managerial interpretation.
16FAQ. Right now, Im new to this. But as I gain
experience will interpretations of the shadow
prices always be obvious?
- No.
- But they should become straightforward for
examples given in this class.
17FAQ. What are the interpretations for the shadow
prices for the other two constraints in the glass
problem?
- You can probably answer this one yourself.
- How much would you be willing to pay for
additional storage capacity? - How much would you be willing to pay in order to
increase the demand for 6-oz Juice Glasses?
Glass Example
18FAQ. In the book, they sometimes use dual
price and we use shadow price. Is there any
difference?
19FAQ. Excel gives a report known as the
Sensitivity report. Does this provide shadow
prices?
- Yes, plus lots more.
- In particular, it gives the range for which the
shadow price is valid.
Glass Example
20RANGES FOR 60 HOURS
- RANGES IN WHICH THE BASIS IS UNCHANGED
-
- OBJ COEFFICIENT RANGES
- VARIABLE CURRENT ALLOWABLE
ALLOWABLE - COEF INCREASE
DECREASE - X1 5.000000 .400000
.363636 - X2 4.500000 1.999999
.333333 - X3 6.000000 .571428
INFINITY -
- RIGHTHAND SIDE RANGES
- ROW CURRENT ALLOWABLE
ALLOWABLE - RHS
INCREASE DECREASE - PR_CAPA 60.000000 5.500000
22.500000 - WH_CAPA 150.000000 89.999990
22.000000 - OZ6_DEM 8.000000 INFINITY
1.571429
21FAQ. I have heard that Excel occasionally gives
incorrect shadow prices. Is this true?
- There is the possibility that the interval in
which the shadow price is valid is empty. - Excel can also give incorrect Shadow prices under
certain circumstances that will not occur in
spreadsheets for this class.
22FAQ. You have told me that Excel sometimes makes
mistakes. Also, I can do sensitivity analysis by
solving an LP a large number of times, with
varying data. So, what good is the Sensitivity
Report?
- For large problems it is much more efficient, and
for LP models used in practice, it will be
accurate. - For large problems it can be used to identify
opportunities. - It can identify which coefficients are most
sensitive to changes in value (their accuracy is
the most important).
23FAQ. How do we interpret the intervals?
- If we change one coefficient in the RHS, say
production capacity, by D the basis remains
optimal, that is, the same equations remain
binding. - So long as the basis remains optimal, the shadow
prices are unchanged. - The basic feasible solution varies linearly with
D. If D is big enough or small enough the basis
will change.
24Shadow price of production capacity as production
capacity varies
11/14
25FAQ. Would you please summarize what we have
learned so far.
- Of course. Here it is.
- The shadow price is the unit increase in the
optimal objective value per unit increase in the
RHS. - Shadow prices usually but not always have
economic interpretations that are managerially
useful. - Shadow prices are valid in an interval, which is
provided by the Lindo Sensitivity Report. - Excel provides correct shadow prices for our LPs
but can be incorrect in other situations.
26Overview of what is to come
- Using insight from managerial situations to
obtain properties of shadow prices - reduced costs and pricing out
27FAQ. The shadow prices for an equality
constraints can be anything, but the shadow price
for a ? constraint is nonnegative. Why?
- Let us illustrate with an example
- Maximize revenue
- Subject to 6x1 5x2 8x3 ? 60
- x1 ? 5
- and additional constraints
- Will the max revenue go up if
- the RHS is increased from 60?
- the RHS is increased from 5?
28Illustration with the glass example
- max 5 x1 4.5 x2 6 x3 (100s)
- s.t 6 x1 5 x2 8 x3 ? 60
(prod. cap. in hrs) - 10 x1 20 x2 10 x3 ? 150
(wareh. cap. in ft2) - x1 ?
8 (6-0z. glass dem.) - x1 ? 0, x2 ? 0, x3 ? 0
The shadow price is the improvement in the
optimal value per unit increase in the RHS.
If an increase in RHS coefficient leads to an
increase in optimal objective value, then the
shadow price is positive.
If an increase in RHS coefficient leads to a
decrease in optimal objective value, then the
shadow price is negative.
29Illustration with the glass example
- max 5 x1 4.5 x2 6 x3 (100s)
- s.t 6 x1 5 x2 8 x3 ? 60
(prod. cap. in hrs) - 10 x1 20 x2 10 x3 ? 150
(wareh. cap. in ft2) - x1 ?
8 (6-0z. glass dem.) - x1 ? 0, x2 ? 0, x3 ? 0
Claim the shadow price of the production
capacity constraint cannot be negative.
Reason any feasible solution for this problem
remains feasible after the production capacity
increases. So, the increase in production
capacity cannot cause the optimum objective value
to go down.
30Illustration with the glass example
- max 5 x1 4.5 x2 6 x3 (100s)
- s.t 6 x1 5 x2 8 x3 ? 60
(prod. cap. in hrs) - 10 x1 20 x2 10 x3 ? 150
(wareh. cap. in ft2) - x1 ?
8 (6-0z. glass dem.) - x1 ? 0, x2 ? 0, x3 ? 0
Claim the shadow price of the x1 ? 0
constraint cannot be positive.
Reason Let x be the solution if we replace the
constraint x1 ? 0 with the constraint x1 ?
1. Then x is feasible for the original
problem, and thus the original problem has at
least as high an objective value.
31Signs of Shadow Prices for maximization problems
- ? constraint . The shadow price is
non-negative. - ? constraint . The shadow price is
non-positive. - constraint. The shadow price could be
zero or positive or negative.
32Signs of Shadow Prices for minimization problems
- The shadow price for a minimization problem is
the improvement in the objective function per
unit increase in the RHS. - ? constraint . The shadow price is ?
- ? constraint . The shadow price is ?
- constraint. The shadow price could be
zero or positive or negative. - Please answer with your partner.
33The shadow price of a non-binding constraint is
0. This is known as Complementary Slackness.
- max 5 x1 4.5 x2 6 x3 (100s)
- s.t 6 x1 5 x2 8 x3 ? 60
(prod. cap. in hrs) - 10 x1 20 x2 10 x3 ? 150
(wareh. cap. in ft2) - x1 ?
8 (6-0z. glass dem.) - x1 ? 0, x2 ? 0, x3 ? 0
In the optimum solution, x1 6 3/7.
Claim The shadow price for the constraint x1 ?
8 is zero.
Intuitive Reason If your optimum solution has
x1 lt 8, one does not get a better solution by
permitting x1 gt 8.
34FAQ. Is the shadow price the increase in the
optimal objective value if the RHS increases by 1
unit?
- That is an excellent rule of thumb! It is true
so long as the shadow price is valid in an
interval that includes an increase of 1 unit.
Glass Example
35RANGES FOR 60 HOURS
- RANGES IN WHICH THE BASIS IS UNCHANGED
-
- OBJ COEFFICIENT RANGES
- VARIABLE CURRENT ALLOWABLE
ALLOWABLE - COEF INCREASE
DECREASE - X1 5.000000 .400000
.363636 - X2 4.500000 1.999999
.333333 - X3 6.000000 .571428
INFINITY -
- RIGHTHAND SIDE RANGES
- ROW CURRENT ALLOWABLE
ALLOWABLE - RHS
INCREASE DECREASE - PR_CAPA 60.000000 5.500000
22.500000 - WH_CAPA 150.000000 89.999990
22.000000 - OZ6_DEM 8.000000 INFINITY
1.571429
36FAQ. The shadow price is valid if only one right
hand side changes. What if multiple right hand
side coefficients change?
- The shadow prices are valid if multiple RHS
coefficients change, but the ranges are no longer
valid.
Glass Example
37Multiple changes in the RHS
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 6 x3 (100s)
s.t 6 x1 5 x2 8 x3 ? 60 -
6 10 x1 20 x2 10 x3 ? 150 -10
1 x1 ?
8 - 1 x1 ? 0, x2 ? 0, x3 ? 0
- - 6 x 11/14
- - 10 x 1/35
- - 1 x 0
- 3 3/7 2/7 - 5
Effect on cost
In the basic feasible solution x1 decreases by 1
38WITH SIMULTANEOUS CHANGES
- LP OPTIMUM FOUND AT STEP 3
- OBJECTIVE FUNCTION VALUE
- 1) 46.428570 51.428570 - 5
- VARIABLE VALUE REDUCED COST
- X1 5.428571 .000000
- X2 4.285714 .000000
- X3 .000000
.571428 - ROW SLACK OR SURPLUS DUAL PRICES
- PR_CAPA) .000000 .785714
- WH_CAPA) .000000 .028571
- OZ6_DEM) 1.571429 .000000
- NO. ITERATIONS 3
39FAQ. Do the non-negativity constraints also have
shadow prices?
- Yes. They are very special and are called
reduced costs! - Look at the reduced costs for
- Juice glasses reduced cost 0
- Cocktail glasses reduced cost 0
- Champagne glasses red. cost -4/7
40FAQ. Does Excel provide information on the
reduced costs?
- Yes. They are also part of the sensitivity
report.
Glass Example
41LINDO OUTPUT FOR 60 HOURS
- LP OPTIMUM FOUND AT STEP 3
- OBJECTIVE FUNCTION VALUE
- 1) 51.428570
- VARIABLE VALUE REDUCED COST
- X1 6.428571
.000000 - X2 4.285714
.000000 - X3 .000000
.571428 4/7 - ROW SLACK OR SURPLUS
DUAL PRICES - PR_CAPA) .000000
.785714 - WH_CAPA) .000000
.028571 - OZ6_DEM) 1.571429
.000000 - NO. ITERATIONS 3
42FAQ. What is the managerial interpretation of a
reduced cost?
- There are two interpretations. Here is one of
them. -
- We are currently not producing champagne glasses.
How much would the profit of champagne glasses
need to go up for us to produce champagne glasses
in an optimum solution? - The reduced cost for champagne classes is -4/7.
If we increase the revenue for these glasses by
4/7 (from 6 to 6 4/7), then there will be an
alternative optimum in which champagne glasses
are produced.
43FAQ. Why are they called the reduced costs?
Nothing appears to be reduced
- That is a very astute question. The reduced
costs can be obtained by treating the shadow
prices are real costs. This operation is called
pricing out.
44Pricing Out
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 6 x3 (100s)
s.t 6 x1 5 x2 8 x3 ? 60
10 x1 20 x2 10 x3 ? 150 1
x1 ? 8
x1 ? 0, x2 ? 0, x3 ? 0
Pricing out treats shadow prices as though they
are real prices. The result is the reduced
costs.
45Pricing Out of x1
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 6 x3 (100s)
s.t 6 x1 5 x2 8 x3 ? 60
10 x1 20 x2 10 x3 ? 150 1
x1 ? 8
x1 ? 0, x2 ? 0, x3 ? 0
- 5
- - 6 x 11/14
- - 10 x 1/35
- - 1 x 0
- 5 33/7 2/7 0
Reduced cost of x1
46Pricing Out of x2
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 6 x3 (100s)
s.t 6 x1 5 x2 8 x3 ? 60
10 x1 20 x2 10 x3 ? 150 1
x1 ? 8
x1 ? 0, x2 ? 0, x3 ? 0
- 4.5
- - 5 x 11/14
- - 20 x 1/35
- - 0 x 0
- 4.5 55/14 4/7 0
Reduced cost of x2
47Pricing Out of x3
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 6 x3 (100s)
s.t 6 x1 5 x2 8 x3 ? 60
10 x1 20 x2 10 x3 ? 150 1
x1 ? 8
x1 ? 0, x2 ? 0, x3 ? 0
- 6
- - 8 x 11/14
- - 10 x 1/35
- - 0 x 0
- 6 44/7 2/7 -4/7
Reduced cost of x3
48FAQ. Can we use pricing out to figure out
whether a new type of glass should be produced?
- shadow price
-
- 11/14
- 1/35
- .0
max 5 x1 4.5 x2 7 x4 (100s)
s.t 6 x1 5 x2 8 x4 ? 60
10 x1 20 x2 20 x4 ? 150 1
x1 ? 8
x1 ? 0, x2 ? 0, x4 ? 0
- 7
- - 8 x 11/14
- - 20 x 1/35
- - 0 x 0
- 7 44/7 4/7 1/7
Reduced cost of x4
49Pricing Out of xj
max 5 x1 4.5 x2 cj xj (100s)
s.t 6 x1 5 x2 a1j xj ? 60
10 x1 20 x2 a2j xj ? 150
.. . amjxj bm
x1 ? 0, x2 ? 0, x3 ? 0
Reduced cost of xj ? Please complete with your
partner.
50Brief summary on reduced costs
- The reduced cost of a non-basic variable xj is
the increase in the objective value of
requiring that xj gt 1. - The reduced cost of a basic variable is 0.
- The reduced cost can be computed by treating
shadow prices as real prices. This operation is
known as pricing out. - Pricing out can determine if a new variable would
be of value (and would enter the basis).
51Would you please summarize what we have learned
this lecture?
52Summary
- The shadow price is the unit improvement in the
optimal objective value per unit increase in the
RHS. - The shadow price for a ? 0 constraint is called
the reduced cost. - Shadow prices usually but not always have
economic interpretations that are managerially
useful. - Non-binding constraints have a shadow price of
0. - The sign of a shadow price can often be
determined by using the economic interpretation - Shadow prices are valid in an interval, which is
provided by the LINDO Sensitivity Report. - Reduced costs can be determined by pricing out
53The Financial Problem from Lecture 2
- Sarah has 1.1 million to invest in five
different projects for her firm. - Goal maximize the amount of money that is
available at the beginning of 2005. - (Returns on investments are on the next slide).
- At most 500,000 in any investment
- Can invest in CDs, at 5 per year.
Financial Example
54Return on investments (undiscounted dollars)
55The LP formulation
.8 xB 1.5 xD 1.2 xE 1.05 xCD04
Max
-xA xC xD xCD02
-1.1
s.t.
.4 xA xB 1.2 xD 1.05 xCD02 xCD03
0
.8 xA .4 xB - xE 1.05 xCD03 xCD04
0
.8 xA .4 xB - xE 1.05 xCD03 xCD04
0
0 ? xj ? .5 for j A, B, C, D, E, CD02
CD03, and CD04
Financial Example
56FINANCIAL MODEL IN LINDO
- MAX 0.8 XB 1.5 XD 1.2 XE 1.05 XCD04
- SUBJECT TO
- 2) - XD - XA - XC - XCD02 - 1.1
- 3) - XB 1.2 XD 0.4 XA 1.05 XCD02 -
XCD03 0 - 4) 0.4 XB - XE - XCD04 0.8 XA 1.05
XCD03 0 - 5) 0.4 XB - XE - XCD04 0.8 XA 1.05
XCD03 0 - 6) XA lt 0.5
- 7) XB lt 0.5
- 8) XC lt 0.5
- 9) XD lt 0.5
- 10) XE lt 0.5
- 11) XCD02 lt 0.5
- 12) XCD03 lt 0.5
- 13) XCD04 lt 0.5
- END
57- LP OPTIMUM FOUND AT STEP 12
- OBJECTIVE FUNCTION VALUE
- 1) 2.2750000
- VARIABLE VALUE REDUCED COST
- XB .500000 .000000
- XD .500000 .000000
- XE .500000 .000000
- XCD04 .500000 .000000
- XA .500000 .000000
- XC .022903 .000000
- XCD02 .077097 .000000
- XCD03 .380952 .000000
- ROW SLACK OR SURPLUS DUAL PRICES
- 2) .000000
.000000
58- RANGES IN WHICH THE BASIS IS UNCHANGED
-
- OBJ COEFFICIENT RANGES
- VARIABLE CURRENT ALLOWABLE
ALLOWABLE - COEF
INCREASE DECREASE - XB .800000 INFINITY
.800000 - XD 1.500000 INFINITY
1.500000 - XE 1.200000 INFINITY
1.200000 - XCD04 1.050000 INFINITY
1.050000 - XA .000000 INFINITY
.000000 - XC .000000 1.157625
.000000 - XCD02 .000000 .000000
1.157625 - XCD03 .000000 .000000
1.102500 -
- RIGHTHAND SIDE RANGES
- ROW CURRENT ALLOWABLE
ALLOWABLE - RHS INCREASE
DECREASE - 2 -1.100000 .022903
.477097 - 3 .000000 .024048
.080952
59The verbal description of the optimum basis
- Invest as much as possible in C and D in 2002.
Invest the remainder in A. - Take the returns in 2003 and invest as much as
possible in B. Invest the remainder in CDs - Take all returns in 2004 and invest them in E.
- Note if an extra dollar became available in
years 2002 or 2003 or 2004, we would invest it in
A or 2003CDs or E
60A graph for the financial Problem
- Any additional money in 2002 is invested in A.
- Any additional money in 2003 is invested in
CD2003. - Any additional money in 2004 is invested in E.
A
2002 2003 2004 2005
CD2003
.40
1.05
.80
E
1.20
61Shadow Price Interpretation
Constraint cash flow into 2004 is all
invested. Shadow price -1.2
A
2002 2003 2004 2005
CD2003
Interpretation an extra 1 in 2004 would be
worth 1.20 in 2005.
.40
1.05
.80
E
1.20
.8 xA .4 xB - xE 1.05 xCD03 xCD04
0
62More on the shadow price for 2004
.8 xA .4 xB - xE 1.05 xCD03 xCD04
0
.xE .427 in the optimal solution
Increase the RHS by D, and xE decreases by D.
63Shadow Price Interpretation
Constraint cash flow into 2003 is all
invested. Shadow price -1.26
A
2002 2003 2004 2005
CD2003
Interpretation an extra 1 in 2003 would be
worth 1.26 in 2005.
.40
1.05
.80
E
1.20
64Shadow Price Interpretation
Constraint all 1.1 million is invested in
2002. Shadow price -1.464
A
2002 2003 2004 2005
CD2003
Interpretation an extra 1 in 2002 would be
worth 1.46 in 2005.
.40
1.05
.80
E
1.20
.4 x 1.05 x 1.2 .8 x 1.2 1.464