Professional Documents
Culture Documents
ch05 PDF
ch05 PDF
ch05 PDF
Mathematical Programming
Chapter 05
Chapter 5
Sensitivity Analysis:
An Applied Approach
to accompany
Operations Research: Applications and Algorithms
4th edition
by Wayne L. Winston
Where:
x1 = number of soldiers produced each week
x2 = number of trains produced each week.
3
5.1 – A Graphical Approach to Sensitivity Analysis
X2
The optimal solution for
100
this LP was finishing constraint
Slope = -2
80
(point B in the figure to the demand constraint
60
B
s3 (the slack variable for Slope = -3/2
40
carpentry constraint
How would changes in the Slope = -1
problem’s objective
20
function coefficients or C
4
5.1 – A Graphical Approach to Sensitivity Analysis
5
5.1 – A Graphical Approach to Sensitivity Analysis
The values of the contribution to profit for soldiers for which the current
optimal basis (x1,x2,s3) will remain optimal can be determined as
follows:
Let c1 be the contribution ($3 per soldier) to the profit. For what values
of c1 does the current basis remain optimal?
3 1 c 1 1
Rearranging: x2 x 1 constant x 1 constant
2 2 2 2
c 1
Since -2 < slope < -1: 2 1
2
Note: the profit will change
Solving for c1 yields: 2 c1 4 in this range of c1
6
5.1 – A Graphical Approach to Sensitivity Analysis
7
5.1 – A Graphical Approach to Sensitivity Analysis
X2
finishing constraint, b1 = 120
In the Giapetto problem to
100
the right, we see that if b1 finishing constraint, b1 = 100
80
demand constraint. Also, demand constraint
if b1 < 80, x1 will be less
finishing constraint, b1 = 80
60
than 0 and the B
nonnegativity constraint
for x1 will be violated. 40 D
carpentry constraint
Therefore: 80 ≤ b1 ≤ 120
Feasible Region
The current basis remains
20
C
optimal for 80 ≤ b1 ≤ 120,
but the decision variable
values and z-value will 20 40 50 60 80 X1
change.
8
5.1 – A Graphical Approach to Sensitivity Analysis
9
5.1 – A Graphical Approach to Sensitivity Analysis
10
Summary
Allowable Ranges: Current basis BVs remain optimal
11
Summary
Allowable Ranges: Current basis BVs remain optimal
if the change in the rhs of constraint i leaves the current basis optimal:
The Shadow/Dual price for the i th constraint of an LP is the amount by
which the optimal z-value is improved if the rhs of the ith constraint is
increased by one.
12
Summary
Allowable Ranges: Current basis BVs remain optimal
if the change in the rhs of constraint i leaves the current basis optimal:
The Shadow/Dual price for the i th constraint of an LP is the amount by
which the optimal z-value is improved if the rhs of the ith constraint is
increased by one.
Reduced cost is the amount the objective function coefficient for variable
i, would have to be increased for there to be an alternative optimal solution
(results in coefficient of zero for variable i in objective function).
13
5.2 – The Computer and Sensitivity Analysis
14
5.2 – The Computer and Sensitivity Analysis
15
5.2 – The Computer and Sensitivity Analysis
16
5.2 – The Computer and Sensitivity Analysis
NO. ITERATIONS= 4
17
5.2 – The Computer and Sensitivity Analysis
RANGES IN WHICH THE BASIS IS UNCHANGED:
18
5.2 – The Computer and Sensitivity Analysis
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
Shadow prices SUBJECT TO
2) X1 + X2 + X3 + X4 = 950
are shown in the 3) X4 >= 400
Dual Prices 4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
section of END
LINDO output. LP OPTIMUM FOUND AT STEP 4
19
5.2 – The Computer and Sensitivity Analysis
Interpretation of shadow prices:
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.000000 (overall demand)
3) 0.000000 -2.000000 (product 4 demand)
4) 0.000000 1.000000 (raw material availability)
5) 250.000000 0.000000 (labor availability)
Assuming the allowable range of the rhs is not violated, shadow prices show:
• $3 for constraint 1 implies that each one-unit increase in total demand will
increase net sales by $3.
• The -$2 for constraint 2 implies that each unit increase in the requirement
for product 4 will decrease revenue by $2.
• The $1 shadow price for constraint 3 implies an additional unit of raw
material (at no cost) increases total revenue by $1.
• Finally, constraint 4 implies any additional labor (at no cost) will not improve
total revenue.
20
5.2 – The Computer and Sensitivity Analysis
Shadow price signs
1. Constraints with symbols will always have
nonpositive shadow prices.
• Eliminating points from an LP’s feasible region
can only make the optimal z-value worse or
leave it the same.
2. Constraints with will always have nonnegative
shadow prices.
• Adding points to an LP’s feasible region can
only improve the optimal z-value or leave it the
same.
3. Equality constraints may have a positive, a
21 negative, or a zero shadow price.
5.2 – The Computer and Sensitivity Analysis
Shadow price signs
1. Constraints with symbols will always have
nonpositive shadow prices.
• Eliminating points from an LP’s feasible region
can only make the optimal z-value worse or
leave it the same.
2. Constraints with will always have nonnegative
shadow prices.
• Adding points to an LP’s feasible region can
only improve the optimal z-value or leave it the
same.
3. Equality constraints may have a positive, a
22 negative, or a zero shadow price.
5.2 – The Computer and Sensitivity Analysis
Shadow price signs
1. Constraints with symbols will always have
nonpositive shadow prices.
• Eliminating points from an LP’s feasible region
can only make the optimal z-value worse or
leave it the same.
2. Constraints with will always have nonnegative
shadow prices.
• Adding points to an LP’s feasible region can
only improve the optimal z-value or leave it the
same.
3. Equality constraints may have a positive, a
23 negative, or a zero shadow price.
5.2 – The Computer and Sensitivity Analysis
24
5.2 – The Computer and Sensitivity Analysis
25
5.2 – The Computer and Sensitivity Analysis
Degeneracy and Sensitivity Analysis
When the optimal solution is degenerate (a bfs is degenerate if at least
one basic variable in the optimal solution equals 0), caution must be
used when interpreting the LINDO output.
For an LP with m
constraints, if the MAX 6 X1 + 4 X2 + 3 X3 + 2 X4
optimal LINDO output
indicates less than m SUBJECT TO
variables are positive,
2) 2 X1 + 3 X2 + X3 + 2 X4 <= 400
then the optimal solution
is degenerate bfs. 3) X1 + X2 + 2 X3 + X4 <= 150
Consider the LINDO LP
formulation shown to 4) 2 X1 + X2 + X3 + 0.5 X4 <= 200
the right and the LINDO 5) 3 X1 + X2 + X4 <= 250
output on the next slide.
26
5.2 – The Computer and Sensitivity Analysis
27
5.2 – The Computer and Sensitivity Analysis
28
5.2 – The Computer and Sensitivity Analysis
LINDO TABLEAU command indicates the optimal basis is BV = {x1,x2,x3,s4}.
THE TABLEAU
ROW (BASIS) X1 X2 X3 X4 SLK 2
1 ART 0.000 0.000 0.000 1.500 0.500
2 X2 0.000 1.000 0.000 0.500 0.500
3 X3 0.000 0.000 1.000 0.167 -0.167
4 SLK 4 0.000 0.000 0.000 -0.500 0.000
5 X1 1.000 0.000 0.000 0.167 -0.167
29
5.2 – The Computer and Sensitivity Analysis
30
5.3 – Managerial Use of Shadow Prices
The managerial MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
significance of shadow 2) X1 + X2 + X3 + X4 = 950 raw
prices is that they can 3) X4 >= 400
material
4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
often be used to 5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
determine the END
labor
maximum amount a LP OPTIMUM FOUND AT STEP 4
manger should be OBJECTIVE FUNCTION VALUE
willing to pay for an 1) 6650.000
additional unit of a VARIABLE VALUE REDUCED COST
resource. Reconsider X1 0.000000 1.000000
X2 400.000000 0.000000
the Winco to the right. X3 150.000000 0.000000
X4 400.000000 0.000000
What is the most ROW SLACK OR SURPLUS DUAL PRICES
Winco should be 2) 0.000000 3.000000
3) 0.000000 -2.000000
willing to pay for 4) 0.000000 1.000000
additional units of raw 5) 250.000000 0.000000
31
5.3 – Managerial Use of Shadow Prices
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
The shadow price for raw SUBJECT TO
material constraint (row 4) 2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400
shows an extra unit of raw 4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
material would increase END
revenue $1. Winco could
LP OPTIMUM FOUND AT STEP 4
pay up to $1 for an extra
OBJECTIVE FUNCTION VALUE
unit of raw material and be 1) 6650.000
as well off as it is now.
VARIABLE VALUE REDUCED COST
X1 0.000000 1.000000
Labor constraint’s (row 5) X2 400.000000 0.000000
shadow price is 0 meaning X3 150.000000 0.000000
X4 400.000000 0.000000
that an extra hour of labor
ROW SLACK OR SURPLUS DUAL PRICES
will not increase revenue. 2) 0.000000 3.000000
So, Winco should not be 3) 0.000000 -2.000000
4) 0.000000 1.000000
willing to pay anything for 5) 250.000000 0.000000
32
5.4 – What happens to the Optimal z-Value if
the Current Basis Is No Longer Optimal?
In Section 5.2 shadow prices were used to determine the new optimal z-
value if the rhs of a constraint was changed but remained within the
range where the current basis remains optimal. Changing the rhs of a
constraint to values where the current basis is no longer optimal can be
addressed by the LINDO PARAMETRICS feature. This feature can be
used to determine how the shadow price of a constraint and optimal z-
value change.
33
5.4 – What happens to the Optimal z-Value if
the Current Basis Is No Longer Optimal?
Suppose we want to determine how the optimal z-value and shadow price
change as the amount of raw material varies between 0 and 10,000 units
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400
4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 0
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
END
35
5.4 – What happens to the Optimal z-Value if
the Current Basis Is No Longer Optimal?
Solve the problem and then use TABLEAU report:
THE TABLEAU
ROW SLK 5
1 0.000 5400.000
2 0.000 400.000 So minimum of raw material
3 1.000 950.000
4 0.000 -3900.000
to have a feasible
5 0.000 550.000 Problem is 3900!
ART 0.000 -3900.000
36
5.4 – What happens to the Optimal z-Value if
the Current Basis Is No Longer Optimal?
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400
4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 3900
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
END
37
5.4 – What happens to the Optimal z-Value if the Current Basis
Is No Longer Optimal?
Raw Material rhs = 3900 optimal solution RANGES IN WHICH THE BASIS IS UNCHANGED:
THE TABLEAU
38
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
Changing Row 4’s rhs to 3900, resolving the LP, and selecting the REPORTS
PARAMTERICS feature. In this feature we choose Row 4, setting the Value to
10000, and select text output. We then obtain the output below:
Let rm be the amount of available raw material. If rm < 3900, we know the LP
is infeasible. From the figure above, from 3899 < rm < 4450, the shadow price
(DUAL) is $2, switches to $1 from 4449 < rm < 4849, and finally to $0 at 4850.
39
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
40
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
41
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
42
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
43
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
44
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
45
5.1 – A Graphical Approach to Sensitivity Analysis
X2
The optimal solution for
100
this LP was finishing constraint
Slope = -2
80
(point B in the figure to the demand constraint
60
B
s3 (the slack variable for Slope = -3/2
40
carpentry constraint
How would changes in the Slope = -1
problem’s objective
20
function coefficients or C
46
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
Recall from the Giapetto problem, if the isoprofit line is flatter than the
carpentry constraint, Point A(0,80) is optimal. Point B(20,60) is
optimal if the isoprofit line is steeper than the carpentry constraint
but flatter than the finishing constraint. Finally, Point C(40,20) is
optimal if the slope of the isoprofit line is steeper than the slope of
the finishing constraint. Since a typical isoprofit line is c1x1 + 2x2 =
k, we know the slope of the isoprofit line is just -c1/2. This implies:
47
5.1 – A Graphical Approach to Sensitivity Analysis
X2
100
finishing constraint
Slope = -2
A Feasible Region
80
demand constraint
B Slope = -3/2
D
40
carpentry constraint
Slope = -1
20
10 20 40 50 60 80 X1
48
5.4 – What happens to the Optimal z-Value if the Current
Basis Is No Longer Optimal?
Optimal z-Value vs c1
440 500
Optimal z-Value
300
z c1
In a minimization LP, the slope
of the graph of the optimal z- 200
value as a function of an
objective function coefficient will 100
be non-increasing.
Proofs are left to be done as 0
0 2 4 6 8 10
homework! 0 c1 10
C1
z-value
49
Any Question?
50