Professional Documents
Culture Documents
Sensitivity Analysis: em 602 Management Science
Sensitivity Analysis: em 602 Management Science
SCIENCE
Lecture 3:
Sensitivity Analysis and Duality
Sensitivity Analysis
An LP Sensitivity Analysis is concerned with how changes in an LP’s
parameters affect the LP’s optimal solution.
𝑐 ←𝑐 𝛥𝑐
x*
g1
g2
x1
2
1
Sensitivity Analysis – Graphical Interpretation
X2 LP Sensitivity Analysis
Graphical Interpretation
X 1 40
(Giapetto Example)
20 40 60 80 100
X1
X 1 X 2 80
2 X 1 X 2 100 : Z* = 180, and X1 = 20 and X2 = 60
Z 3X1 2X 2
4
2
LP Sensitivity Analysis
Giapetto Example (Continued)
Max Z = 3X1 + 2X2 + 0S1 + 0S2 + 0S3
Now c1 = 3 – correct?
3𝑋 𝑍 3
3𝑋 2𝑋 𝑍 ⇒ 𝑋 𝑆𝑙𝑜𝑝𝑒
2 2 2
5
LP Sensitivity Analysis
Giapetto Example (Continued)
X2
Giapetto Problem
100
finishing constraint
Slope = -2
A Feasible Region
80
demand constraint
B Slope = -3/2
D
40
carpentry constraint
Slope = -1
20
20 40 50 60 80 X1
6
3
LP Sensitivity Analysis
Giapetto Example (Continued)
Y
40
20
20 40 60 80 100
X1
X 1 X 2 80
2 X 1 X 2 100
Z 3X1 2X 2 8
4
LP Sensitivity Analysis Graphical Interpretation
X2
(Giapetto Example)
100 For 80 < b1 < 120, the optimal solution remains (the
80 intersection point of) the binding constraints of
A 2X1 + X2 = 100 and X1 + X2 = 80
60
Z 3X1 2X 2
9
LP Sensitivity Analysis
Giapetto Example (Continued)
Exercise 1: Let b1: # of available finishing hours and current b1 = 100.
If b1 = 100 + , while –20 < < 20 (because 80 < b1 < 120), the optimal solution still binding
by the same constraints:
2X1 + X2 = 100 + and X1 + X2 = 80 X1 = 20 + and X2 = 60 -
Increasing 1 finishing hour increases the production of 1 solider and decreases the
production of 1 train
10
5
LP Sensitivity Analysis
Giapetto Example (Continued)
(3) Shadow Prices
Exercise 1:
a) Assume there are (100 + ) hours available
b) The LP optimal solution is (20 + , 60 - )
c) The optimal obj. function is Z = 3X1 + 2X2 = 3(20 + ) + 2(60 - ) = 180 +
d) Binding constraints are [2X1 + X2 = 100 + ] and [X1 + X2 = 80]
e) Intersect point is (X1 = 20 + , X2 = 60 - )
f) 1 unit increase of finishing hour will increase Z value by $1.
11
11
LP Sensitivity Analysis
Giapetto Example (Continued)
(3) Shadow Prices
Exercise 2:
a) Assume there are 40 + in third constraint, that is X1 = 40 +
b) Since the optimal value remain the same => Shadow Price = 0
c) Whenever the slack (excess) variable > 0, there is no shadow price.
2X1 + X2 + S1 = 100
X1 + X2 + S2 = 80
X1 + S3 = 40
Optimum = (20,60)
S3 = 20, S1 = S2 = 0
12
12
6
LP Sensitivity Analysis (continued)
(3)New opt. Z-value = Old opt. Z-value + (Constraint i-th shadow price) bi
13
13
Sensitivity Analysis
𝑐 ←𝑐 𝛥𝑐
x*
g1
g2
x1
14
14
7
Sensitivity Analysis (Continued)
𝑍∗ 𝑐 ∗
𝑍∗ 𝑐 𝑥∗ 𝑐 𝑥∗ ⇒ 𝑥∗ 𝑥
𝑐 𝑐
𝑐
𝑤ℎ𝑒𝑟𝑒 ≡ 𝑠𝑙𝑜𝑝𝑒 𝑜𝑓 𝑖𝑠𝑜 𝑐𝑜𝑠𝑡 𝑝𝑟𝑜𝑓𝑖𝑡 𝑙𝑖𝑛𝑒
𝑐
𝑏 𝑎
𝑔 𝑎 𝑥 𝑎 𝑥 𝑏 ⇒ 𝑥∗ 𝑥∗
𝑎 𝑎
𝑏 𝑎
𝑔 𝑎 𝑥 𝑎 𝑥 𝑏 ⇒ 𝑥∗ 𝑥∗
𝑎 𝑎
𝑎 𝑐 𝑎
𝑁𝑜𝑡𝑒: 𝑡𝑜 𝑘𝑒𝑒𝑝 𝑥 ∗ 𝑜𝑝𝑡𝑖𝑚𝑎𝑙, 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔 𝑚𝑢𝑠𝑡 ℎ𝑜𝑙𝑑:
𝑎 𝑐 𝑎
𝑎 𝑐 ∆𝑐 𝑎 𝑎 𝑎
⇒ ⇒ 𝑐 𝑐 ∆𝑐 𝑐 𝑐 , 𝑓𝑜𝑟 𝑐 0
𝑎 𝑐 𝑎 𝑎 𝑎
15
15
𝑧 𝑐 0 𝑎 𝑦 𝑐
𝑐 ←𝑐 ∆𝑐 ⇒ 𝑎 𝑦 𝑐 ∆𝑐 0
or:
∞ ∆𝑐 𝑎 𝑦 𝑐 𝑧 𝑐 𝑐
∞ ∆𝑐 𝑟𝑒𝑑𝑢𝑐𝑒𝑑 𝑐𝑜𝑠𝑡 𝑗
16
8
Sensitivity Analysis – Basic Variables
𝑐 𝑧 𝑐 0
𝑐 𝑧 𝑐 ∆𝑐
Currently in the tableau, there is only one row (the basic variable row) with: 𝑎 1
Thus, the kth row must be multiplied by Δcr and added to the top row to maintain 𝑐 0
This will not affect other basic variables, but it will affect the non-basics!
𝑐
𝑐 𝑐 ∆𝑐 𝑎 0 𝑜𝑟 ∆𝑐 , 𝑎 0
𝑎
𝑐
, 𝑎 0
𝑎
17
Reduced Cost
Top row of Tableau x1 + s1 = 4 +Δ
Denotes the amount by which x1 = 2 no change in obj. function.
the objective function Z Reduced cost of 𝑠 𝑜𝑟 𝑐 0
would change if Xj were
forced into basis 2x2 + s2 = 12 + Δ. e.g., Δ = 1
Shadow Prices Reduced cost of 𝑠 𝑜𝑟 𝑐 3/2
“Special” reduced cost Z = 36 + 3/2
The rate at which the objective
function Z changes with Reduced cost of slack, surplus or
respect to a change in RHS of artificial variables = shadow prices
a constraint. 18
18
9
Tableau Example (Continued)
Variable Value X1 X2 S1 S2 S3
Z 36 0 0 0 3/2 1
S1 2 0 0 1 1/3 -1/3 Final Tableau
X2 6 0 1 0 1/2 0
X1 2 1 0 0 -1/3 1/3
∆𝑐 : 𝑥 is basic 𝑘 3 𝑎 , 1 ∆𝑏 : 𝑛 𝑘 5 𝑆
𝑐 1 𝑏 2
max 𝑎 0 max 3 max 𝑎, 0 max 6
𝑎 1 𝑎, 1
3 3
3 𝑏 2
𝑐 2 9 min 𝑎, 0 min 6
min 𝑎 0 min 4.5 𝑎, 1
𝑎 1 2 3
3
⇒ 3 ∆𝑐 4.5 ⇒ 0 ∆𝑐 7.5 ⇒ 6 ∆𝑏 6 ⇒ 12 ∆𝑏 24
19
19
Sensitivity Analysis
20
20
10
LP Duality Theory
Recall our Wyndor Problem:
21
21
Theory of LP Duality
Optimal Conditions:
𝑍 𝑐 0 𝑗 1,2, … , 𝑛 𝑍 𝑐𝑥
𝑦 0 𝑖 1,2, … , 𝑚
𝑠. 𝑡. 𝑎 𝑥 𝑏 𝑖 1,2, … , 𝑚 𝑦
Thus, we could say we want:
𝑍 𝑦 𝑏𝑦 𝑥 0 𝑗 1,2, … , 𝑛
𝑠. 𝑡. 𝑎 𝑦 𝑐 𝑗 1,2, … , 𝑛
𝑦 0 𝑖 1,2, … , 𝑚
22
22
11
Theory of LP Duality (continued)
The only feasible solutions are those which satisfy the optimality
conditions of the PRIMAL;
Minimizing y0 is moving toward feasibility.
“Don’t overvalue resources”
DUAL:
𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑦 𝑏𝑦
𝑠. 𝑡. 𝑎 𝑦 𝑐 𝑗 1,2, … , 𝑛
𝑦 0 𝑖 1,2, … , 𝑚
23
23
24
12
Economic Interpretation of a Dual LP
(continued)
𝑎 𝑦 𝑐, if 𝑥 0 j 1,2, … , n
𝑦 0, if 𝑥 0 𝑖 1,2, … , m
25
LP Duality – Example 1
Primal Problem:
Max. Z = 3x1 + 5x2
s.t. 1x1 ≤4 (y1)
2x2 ≤ 12 (y2)
3x1 + 2x2 ≤ 18 (y3)
xj ≥ 0 (j = 1, 2)
Dual Problem:
Min. Y = 4y1 + 12y2 + 18y3
s.t. 1y1 + 0y2 + 3y3 ≥ 3 (t1)
0y1 + 2y2 + 2y3 ≥ 5 (t2)
yi ≥ 0 (i = 1, 2, 3)
26
26
13
Theory of LP Duality (continued)
Note that the number of variables in a dual problem is
equal to the number of constraints in the primal problem.
27
27
28
14
Duality Theory
Dual Y decreases
Weak Duality:
n m
c x b y
j 1
j
*
j
i 1
i
*
i Z Y
Primal
Z increases
Strong Duality:
If the primal (dual) has a finite optimal solution, then so does the
dual, and these values are equal: Z = Y.
Unboundness:
If the primal (dual) has an unbounded solution, then the dual
(primal) is infeasible.
29
29
30
15
‘General Rules’ for Finding the Dual
Primal Dual
31
31
Minimization Maximization
Variables
0 Constraints
0
Unrestricted
Constraints
0
0
Variables
Unrestricted
32
16
Primal – Dual Relationship (examples)
1. If primal objective is maximization, dual objective is minimization
2. Number of decision variables and constraints:
# of dual decision variables = # of primal constraints.
# of dual constraints = # of primal decision variables.
33
33
Problem P Problem D
max F 3 x1 5 x2 min G 41 122 183
s.t. x1 4 subject to
2 x2 12 1 33 3
3 x1 2 x2 18 22 23 5
x1 0, x2 0 1 0, 2 0, 3 0
Primal Problem Dual Problem
34
34
17
Primal – Dual Relationship (examples)
5. Coefficients of one variable across multiple primal constraints are
coefficients of multiple variables in one dual constraint.
Problem P Problem D
max F 3x1 5 x2 min G 41 122 183
s.t. x1 4 subject to
2 x2 12 1 33 3
3x1 2 x2 18 22 23 5
x1 0, x2 0 1 0, 2 0, 3 0
Primal Problem Dual Problem
Problem P Problem D
max F 3x1 5 x2 min G 41 122 183
s.t. x1 4 subject to
2 x2 12 1 33 3
3x1 2 x2 18 22 23 5
x1 0, x2 0 1 0, 2 0, 3 0
Primal Problem Dual Problem
35
35
36
36
18
Complimentary Slackness
If, in an optimal solution of an LP, the value of the dual
variable associated with a constraint is nonzero, then that
constraint must be satisfied with equality.
n
If yi 0 => aij x j bi
j 1
37
37
38
38
19
Solving Dual via Complimentary
Slackness
Primal: Max Z = 3x1 + 5x2 Dual: Min Y = 4y1 + 12y2 + 18y3
s.t. 1x1 ≤4 (y1) s.t. 1y1 + 0y2 + 3y3 ≥ 3
39
Turn the Primal into Dual using the general rules (shown
earlier in a table)!
40
40
20
Finding Dual of a Complex LP
Dual Problem:
Min. W = 5y1 + 4y2 + 1y3
s.t. 1y1 – 2y2 + 1y3 ≥ 2
1y1 + 1y2 + 0y3 = 1
1y1 – 3y2 + 1y3 ≥ 3
1y1 + 0y2 + 1y3 = 1
y1 ≥ 0; y2 unsigned; y3 ≤ 0
Primal solution:
Decision Variables x = [0, 4, 0, 1] and Z* = 5
Shadow prices: y1 = 1.5, y2 = -0.5, y3 = -0.5
41
41
42
21
Complex Example – LINDO Solution
LP OPTIMUM FOUND AT STEP 2
OBJECTIVE FUNCTION VALUE
1) 5.000000
VARIABLE VALUE REDUCED COST
X1 0.000000 0.000000
X2 4.000000 0.000000
X3 0.000000 0.500000
X4 1.000000 0.000000
ROW SLACK/SURPLUS DUAL PRICES
2) 0.000000 1.500000
3) 0.000000 -0.500000
4) 0.000000 -0.500000
NO. ITERATIONS= 2
43
43
22