### SIE 340 Chapter 5. Sensitivity Analysis

```QingPeng (QP) Zhang
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */

Sensitivity analysis is concerned with how
changes in an linear programming’s parameters
affect the optimal solution.
Weekly profit (revenue - costs)
Profit generated by each soldier
\$3
Profit generated by each train
\$2
1 = number of soldiers produced each week
2 = number of trains produced each week.

max  = 31 + 22 (weekly profit)
s.t.
21 + 2 ≤ 100 (finishing constraint)
1 + 2 ≤ 80 (carpentry constraint)
1
≤ 40 (demand constraint)
1 , 2 ≥ 0 (sign restriction)
1 = number of soldiers produced each week
2 = number of trains produced each week.
Constraint/Objective
Slope
Finishing constraint
-2
Carpentry constraint
-1.5
Objective function
-1
Optimal solution
(1 , 2 )=(60, 180)
=180
Basic variable
Basic solution





Change objective function coefficient
Change right-hand side of constraint
Other change options
The Importance of sensitivity analysis

How would changes in the problem’s objective function
coefficients or the constraint’s right-hand sides change this
optimal solution?
max  = 31 + 22
1
= 1 1 + 22
1 1
2 = − +
2 2
1
−
2
<
? −2
1
−
2
>
? −1
1 1
2 = − +
2 2
If
1
−
2
then
1
2
< −2
>2
Slope is steeper
B->C
1 1
2 = − +
2 2
Slope is steeper
New optimal solution:
(40, 20)
= 1 × 40 + 2 × 20
1 1
2 = − +
2 2
If
1
−
2
then
1
2
> −1
<1
Slope is flatter
B->A
1 1
2 = − +
2 2
Slope is steeper
New optimal solution:
(0, 80)
z=2 × 80 = 160





Change objective function coefficient
Change right-hand side of constraint
Other change options
The Importance of sensitivity analysis
1

max  = 31 + 22 (weekly profit)
s.t.
21 + 2 ≤ 100 (finishing constraint)
1 + 2 ≤ 80 (carpentry constraint)
1 ≤ 40 (demand constraint)
1 , 2 ≥ 0 (sign restriction)
1 = number of soldiers produced each week
2 = number of trains produced each week.



1 is the number of
finishing hours.
Change in b1 shifts the
finishing constraint
parallel to its current
position.
Current optimal point (B)
is where the carpentry
and finishing constraints
are binding.

As long as the
binding point (B) of
finishing and
carpentry constraints
is feasible, optimal
solution will occur at
the binding point.
1 ≤ 40
1 , 2 ≥ 0
If 1 >120, 1 >40 at
the binding point.
 If 1 <80, 1 <0 at the
binding point.
 So, in order to keep
the basic solution, we
need:
80 ≤ 1 ≤ 120
(z is changed)

(demand constraint)
(sign restriction)





Change objective function coefficient
Change right-hand side of constraint
Other change options
The Importance of sensitivity analysis

max  = 31 + 22 (weekly profit)
s.t.
21 + 2 ≤ 100 (finishing constraint)
1 + 2 ≤ 80 (carpentry constraint)
1
≤ 40 (demand constraint)
1 , 2 ≥ 0 (sign restriction)
2 1
1 1
1 0

max  = 31 + 22 (weekly profit)
s.t.
21 + 2 ≤ 100 (finishing constraint)
1 + 2 ≤ 80 (carpentry constraint)
1
≤ 40 (demand constraint)
1 , 2 ≥ 0 (sign restriction)





Change objective function coefficient
Change right-hand side of constraint
Other change options
The Importance of sensitivity analysis


To determine how a constraint’s rhs changes the
optimal z-value.
The shadow price for the ith constraint of an LP is
the amount by which the optimal z-value is
improved (increased in a max problem or
decreased in a min problem).




Finishing constraint
Basic variable: 100
Current value
 1 =100+Δ
New optimal solution
 (20+Δ, 60-Δ)
 z=31 +22 =180+ Δ
 Current basis is optimal
one increase in finishing
hours increase optimal
z-value by \$1
The shadow price for the
finishing constraint is \$1





Change objective function coefficient
Change right-hand side of constraint
Other change options
The Importance of sensitivity analysis

If LP parameters change, whether we have to solve
the problem again?
 In previous example: sensitivity analysis shows it is
unnecessary as long as: 80 ≤ 1 ≤ 120
 z is changed

Deal with the uncertainty about LP parameters
• Example:
• The weekly demand for
soldiers is 40.
• Optimal solution B
• If the weekly demand is
uncertain. 1 ≤?
• As long as the demand is
at least 20, B is still the
optimal solution.
```