Chap 8
Chap 8
97
98 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
Max 3x+2y
Subject to
x+y <= 4
2x+y <= 6
x,y >= 0
The optimal tableau to this problem (after adding s1 and s2 as slacks to place in standard form)
is:
z x y s1 s2 RHS
1 0 0 1 1 10
0 0 1 2 ,1 2
0 1 0 ,1 1 2
Suppose the cost for x is changed to 3+ in the original formulation, from its previous value 3.
After doing the same operations as before, that is the same pivots, we would end up with the
tableau:
z x y s1 s2 RHS
1 , 0 1 1 10
0 0 1 2 ,1 2
0 1 0 ,1 1 2
Now this is not the optimal tableau: it does not have a correct basis (look at the column of x).
But we can make it correct in form while keeping the same basic variables by adding times the
last row to the cost row. This gives the tableau:
z x y s1 s2 RHS
1 0 0 1, 1+ 10 + 2
0 0 1 2 ,1 2
0 1 0 ,1 1 2
Note that this tableau has the same basic variables and the same variable values (except for z )
that our previous solution had. Does this represent an optimal solution? It does only if the cost
row is all non{negative. This is true only if
1, 0
1+ 0
which holds for ,1 1. For any in that range, our previous basis (and variable values) is
optimal. The objective changes to 10 + 2.
In the previous example, we changed the cost of a basic variable. Let's go through another
example. This example will show what happens when the cost of a nonbasic variable changes.
Max 3x+2y + 2.5w
Subject to
x+y +2w <= 4
2x+y +2w <= 6
x,y,w >= 0
8.1. TABLEAU SENSITIVITY ANALYSIS 99
Max 4x + 5y
Subject to (8.1)
2x + 3y <= 12
x + y <= 5
x; y >= 0
The optimal tableau, after adding slacks s1 and s2 is
z x y s1 s2 RHS
1 0 0 1 2 22
0 0 1 1 ,2 2
0 1 0 ,1 3 3
Now suppose instead of 12 units in the rst constraint, we only had 11. This is equivalent to
forcing s1 to take on value 1. Writing the constraints in the optimal tableau long{hand, we get
z + s1 + 2s2 = 22
100 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
y + s1 , 2s2 = 2
x , s1 + 3s2 = 3
If we force s1 to 1 and keep s2 at zero (as a nonbasic variable should be), the new solution
would be z = 21, y = 1, x = 4. Since all variables are nonnegative, this is the optimal solution.
In general, changing the amount of the right{hand{side from 12 to 12+ in the rst constraint
changes the tableau to:
z x y s1 s2 RHS
1 0 0 1 2 22 +
0 0 1 1 ,2 2 +
0 1 0 ,1 3 3 ,
This represents an optimal tableau as long as the righthand side is all non{negative. In other
words, we need between ,2 and 3 in order for the basis not to change. For any in that range,
the optimal objective will be 22 + . For example, with equals 2, the new objective is 24 with
y = 4 and x = 1.
Similarly, if we change the right{hand{side of the second constraint from 5 to 5 + in the
original formulation, we get an objective of 22 + 2 in the nal tableau, as long as ,1 1.
Perhaps the most important concept in sensitivity analysis is the shadow price of a constraint:
i
If the RHS of Constraint i changes by in the original formulation, the optimal objective value
changes by . The shadow price can be found in the optimal tableau. It is the reduced cost
i i
of the slack variable s . So it is found in the cost row (Row 0) in the column corresponding the
i
slack for Constraint i. In this case, 1 = 1 (found in Row 0 in the column of s1 ) and 2 = 2 (found
in Row 0 in the column of s2 ). The value is really the marginal value of the resource associated
i
with Constraint i. For example, the optimal objective value (currently 22) would increase by 2
if we could increase the RHS of the second constraint by = 1. In other words, the marginal
value of that resource is 2, i.e. we are willing to pay up to 2 to increase the right hand side of
the second constraint by 1 unit. You may have noticed the similarity of interpretation between
shadow prices in linear programming and Lagrange multipliers in constrained optimization. Is this
just a coincidence? Of course not. This parallel should not be too surprising since, after all, linear
programming is a special case of constrained optimization. To derive this equivalence (between
shadow prices and optimal Lagrange multipiers), one could write the KKT conditions for the linear
program...but we will skip this in this course!
In summary, changing the right{hand{side of a constraint is identical to setting the correspond-
ing slack variable to some value. This gives us the shadow price (which equals the reduced cost for
the corresponding slack) and the ranges.
be sucient to oset this, so the objective coecient must be more than 10 (exactly 10 would lead
to an alternative optimal solution with no change in objective).
Example 8.1.1 A factory can produce four products denoted by P1, P2, P3 and P4. Each product
must be processed in each of two workshops. The processing times (in hours per unit produced)
are given in the following table.
P1 P2 P3 P4
Workshop 1 3 4 8 6
Workshop 2 6 2 5 8
400 hours of labour are available in each workshop. The prot margins are 4, 6, 10, and 9
dollars per unit of P1 , P2 , P3 and P4 produced, respectively. Everything that is produced can be
sold. Thus, maximizing prots, the following linear program can be used.
MAX 4 X1 + 6 X2 + 10 X3 + 9 X4
SUBJECT TO
3 X1 + 4 X2 + 8 X3 + 6 X4 <= 400 Row 1
6 X1 + 2 X2 + 5 X3 + 8 X4 <= 400 Row 2
X1, X2, X3, X4 >= 0
Introducing slack variables s1 and s2 in Rows 1 and 2, respectively, and applying the simplex
method, we get the nal tableau:
z x1 x2 x3 x4 s1 s2 RHS
1 0:5 0 2 0 1:5 0 600
0 0:75 1 2 1:5 0:25 0 100
0 4:5 0 1 5 ,0:5 1 200
(a) How many units of P1, P2 , P3 and P4 should be produced in order to maximize prots?
(b) Assume that 20 units of P3 have been produced by mistake. What is the resulting decrease
in prot?
(c) In what range can the prot margin per unit of P1 vary without changing the optimal basis?
(d) In what range can the prot margin per unit of P2 vary without changing the optimal basis?
(e) What is the marginal value of increasing the production capacity of Workshop 1?
(f) In what range can the capacity of Workshop 1 vary without changing the optimal basis?
(g) Management is considering the production of a new product P5 that would require 2 hours
in Workshop 1 and ten hours in Workshop 2. What is the minimum prot margin needed on
this new product to make it worth producing?
Answers:
(a) From the nal tableau, we read that x2 = 100 is basic and x1 = x3 = x4 = 0 are nonbasic.
So 100 units of P2 should be produced and none of P1, P3 and P4 . The resuting prot is $ 600 and
that is the maximum possible, given the constraints.
102 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
(b) The reduced cost for x3 is 2 (found in Row 0 of the nal tableau). Thus, the eect on prot
of producing x3 units of P3 is ,2x3 . If 20 units of P3 have been produced by mistake, then the prot
will be 2 20 = $40 lower than the maximum stated in (a).
(c) Let 4 + be the prot margin on P1 . The reduced cost remains nonnegative in the nal
tableau if 0:5 , 0. That is 0:5. Therefore, as long as the prot margin on P1 is less than
4:5, the optimal basis remains unchanged.
(d) Let 6 + be the prot margin on P2 . Since x2 is basic, we need to restore a correct basis.
This is done by adding times Row 1 to Row 0. This eects the reduced costs of the nonbasic
variables, namely x1, x3 , x4 and s1 . All these reduced costs must be nonnegative. This implies:
0:5 + 0:75 0
2 + 2 0
0 + 1:5 0
1:5 + 0:25 0.
Combining all these inequalities, we get 0. So, as long as the prot margin on P2 is 6 or
greater, the optimal basis remains unchanged.
(e) The marginal value of increasing capacity in Workshop 1 is 1 = 1:5.
(f) Let 400 + be the capacity of Workshop 1. The resulting RHS in the nal tableau will be:
100 + 0:25 in Row 1, and
200 , 0:5 in Row 2.
The optimal basis remains unchanged as long as these two quantities are nonnegative. Namely,
,400 400. So, the optimal basis remains unchanged as long as the capacity of Workshop 1
is in the range 0 to 800.
(g) The eect on the optimum prot of producing x5 units of P5 would be 1(2x5) + 2(10x5) =
1:5(2x5) + 0(10x5) = 3x5. If the prot margin on P5 is sucient to oset this, then P5 should be
produced. That is, we should produce P5 if its prot margin is at least 3.
Exercise 67 A paper mill converts pulpwood to low, medium and high grade newsprint. The
pulpwood requirements for each newsprint, availability of each pulpwood, and selling price (per
ton) are shown below:
Low Medium High Available
grade grade grade (tons)
Virginia pine 2 2 1 180
White pine 1 2 3 120
Loblolly pine 1 1 2 160
Price $900 $1000 $1200
The associated linear program is
z x1 x2 x3 s1 s2 s3 RHS
1 0 200 0 300 300 0 90; 000
0 1 0:8 0 0:6 ,0:2 0 84
0 0 0:4 1 ,0:2 0:4 0 12
0 0 ,0:6 0 ,0:2 ,0:6 1 52
(a) In what range can the price of low grade paper vary without changing the optimal basis?
(b) What is the new optimal solution if the price of low grade paper changes to $800?
(c) At what price should medium grade paper be sold to make it protable to produce?
(d) In what range can the availability of Virginia pine vary without changing the optimal basis?
(e) If 10 additional tons of Virginia pine are obtained, by how much will the optimal prot
increase?
(f) If the pulpwood resources are increased as in (e), what is the new optimal solution (i.e. the
optimal production levels of low, medium and high grade newsprint)?
(g) What would the plant manager be willing to pay for an additional ton of Loblolly pine?
Exercise 68 Snacks 'R Us is deciding what to produce in the upcoming month. Due to past
purchases, they have 500 lb of walnuts, 1000 lb of peanuts, and 500 lb of chocolate. They currently
sell three mixes: Trail Mix, which consists of 1 lb of each material; Nutty Crunch, which has two
pounds of peanuts and 1 lb of walnut; and Choc-o-plenty, which has 2 pounds of chocolate and 1 lb
of peanuts. They can sell an unlimited amount of these mixes, except they can sell no more than
100 units of Choc-o-plenty. The income on the three mixes is $2, $3, and $4, respectively. The
problem of maximizing total income subject to these constraints is
Maximize 2x1 + 3x2 + 4x3
Subject to
x1 + x2 500
x1 + 2x2 + x3 1000
x1 + 2x3 500
x3 100
x 0 for all i
i
The optimal tableau for this problem is (after adding slacks for the four constraints):
z x1 x2 x3 s1 s2 s3 s4 RHS
1 0 0 0 1 1 0 3 1800
0 1 0 0 2 ,1 0 1 100
0 0 1 0 ,1 1 0 ,1 400
0 0 0 0 ,2 1 1 ,3 200
0 0 0 1 0 0 0 1 100
Using the above tableau, determine the following:
(a) What is the solution represented by this tableau (both production quantities and total
income)? How do we know it is the optimal tableau?
Production quantities:
104 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
Total income:
Optimal? Reason:
(b) Suppose the income for Trail Mix (x1 ) is only an estimate. For what range of values would
the basis given by the above tableau still be optimal? What would be the solution (both production
quantities and total income), if the income was only $2.75?
Range: Lower: Upper:
Solution for $2.75: Total Income Production:
(c) How much should Snacks 'R Us willing to spend to procure an extra pound of peanuts?
How about a pound of walnuts? How about an extra pound of chocolate?
Peanuts: Walnuts: Chocolate:
(d) For what range of peanut{stock values is the basis given by the above tableau still optimal?
What would be the solution (both production quantities and total objective) if there were only 900
lbs of peanuts available?
Range: Lower: Upper:
Solution for 900 lbs: Total Income Production:
(e) A new product, Extra-Walnutty Trail Booster, consists of 1 lb of each of peanuts and
chocolate, and 2 lb of walnuts. What income do we need to make on this product in order to
consider producing it?
Income: Reason:
MIN 15 X1 + 10 X2 + 9 X3 + 7 X4
SUBJECT TO
2 X1 + 3 X2 + 4 X3 + 5 X4 <= 3300
8.2. SOLVER OUTPUT 105
3 X1 + 4 X2 + 5 X3 + 6 X4 <= 4000
X3 >= 400
X1 + X2 + X3 + X4 = 1000
X1, X2, X3, X4 >= 0
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$11 X1 400 0 15 1E+30 3.5
$B$12 X2 200 0 10 2 1E+30
$B$13 X3 400 0 9 1E+30 4
$B$14 X4 0 7 7 1E+30 7
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$18 Labor 3000 0 3300 1E+30 300
$B$19 Material 4000 -5 4000 300 200
$B$20 Plant3Min 400 4 400 100 400
$B$21 Total 1000 30 1000 66.6667 100
2. How much will it cost to produce one more vehicle? How much will we save by producing
one less?
3. How would our solution change if it cost only $8,000 to produce at plant 2? For what ranges
of costs is our solution (except for the objective value) valid for plant 2?
5. How much is our union contract costing us? What would be the value of reducing the 400
car limit down to 200 cars? To 0 cars? What would be the cost of increasing it by 100 cars?
by 200 cars?
6. How much is our raw material worth (to get one more unit)? How many units are we willing
to buy at that price? What will happen if we want more?
106 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
7. A new plant is being designed that will use only one unit of workers and 4 units of raw
material. What is the maximum cost it can have in order for us to consider using it?
8. By how much can the costs at plant 1 increase before we would not produce there?
8.2.2 Carla's Maps
Carla Lee, a current MBA student, decides to spend her summer designing and marketing bicycling
maps of Western Pennsylvania. She has designed 4 maps, corresponding to four quadrants around
Pittsburgh. The maps dier in size, colors used, and complexity of the topographical relief (the
maps are actually 3-dimensional, showing hills and valleys). She has retained a printer to produce
the maps. Each map must be printed, cut, and folded. The time (in minutes) to do this for the
four types of maps is:
Print Cut Fold
A 1 2 3
B 2 4 2
C 3 1 5
D 3 3 3
Avail 15000 20000 20000
The printer has a limited amount of time in his schedule, as noted in the table.
The prot per map, based on the projected selling price minus printers cost and other variable
cost, comes out to approximately $1 for A and B and $2 for C and D. In order to have a suciently
nice display, at least 1000 of each type must be produced.
This gives the formulation:
MAX A + B + 2 C + 2 D
SUBJECT TO
A + 2 B + 3 C + 3 D <= 15000
2 A + 4 B + C + 3 D <= 20000
3 A + 2 B + 5 C + 3 D <= 20000
A >= 1000
B >= 1000
C >= 1000
D >= 1000
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$11 XA 1500 0 1 1 0.333333
$B$12 XB 1000 0 1 0.333333 1E+30
$B$13 XC 1000 0 2 0.333333 1E+30
$B$14 XD 2833.333 0 2 1 0.5
8.2. SOLVER OUTPUT 107
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$17 Print 15000 0.5 15000 100 366.6667
$B$18 Cut 16500 0 20000 1E+30 3500
$B$19 Fold 20000 0.166667 20000 7000 1000
$B$20 MinA 1500 0 1000 500 1E+30
$B$21 MinB 1000 -0.333333 1000 1750 1000
$B$22 MinC 1000 -0.333333 1000 500 1000
$B$23 MinD 2833.333 0 1000 1833.333 1E+30
2. How much is Carla willing to pay for extra printing time? cutting time? folding time? For
each, how many extra hours are we willing to buy at that price?
3. Suppose we reduced the 1000 limit on one item to 900. Which map should be decreased, and
how much more would Carla make?
4. A fth map is being thought about. It would take 2 minutes to print, 2 minutes to cut, and 3
minutes to fold. What is the least amount of prot necessary in order to consider producing
this map? What is the eect of requiring 1000 of these also?
5. The marketing analysis on D is still incomplete, though it is known that the prot of $2 per
item is within $.25 of the correct value. It will cost $500 to complete the analysis. Should
Carla continue with the analysis?
Exercise 69 Recall the Red Dwarf toaster example (Exercise 61).
From Answer report: Final Cost: 7833.33
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$1 Manual 633.3333333 0 7 0.5 1E+30
$B$2 SemiAut 333.3333333 0 8 1E+30 0.25
$B$3 Robotic 33.33333333 0 8.5 0.5 2.5
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
108 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
$B$5 Total 1000 10.83333333 1000 170 100
$B$6 Skilled 2233.333333 0 4500 1E+30 2266.666667
$B$7 Unskill 36000 -0.083333333 36000 1000 6800
$B$8 Assembly 2700 -0.166666667 2700 500 100
(a) What is the optimal allocation of production? What is the average cost/toaster of produc-
tion.
(b) By how much can the cost of robots increase before we will change that production plan.
(c) How much is Red Dwarf willing to pay for more assembly room time? How many units is
Red Dwarf willing to purchase at that price?
(d) How much will we save if we decide to produce only 950 toasters?
(e) A new production process is available that uses only 2 minutes of skilled labor, 10 minutes
of unskilled labor, and an undetermined amount of assembly
oor time. Its production cost is
determined to be $10. What is the maximum assembly
oor time that the process can take before
it is deemed too expensive to use?
Answer:
(a) 633.3 should be produced manually, 333.3 should be produced semiautomatically, and 33.3
produced robotically, for an average cost of $7.383/toaster.
(b) It can increase by $0.50.
(c) Value is $0.16/minute, willing to purchase 500 at that price.
(d) Objective will go down by 50(10.833).
(e) Cost of $10 versus marginal cost of $10.833, leave 0.83. Unskilled labor costs $0.0833/unit.
Therefore, if the new process takes any time at all, it will be deemed too expensive.
Exercise 70 Kennytrail Amusement park is trying to divide its new 50 acre park into one of three
categories: rides, food, and shops. Each acre used for rides generates $150/hour prot; each acre
used for food generates $200/hour prot. Shops generate $300/hour prot. There are a number of
restrictions on how the space can be divided.
1. Only 10 acres of land is suitable for shops.
2. Zoning regulations require at least 1000 trees in the park. A food acre has 30 trees; a ride
acre has 20 trees; while a shop acre has no trees.
3. No more than 200 people can work in the park. It takes 3 people to work an acre of rides, 6
to work an acre of food, and 5 to work an acre of shops.
The resulting linear program and Solver output is attached:
MAX 150 RIDE + 200 FOOD + 300 SHOP
SUBJECT TO
RIDE + FOOD + SHOP <= 50
SHOP <= 10
20 RIDE + 30 FOOD >= 1000
3 RIDE + 6 FOOD + 5 SHOP <= 200
-------------------------------------------------------------------
8.2. SOLVER OUTPUT 109
Answer report:
Adjustable Cells
Cell Name Original Value Final Value
$B$1 Ride 0 31.25
$B$2 Food 0 12.5
$B$3 Shop 0 6.25
Constraints
Cell Name Cell Value Formula Status Slack
$B$6 Land 50 $B$6<=$D$6 Binding 0
$B$7 ShopLim 6.25 $B$7<=$D$7 Not Binding 3.75
$B$8 Trees 1000 $B$8>=$D$8 Binding 0
$B$9 Workers 200 $B$9<=$D$9 Binding 0
-----------------------------------------------------------------------------
Sensitivity report:
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$1 Ride 31.25 0 150 83.33333333 76.6666667
$B$2 Food 12.5 0 200 115 125
$B$3 Shop 6.25 0 300 1E+30 116.666667
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$6 Land 50 143.75 50 10 16.66666667
$B$7 ShopLim 6.25 0 10 1E+30 3.75
$B$8 Trees 1000 -4.375 1000 166.66667 100
$B$9 Workers 200 31.25 200 30 50
For each of the following changes, either nd the answer or state that the information is not
available from the Solver output. In the latter case, state why not.
(a) What is the optimal allocation of the space? What is the prot/hour of the park?
Optimal Allocation: Prot/hour:
(b) Suppose Food only made a prot of $180/hour. What would be the optimal allocation of
the park, and what would be the prot/hour of the park?
Optimal Allocation: Prot/hour:
110 CHAPTER 8. SENSITIVITY ANALYSIS FOR LINEAR PROGRAMMING
(c) City Council wants to increase our tree requirement to 1020. How much will that cost us
(in $/hour). What if they increased the tree requirement to 1200?
Increase to 1020: Increase to 1200:
(d) A construction rm is willing to convert 5 acres of land to make it suitable for shops. How
much should Kennytrail be willing to pay for this conversion (in $/hour).
Maximum payment:
(e) Kennytrail is considering putting in a waterslide. Each acre of waterslide can have 2 trees
and requires 4 workers. What prot/hour will the waterslide have to generate for them to consider
adding it?
Minimum Prot: Reason:
(f) An adjacent parcel of land has become available. It is ve acres in size. The owner wants
to share in our prots. How much $/hour is Kennytrail willing to pay?
Maximum payment:
Exercise 71 Attached is the sensitivity report for the Diet Problem (see Section 5.4.1 in Chap-
ter 5).
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$14 oatmeal 4 -3.1875 3 3.1875 1E+30
$B$15 chicken 0 12.46875 24 1E+30 12.46875
$B$16 eggs 0 4 13 1E+30 4
$B$17 milk 4.5 0 9 2.6923 1.38095
$B$18 pie 2 -3.625 20 3.625 1E+30
$B$19 pork&beans 0 4.375 19 1E+30 4.375
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$23 Energy 2000 0.05625 2000 560 100
$B$24 Protein 60 0 55 5 1E+30
$B$25 Calcium 1334.5 0 800 534.5 1E+30
6. During midterms, you need a daily diet with energy content increased from 2000 kcal to 2200
kcal. What is the resulting additional cost?
7. Your doctor recommends that you increase the calcium requirement in your diet from 800 mg
to 1200 mg. What is the eect on total cost?
8. Potatoes cost 12 cents/serving and have energy content of 300 kcal per serving, but no protein
nor calcium content. Should they be part of the diet?
Exercise 72 Attached is the sensitivity report for the Workforce Planning Problem (see Sec-
tion 5.4.2 in Chapter 5).
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$14 Shift1 4 0 1 0.5 1
$B$15 Shift2 7 0 1 0 0.333333
$B$16 Shift3 1 0 1 0.5 0
$B$17 Shift4 4 0 1 0.5 0
$B$18 Shift5 3 0 1 0 0.333333
$B$19 Shift6 3 0 1 0.5 1
$B$20 Shift7 0 0.333333 1 1E+30 0.333333
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$24 Monday 14 0.333333 14 1.5 6
$B$25 Tuesday 17 0 13 4 1E+30
$B$26 Wednesday 15 0.333333 15 6 3
$B$27 Thursday 16 0 16 3 4
$B$28 Friday 19 0.333333 19 4.5 3
$B$29 Saturday 18 0.333333 18 1.5 6
$B$30 Sunday 11 0 11 4 1