Linear Programming Capacity Sensitivity Calculator
Hold the rest of a bounded two-variable model fixed. Explore how a changing resource limit alters feasibility, the best objective and the value of another unit of capacity.
Find where extra capacity changes the best plan
Sweep one resource bound and see exactly where its marginal value changes.
Two-variable model and capacity window
Maximize the objective over continuous nonnegative x and y. Use a consistent unit for each constraint.
Two values in the order x, y.
Nonnegative x and y.
The two coefficients in ax + by ≤ capacity.
Enter low, high.
Enter a decimal or fraction inside the range.
One row a, b, c per ax + by ≤ c. Enter up to three rows.
3 objective segments in the feasible range.
Allocation and marginal value at the probe
- First feasible capacity in range
- 0
- Maximum at probe
- 8
- Marginal value just below
- 2
- Marginal value just above
- 2
x = 2 · y = 1
Binding rows at this allocation · x upper bound / Swept constraint
Inspect the sensitivity range
View exact sensitivity segments
| Capacity from / through | Objective from / through | Shadow price |
|---|---|---|
| 0 2 | 0 6 | 3 |
| 2 5 | 6 12 | 2 |
| 5 6 | 12 12 | 0 |
Export the sensitivity audit
Save all constraints, objective segments and the probe allocation.
View CSV text
How to use this calculator
- Enter the two objective coefficients and finite upper bounds for x and y.
- Enter the two coefficients for the swept resource constraint, its capacity range and any fixed rows.
- Compare the best objective and shadow price profiles. Type a capacity in the probe field for its optimal allocation and one-sided marginal values.
- Open the exact segments or download the constraint and allocation ledger.
The Formula
The mathematical logic powering this calculation is:
Maximize px + qy over continuous x and y with lower bounds zero and finite entered upper bounds. Every fixed row has the form ax + by ≤ c. The swept row has the form ux + vy ≤ r, where r varies over the entered closed capacity range.
At any fixed capacity, a nonempty bounded polygon has at least one optimal vertex, even when the feasible set is a line or point. Intersect every pair of nonparallel constraint boundaries. Each intersection has coordinates affine in r. For each candidate, substitute those coordinates into all constraints and intersect the resulting capacity intervals using exact fractions. Discard an intersection if it is infeasible throughout the window.
Each remaining candidate has an affine objective value over its feasible interval. Sort all interval endpoints and every capacity where two feasible candidate objectives cross. Between adjacent cut points, the feasible candidates and their relative order remain the same. Use the best of those affine objectives to describe the full interval. Merge adjacent intervals with the same objective rule. The slope of each interval is the marginal objective value, or shadow price, per extra unit of r. At a breakpoint the slopes just below and above can differ. The probe chooses one optimal vertex and lists the rows binding there.
Enter five pairs or values as shown and up to three fixed constraint rows. All coefficients, bounds, and window limits are decimals of magnitude up to 1,000,000 with six fractional places. The probe can also take a simple fraction inside the window. Slopes are computed only inside this modeled range. Use the full Linear Programming Calculator for larger models, minimization or other relation types.Worked Example
If you input:
- Objective coefficients: 3, 2
- Variable upper bounds: 2, 3
- Swept constraint coefficients: 1, 1
- Capacity range: −1 to 6
- Capacity to inspect: 3
Result:
The first feasible capacity is 0. The shadow price falls from 3 to 2 at capacity 2 and falls to zero at capacity 5. At capacity 3, x = 2 and y = 1 give objective 8.
Frequently Asked Questions
Why does the shadow price change?
A different constraint can become limiting as capacity expands. A breakpoint marks a change in the slope of the maximum objective. A zero slope means extra capacity does not improve the model’s objective on that interval.
Why can there be two shadow prices at a breakpoint?
The objective can gain at one rate as you approach the breakpoint and at another rate after you cross it. The report gives the two one-sided rates separately.
How should I enter a minimum requirement?
Multiply both sides by −1 to convert it to a less-than-or-equal row. For a minimum total x + y of 2, enter −1, −1, −2.
How are multiple optimal allocations handled?
The chart displays the best objective across all feasible allocations. At the probe, the worksheet returns one optimal vertex. Other vertices or points between them can attain the same objective.
Similar Calculators
Linear Programming Calculator
Maximize or minimize a linear objective with variable bounds and constraints. Inspect simplex steps, exact certificates and equally good plans.
Graph Linear Inequalities in Two Variables
Graph strict and inclusive linear inequalities in x and y. Check exact point membership, open boundaries and the dimension of the intersection.
System of Equations Calculator
Solve 2–4 simultaneous linear equations with exact fractions, elimination steps, a two-variable graph, and checks for unique, infinite or no solutions.
