Week 9: LP Sensitivity Analysis & Shadow Prices

This week’s big question: you solved the LP and Solver handed back a plan. But the numbers in that model (the profit per product, the hours of each resource) are not facts, they are estimates that wobble for real reasons (flour and sugar prices move, wages change, an oven goes down). How much can each number drift before your “best plan” stops being best, and what is one more hour of a scarce resource actually worth? Sensitivity analysis answers those “what-if” questions straight off one report, without re-solving the LP every time a price ticks.

Before the week

  • Read: Taylor, Introduction to Management Science (13e): Chapter 3, “Linear Programming: Computer Solution and Sensitivity Analysis,” pp. 104–115 (focus: sensitivity analysis, objective-coefficient ranges and shadow prices). Where we say the right-hand-side range, the book says “constraint quantity values”. Also read one or two worked models from Chapter 4, “Linear Programming: Modeling Examples,” pp. 135–143; the chapter has eight and you do not need them all.
  • Warm-up self-check, binding constraints and reading a corner from Weeks 7–8:

This week we follow one running example all the way through. A small bakery makes cakes (\(x\)) and pies (\(y\)). Each cake earns \$4 profit, each pie \$3. The oven gives 10 hours a day and each cake needs 2 oven-hours to a pie’s 1; labor gives 8 hours and each item needs 1. So:

\[\max\ 4x + 3y \quad \text{s.t.}\quad 2x + y \le 10\ \text{(oven)},\;\; x + y \le 8\ \text{(labor)},\;\; x, y \ge 0.\]

Solver (or last week’s graph) returns the optimal plan 2 cakes, 6 pies, for profit \$26, at the corner where the oven and labor lines cross. Hold that solution in mind; both sessions ask “what happens to it when something changes?” One small but important point of form: the report only works when the model is in standard form: every decision variable on the left, the constant on the right (\(2x + y \le 10\), not \(2x \le 10 - y\)). The ranges you read are computed against the constraints written that way.

Session 1: Mon, Oct 19 · Objective-coefficient sensitivity (TBD)

🧩 Puzzle

The price of flour just jumped. Your accountant says the profit on a cake might drift anywhere from about \$3 to \$5 depending on ingredient costs this month. Does that mean you should re-plan the bakery every time the number moves? At what point does the optimal plan itself, bake 2 cakes and 6 pies, actually change?

Build the skill 1: the optimum holds over a range of coefficients

The optimal corner is fixed by which constraints meet there, not by the exact profit numbers. Nudge the profit on a cake up or down a little and the same corner \((2,6)\) still wins. The answer is stable. Push far enough, though, and a different corner becomes best and the plan jumps. Drag the profit-per-cake slider and watch the dashed objective line tilt; note where the green optimal corner suddenly hops to a new vertex:

Build the skill 2: the allowable range, and why it ends where it does

The band of profit-per-cake values over which \((2,6)\) stays optimal is the allowable range (or range of optimality) for that coefficient. Inside the range, the plan does not change (you keep baking 2 cakes and 6 pies) even though the profit total \(Z = 4x + 3y\) does move as the coefficient moves. Outside the range, the objective line has tilted enough that a neighboring corner pays more, and Solver would switch the plan.

The range ends at a slope, and the picture tells you exactly where. The objective line \(4x + 3y = Z\) has slope \(-\tfrac{c_{\text{cake}}}{3}\). As you raise the cake profit, the line tilts steeper; the corner \((2,6)\) keeps winning until the objective line becomes parallel to the oven line (\(2x + y = 10\), slope \(-2\)), which happens at cake profit \(= \$6\). Lower the cake profit instead and the line flattens until it is parallel to the labor line (\(x + y = 8\), slope \(-1\)), at cake profit \(= \$3\). So the computed range of optimality is

\(\$3 \le \text{cake profit} \le \$6\), with the pie’s profit held at \$3.

Your accountant’s \$3–\$5 estimate sits inside that band, so the plan is safe. (Note the lower edge, \$3, is right on the boundary: at exactly \$3 the corners \((2,6)\) and \((0,8)\) tie, so treat the very bottom of the range with caution.) This is the whole point of sensitivity analysis: you do not need a precise profit figure, only to know it sits inside the allowable range.

In practice: the range assumes everything else holds still

  • One number at a time (the most-tested trap). The allowable range for profit-per-cake is computed holding the pie’s profit, and every constraint, fixed. You may change only one coefficient at a time and trust the simple range. Changing several together is the classic exam mistake; simultaneous changes are not covered by the one-at-a-time ranges (the standard OR fix is the “100% rule,” which is beyond Taylor 13e and beyond this week).
  • “Infinite allowable increase” is not “unbounded profit.” A Sensitivity Report sometimes prints an infinite allowable increase for a coefficient. That just means raising that profit number never changes which plan is optimal, not that profit grows without limit. It is a real report value students misread.
  • Ranges come from the model, not the world. Solver’s Sensitivity Report prints these ranges, but they inherit every assumption in your LP. A mis-estimated coefficient gives a confidently wrong range.
  • A tie is a warning. Right at a range endpoint two corners earn the same. The plan is on a knife’s edge, and a tiny further change flips it. Treat near-endpoint coefficients with caution.

Back to the puzzle

The plan “2 cakes, 6 pies” stays optimal across the whole \$3–\$5 cake-profit band your accountant quoted, in fact the full range of optimality runs \$3 to \$6, and the corner does not budge until profit-per-cake leaves it. So you do not re-plan on every price wiggle; you re-plan only if the coefficient escapes the range. One report answers a month of “should we change the plan?” questions.

In-class group practice (wrap-up)

To close Session 1, reason about objective ranges and which resource is worth more, by hand, in your group. Write your group’s names on the sheet and hand it to your TA before you leave. It counts toward participation.

Session 2: Wed, Oct 21 · Shadow prices & RHS ranging (TBD)

🧩 Puzzle

You can rent the oven for one more hour. The bakery is at its optimum: 2 cakes, 6 pies, \$26 profit, and both the oven and labor are fully used. A neighbor offers you a single extra oven-hour. What is that hour worth to your profit, and how much rent would you pay for it?

Build the skill 1: the shadow price is the slope of optimal profit

A constraint that is used up at the optimum is binding: here both oven and labor bind at \((2,6)\). The shadow price of a binding constraint is the rate at which optimal profit \(Z^{*}\) rises for each extra unit of that resource. (You will see the same idea under other names: a Solver report may call it the dual price or the marginal value. Taylor defines it as “the dollar amount one would be willing to pay for one additional resource unit.” Same number, three labels.) Slide the oven hours right and watch the optimal corner travel and \(Z^{*}\) climb; the slope of that profit line is the shadow price:

Going from 10 to 11 oven-hours moves the optimum from \((2,6)\) to \((3,5)\), and profit rises from \$26 to \$27. That \$1 gain per extra oven-hour is the oven’s shadow price: about \$1 per hour. Translate it the way a manager would: the hour is worth \$1 to you, so any rent below \$1 is pure profit, exactly \$1 breaks even, and anything above \$1 loses money. The shadow price is the break-even price for that resource.

Build the skill 2: shadow prices rank your bottlenecks (and hold only over a range)

Not every resource is worth the same at the margin. Run the same reasoning on labor: raising labor from 8 to 9 hours moves the optimum to \((1,8)\) and profit from \$26 to \$28, so the labor shadow price is about \$2 per hour, twice the oven’s. If you can only buy one more hour of one resource, buy labor; it relieves the tighter bottleneck.

But a shadow price holds only over a range of right-hand-side values (the range of feasibility), and that range is bounded on both sides:

  • Add too much and the resource stops binding. Keep sliding oven-hours up and the optimum marches toward \((8,0)\); at about 16 oven-hours labor finally caps the plan and the oven gains slack. Past 16, an extra oven-hour is worth \$0. That is diminishing returns: \$1/hr while it bites, then nothing.
  • Cut too much and a different corner takes over. Drop oven-hours below about 8 and the basis changes (the optimum slides up the \(y\)-axis and an oven-hour starts to be worth more: the rate jumps to \$3/hr), so the \$1 rate no longer applies on the way down either.

So the oven’s \$1 shadow price is valid only across roughly 8 to 16 oven-hours. Inside that window each hour is worth exactly \$1; outside it, the bottleneck has moved and the rate is different. (This is Taylor’s labor “40 → 60 hours” exploration, reimagined with the bakery’s numbers.)

Build the skill 3: the other half of the report: reduced cost

Shadow prices live on the constraint side of the Sensitivity Report. The variable side answers a different question: why is a product left out of the plan, and what would change that? Suppose the bakery considers a third product (cookies) at \$2 profit each, using 1 oven-hour and 1 labor-hour per cookie. Solver still bakes 0 cookies. Why? Those same resources are worth \(1\times\$1 + 1\times\$2 = \$3\) at the current shadow prices, but a cookie only earns \$2: it loses \$1 of value versus baking cakes and pies. That \$1 gap is the cookie’s reduced cost: \(\$2 - \$3 = -\$1\). The cookie stays at zero until its profit rises by its reduced cost (here, until cookie profit reaches \$3) at which point baking a cookie finally breaks even and it can enter the plan. Reading the reduced-cost column tells you exactly how far a sidelined product is from being worth making.

Beyond the book. Taylor 13e’s sensitivity chapter covers objective-coefficient ranges, right-hand-side ranges, and shadow/dual values; reduced cost is a column Excel’s Solver Sensitivity Report adds, which we include here because you will see it on screen. The concept is standard. It’s the variable-side mirror of a shadow price. Just not part of Taylor’s prose.

In practice: shadow prices are marginal, local, and one-at-a-time

  • One change at a time. Each shadow price assumes you change that one right-hand side and nothing else. Buy more oven and more labor together and the separate shadow prices no longer simply add, the same one-at-a-time discipline as the objective ranges.
  • Non-binding means \$0, and you can lose its slack for free. A constraint with slack left over has a shadow price of \$0: more of it buys nothing. The mirror image is also true. You could give up an amount of that resource equal to its slack before anything in the plan changes. Do not pay for slack, and do not panic about losing a little of it.
  • Some “what-ifs” break the report entirely. The simple ranges cover changing one RHS or one objective coefficient. They do not cover changing a technological coefficient (say a richer recipe that makes a cake need 3 oven-hours instead of 2) or adding a brand-new constraint (a daily decorating-time limit). Those reshape the feasible region. You must re-solve, not read a range.
  • Read the Sensitivity Report. Solver prints each constraint’s shadow price and the RHS range over which it is valid, plus each product’s reduced cost. That report (not hand-recomputation) is the practical tool managers actually use.

Reading the Sensitivity Report: a quick legend

Everything this week lives in one of two blocks of the Excel report. Use this map on the take-home:

  • Variable Cells block (one row per product): Final Value (how many to make), Reduced Cost (Session 2, skill 3, how far a zero product is from entering), Objective Coefficient (the profit you typed), and Allowable Increase / Decrease (Session 1, the range of optimality around that coefficient).
  • Constraints block (one row per resource): Final Value (the LHS used), Shadow Price / dual price (Session 2. Value of one more unit), Constraint R.H. Side (the resource you have), and Allowable Increase / Decrease (Session 2, the range of feasibility over which the shadow price holds).

Back to the puzzle

One extra oven-hour is worth about \$1 of profit (the oven’s shadow price), so pay rent up to \$1: below \$1 is profit, \$1 is break-even, above \$1 is a loss. But an hour of labor is worth about \$2, so if you can only expand one resource, expand labor first. Both numbers hold only within their allowable RHS ranges (the oven’s \$1 across roughly 8–16 hours); buy too much and the bottleneck shifts and the price drops to \$0.

After-class check

Questions spanning objective-coefficient ranges, binding vs. non-binding constraints, shadow prices, reduced cost, and reading a Solver sensitivity report. Retry freely; nothing is submitted.

Weekly take-home (graded: submit on Canvas)

Everything for the take-home goes in one Excel workbook: a city sign shop making three products against three limits, with a business association offering to donate more of one resource. You formulate the model from the brief and wire it up as live formulas yourself, and in the Your model block you commit to a prediction about which limits will bind before you solve. Then you run Solver, take its Sensitivity Report, and read off the shadow prices, the range over which a shadow price still applies, the range over which your plan stays optimal, and the reduced cost of the one product your plan does not make. One resource turns out to be worth nothing at the margin. The report tells you which, and the exact price at which the unmade product would be worth making. Two short responses plus the required AI-use disclosure go on the Free responses sheet. Upload the completed .xlsx on Canvas. That one file is your entire submission.