Title: Sensitivity Analysis 2
1Sensitivity Analysis 2
- More on pricing out
- Effects on final tableaus
-
2Partial summary of last lecture
- 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. - 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 Sensitivity Analysis Report. - Reduced costs can be determined by pricing out
3Running Example
- Sarah can sell bags consisting of 3 gadgets and 2
widgets for 2 each. - She currently has 6 gadgets and 2 widgets.
- She can purchase bags with 3 gadgets and 4
widgets for 3. - Formulate Sarahs problem as an LP and solve it.
4Model
- maximize z -3x1 2x2
- subject to g) 3x2 x3
6 3x1 - w) 2x2
x4 2 4x1 - x1, x2,
x3, x4 ? 0 - where x1 is the number of bags she buys for 3 a
piece - x2
sells for 2 a piece - The constraints say that she cannot sell more
gadgets (or widgets) than she has. - The o.f. is her net profit.
5Shadow Prices can be found by examining the
initial and final tableaus!
maximize z -3x1 2x2 subject to
-3x1 3x2 x3
6
-4x1 2x2 x4 2
x1, x2, x3,
x4 ? 0
x1
x2
x4
x3
-z
-3
2
0
0
1
0
-3
3
1
6
0
0
2
-4
2
0
1
0
6The Initial Basic Feasible Solution
x1
x2
x4
x3
-z
Apply the min ratio rule
-3
2
0
0
1
0
-3
3
1
0
0
6
x3
min (6/3, 2/2).
-4
2
0
1
0
2
2
x4
The basic feasible solution is x1 0, x2 0,
x3 6, x4 2
x2
What is the entering variable?
x4
What is the leaving variable?
7The 2nd Tableau
x1
x2
x4
x3
-z
-3
2
0
0
1
0
1
0
-1
0
-2
-3
3
1
0
0
6
0
1
-3/2
3
3
x3
-4
2
0
1
0
2
-2
1
0
1/2
1
x2
The basic feasible solution is x1 0, x2 1,
x3 3, x4 0, z 2
x1
What is the next entering variable?
x3
What is the next leaving variable?
8The 3rd Tableau
x1
x2
x4
x3
-z
1
0
-1
0
-2
0
0
-1/2
-1/3
1
-3
3
0
1
-3/2
3
1
0
1/3
-1/2
0
1
x1
-2
1
0
1/2
1
0
1
2/3
-1/2
0
3
x2
The optimal basic feasible solution is x1 1,
x2 3, x3 0, x4 0, z 3
9LINDO output
- MAX - 3 X1 2 X2
- SUBJECT TO
- G) - 3 X1 3 X2 lt 6
- W) - 4 X1 2 X2 lt 2
- END
-
- LP OPTIMUM FOUND AT STEP 2
- OBJECTIVE FUNCTION VALUE
- 1) 3.0000000
- VARIABLE VALUE REDUCED COST
- X1 1.000000 .000000
basic - X2 3.000000 .000000
basic - ROW SLACK OR SURPLUS DUAL PRICES
- G) .000000 .333333
binding
10LINDO Sensitivity Analysis
- RANGES IN WHICH THE BASIS IS UNCHANGED
-
- OBJ COEFFICIENT RANGES
- VARIABLE CURRENT ALLOWABLE
ALLOWABLE - COEF INCREASE
DECREASE - X1 -3.000000 1.000000
1.000000 - X2 2.000000 1.000000
.500000 -
- RIGHTHAND SIDE RANGES
- ROW CURRENT ALLOWABLE
ALLOWABLE - RHS INCREASE
DECREASE - G 6.000000 INFINITY
3.000000 - W 2.000000 2.000000
INFINITY
11Final tableau
- tab
- THE TABLEAU
- ROW (BASIS) X1 X2 SLK2
SLK3 - 1 ART .000 .000
.333 .500 3.000 - G X1 1.000 .000
.333 -.500 1.000 - W X2 .000 1.000
.667 -.500 3.000
12Shadow Price
- The shadow price of a constraint is the
improvement in the optimum objective value per
unit increase in the RHS coefficient, all other
data remaining equal. - What is the shadow price for constraint 1,
gadgets on hand? - This is the value of an extra gadget on hand.
13x1
x2
x4
x3
-z
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
14Reduced Costs
- The reduced cost of a variable x is the shadow
price of the x ? 0 constraint. It is also the
cost coefficient for x in the final tableau. - Suppose in the previous example that we required
that x3 ? 1? What is the impact on the optimal
objective value? What is the resulting solution? - By the previous slide, the impact is 1/3.
Sarahs Problem
15More on reduced costs
- In a pivot, multiples of constraints are added to
the cost row. - We will use this fact to determine explicitly how
the cost row in the final tableau is obtained.
16x1
x2
x4
x3
-z
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
The cost row in the final tableau is obtained by
adding multiples of original constraints to the
original cost row.
x1
x2
x4
x3
-z
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
17x1
x2
x4
x3
-z
How are the reduced costs in the 2nd tableau
below obtained?
-3
2
0
0
1
0
1
-3
3
1
0
0
6
-1/3
-4
2
0
1
0
2
x1
x2
x4
x3
-z
Take the initial cost coefficients.
0
0
-1/2
-1/3
-3
1
-1/3
Then subtract 1/3 of constraint 1.
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
18x1
x2
x4
x3
-z
-3
2
0
0
1
0
1
-3
3
1
0
0
6
-1/3
-4
2
0
1
0
2
-1/2
x1
x2
x4
x3
-z
Next subtract ½ of constraint 2 from these
costs.
0
0
-1/2
-1/3
-3
1
-1/2
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
19Implications of Reduced Costs
- Implication 1 increasing the cost coefficient
of a non-basic variable by D leads to an increase
of its reduced cost by D.
20x1
x2
x4
x3
-z
What is the effect of adding D to the cost
coefficient for x3?
-3
2
0
0
1
0
D
-3
3
1
0
0
6
-4
2
0
1
0
2
FACT Adding D to the cost coefficient in an
initial tableau also adds D to the same
coefficient in subsequent tableaus
x1
x2
x4
x3
-z
0
0
-1/2
-1/3
-3
1
D-1/3
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
21x1
x4
-z
What is the effect of adding D to the cost
coefficient for x2?
x3
x2
RHS
2
-3
0
1
0
0
2D
3
-3
0
0
6
1
2
-4
1
0
2
0
x1
x2
-z
x4
x3
RHS
Sarahs Problem
0
0
0
0
1
0D
-1/2
-3
-1/3
1
0
0
-1/2
1
1/3
0
1
0
-1/2
3
2/3
22x1
x4
-z
x3
x2
RHS
Subtract D times row 3 from row 1 to get it back
in canonical form.
2
-3
0
1
0
0
2D
3
-3
0
0
6
1
2
-4
1
0
2
0
D ? 1 for the tableau to remain optimal. Bound on
changes in cost coefficients.
How large can D be?
x1
x2
-z
x4
x3
RHS
0
0
0
0
1
0D
-1/2
-3
-1/3
-1/2 D/2
-3-3D
-1/3-2D/3
0
0
1
0
0
-1/2
1
1/3
Sarahs Problem
0
1
0
-1/2
3
2/3
23Implications of Reduced Costs
- Implication 2 We can compute the reduced cost
of any variable if we know the original column
and if we know the prices for each constraint.
24x1
x2
x5
x3
-z
x4
RHS
-3
2
0
1
0
0
-3
3
1
0
6
0
-4
2
0
0
2
1
Suppose that we add another variable, say x5.
Should we produce x5? What is ?c5?
x1
x2
x3
-z
x4
0
0
-1/3
-3
1
-1/2
1
0
1/3
1
0
-1/2
0
1
2/3
3
0
-1/2
25x1
x2
x5
x3
-z
x4
RHS
-3
2
0
1
0
0
-3
3
1
0
6
0
-4
2
0
0
2
1
?c5 3/2 - 21/3 11/2 1/3
FACT We can compute the reduced cost of a new
variable. If the reduced cost is positive, it
should be entered into the basis.
x1
x2
x3
-z
x4
0
0
1/3
-1/3
-3
1
-1/2
1
0
1/3
1
0
-1/2
0
1
2/3
3
0
-1/2
26More on Pricing Out
- Every tableau has prices. These are usually
called simplex multipliers. - The prices for the optimal tableau are the shadow
prices.
27Simplex Multipliers
x1
x2
x5
x3
-z
x4
-3
2
0
1
0
0
-3
3
1
0
6
0
p11/3
-4
2
0
0
2
1
p2 1/2
FACT x2 is a basic variable and so?c2 0.
x5
x1
x2
x3
-z
x4
1/5
0
0
-1/3
-3
1
-1/2
1/2
1
0
1/3
1
0
-1/2
1.5
0
1
2/3
3
0
-1/2
28A useful fact from linear algebra
- If column j in the initial tableau is a linear
combination of the other columns, then it is the
same linear combination of the other columns in
the final tableau. - e.g., if A.3 A.2 2 A.1 , then
?A.3 ?A.2 2?A.1
We will use this fact to derive information about
the final tableau. But first. some practice.
29x1
x2
x4
x3
-z
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
30x1
x2
x4
x3
-z
Let Aj column j
-3
2
0
0
1
0
A2 column for x2
-3
3
1
0
0
6
A0 column for z
-4
2
0
1
0
2
x1
x2
x4
x3
-z
Let ?Aj column j
?A2 column 2
0
0
-1/2
-1/3
-3
1
?A0 column for z
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
31x1
x2
x4
x3
-z
A1 -3 A0 - 3 A3 - 4 A4
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
x1
x2
x4
x3
-z
?A1 -3?A0 - 3?A3 - 4?A4
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
32x1
x2
x4
x3
-z
A2 2 A0 3 A3 2 A4
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
x1
x2
x4
x3
-z
?A2 2?A0 3?A3 2?A4
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
33x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
x1
x2
x4
x3
-z
?b
?b?
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
34x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
b b A3
What is?b ?
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
35x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
b b A3
?b ?b ?A3
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
36x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
The reduced cost of the slack is the negative of
the shadow price.
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
-3 - 1/3
-1/3
1
0
1/3
-1/2
1
0
1 1/3
0
1
2/3
-1/2
3
0
3 2/3
37x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
b b D A3
What is?b ?
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
38x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
b b D A3
?b ?b D?A3
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
39x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
What are upper and lower bounds on D?
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
40On varying the RHS
- Suppose one adds D to b1.
- This is equivalent to adding D times the column
corresponding to the first slack variable - One can compute the shadow price and also the
effect on ?b - This transformation also provides upper and lower
bounds on the interval for which the shadow price
is valid.
Sarahs Problem
41x1
x2
x4
x3
-z
b
-3
2
0
0
1
0
-3
3
1
0
0
6
-4
2
0
1
0
2
What is?b? What are upper and lower bounds on D
?
x1
x2
x4
x3
-z
?b
?b
0
0
-1/2
-1/3
-3
1
1
0
1/3
-1/2
1
0
0
1
2/3
-1/2
3
0
42Summary of Lecture
- Using tableaus to determine information
- Shadow prices and simplex multipliers
- Changes in cost coefficients
- Linear relationships between columns in the
original tableau are preserved in the final
tableau. - Determining upper and lower bounds on D so that
the shadow price remains valid. - The simplex algorithm can determine all shadow
prices and reduced costs VERY quickly
43Some Extra Insight
- The following four slides are additional material
not covered in the lecture, but covered in AMP.
44Shadow price vs slack variable
- maximize z -3x1 2x2
- subject to -3x1 3x2 x3
6 - -4x1 2x2
x4 2 - x1,
x2, x3, x4 ? 0
Claim increasing the 6 to a 7 is mathematically
equivalent to replacing x3 ? 0 with x3 ?
-1. This is also the reduced cost for variable
x3.
Reason 1. Permitting Sarah to have 7 gadgets
is equivalent to giving her 6 and letting her use
1 more than she has (at no cost).
45Shadow price vs slack variable
- maximize z -3x1 2x2
- subject to -3x1 3x2 x3
6 - -4x1 2x2
x4 2 - x1,
x2, x3, x4 ? 0
Claim increasing the 6 to a 7 is mathematically
equivalent to replacing x3 ? 0 with x3 ?
-1. This is also the reduced cost for variable
x3.
Reason 2. Any solution to the original problem
can be transformed to a solution with RHS 7 by
subtracting 1 from x3. x1 0, x2 1, x3 3,
x4 0 ? x1 0, x2 1, x3 2, x4 0
46Shadow price vs slack variable
Looking at the slack variable in the final
tableau reveals shadow prices.
x1 1x2 3x3 0x4 0 z 3
x1
x2
x4
x3
-z
1
0
-1
0
-2
0
0
-1/2
-1/3
1
-3
x1 4/3x2 11/3x3 -1x4 0 z 10/3
3
0
1
-3/2
3
1
0
1/3
-1/2
0
1
-2
1
0
1/2
1
0
1
2/3
-1/2
0
3
What is the optimal solution if x3 ? 0?
What is the optimal solution if x3 ? -1?
1/3
What is the shadow price for constraint 1?
47Quick Summary
- Connection between shadow prices and reduced
cost. If xj is the slack variable for a
constraint, then its reduced cost is the negative
of the shadow price for the constraint. - The reduced cost for a variable is its cost
coefficient in the final tableau - To do with your partner what is the shadow
price for the 2nd constraint (widgets on hand)?