How this calculation works
Construct a piecewise-affine optimal decision policy over a one- or two-parameter box by exact small-basis enumeration.
For a candidate optimal basis B, x_B(θ)=A_B^(-1)(b_B+E_B θ). Its critical region enforces primal feasibility and parameter-independent dual feasibility.A worked example
Minimize -x with 0≤x≤3 and x≤theta on theta∈[-1,4]. The model is infeasible for theta<0, x*=theta for 0≤theta≤3, and x*=3 for 3≤theta≤4.
Good to know
One to three bounded decision variables, one or two real parameters on a rational box, fixed rational objective and constraint matrix, and affine parameter dependence of right-hand sides. At most ten inequality rows after bounds. Exact basis enumeration, primal/dual validity regions and coverage checks; boundaries and degeneracy are explicit. Return one consistent optimal-basis policy, not all points on nonunique faces. Limit exhaustion leaves region completeness unresolved.
Define the entire parameter family
The objective coefficients and constraint matrix are fixed rational data. Only the right-hand sides depend affinely on one or two parameters. Each parameter has a finite rational interval, and together those intervals form the parameter box. This is a family of linear programs, not a single LP whose coefficient happens to be adjusted manually before each solve.
Each row is entered as coefficient dot x less than or equal to a constant plus parameterCoefficients dot theta. Variable bounds are finite and are incorporated as fixed rows. Keep the parameter order consistent across the box and every row. Swapping two parameter coordinates in only one part of the model defines a different family and can produce a plausible-looking but incorrect region map.
Compare this with the Linear and mixed integer programming calculator from constraints. Returns an optimizer map across a whole parameter interval or rectangle rather than solving one LP instance or reporting a local shadow price. The current LP has no parameter-domain partition or piecewise-affine solution map.
Understand affine optimizer regions
When an optimal basis remains valid, its active equations determine an affine decision vector as a function of theta. The remaining inequalities restrict where that vector is feasible. Dual feasibility determines whether the basis supports the fixed minimization objective. Together these conditions define a polyhedral critical region in the parameter interval or rectangle.
A region formula describes one selected optimal-basis policy. If an LP has an entire optimal face, there may be many valid optimizer maps, and different bases can overlap on full-dimensional or boundary subsets. The calculator uses a consistent deterministic convention rather than claiming to list every optimal point. Region boundaries deserve explicit treatment because active constraints and basis labels can change there while the objective remains continuous.
Enumerate bases and check coverage
With one through three decision variables and at most ten inequality rows after bounds, the implementation can enumerate candidate active sets of the required size. Singular sets are skipped as bases, and nonsingular sets yield exact rational affine formulas. Test their dual multipliers and substitute the formulas into all primal inequalities to construct the candidate regions.
Finding several valid regions is not enough to prove the complete policy has been found. The algorithm must check coverage of the feasible parameter domain and distinguish uncovered infeasible regions from unfinished enumeration. Work-limit exhaustion leaves completeness unresolved. Overlap handling must also preserve lower-dimensional boundary solutions instead of deleting a parameter value solely because it lies on several basis regions.
Check the scalar default family
For theta below zero, the conditions x≥0 and x≤theta contradict one another, so no decision is feasible. For theta between zero and three, minimizing minus x chooses the largest allowed x, namely theta. For theta above three, the fixed upper bound becomes limiting and the optimizer is three. These arguments resolve the entire parameter interval without numerical sampling.
The objective policy is minus theta on [0,3] and minus three on [3,4]. At theta equal to zero the unique feasible decision is zero. At theta equal to three both upper constraints are active, producing a degenerate basis boundary but a consistent optimizer value. Independent one-shot LP checks at negative, interior, boundary and saturated parameter values should reproduce all of these cases.
Read the parameter-space illustration
In the one-parameter picture, colored bands mark the infeasible, growing and saturated regimes. The accompanying line shows the optimizer formula rather than a trajectory generated by changing time. In two parameters the analogous critical regions are polygons inside a rectangle, each carrying its own affine decision formula and possibly sharing boundary segments.
A sampled heatmap can suggest region structure but cannot establish exact coverage or locate every narrow region. The calculator instead derives rational inequalities for the regions. Read the region constraints and optimizer formulas together, especially near degeneracy. Different colors may represent different optimal bases with the same decision formula, so a basis count is not automatically the number of distinct behaviors visible in the optimizer.
Respect rational and domain restrictions
All model coefficients and parameter endpoints are rational under the bounded exact parser. The parameter dependence belongs only on the right-hand side; parameter-dependent objectives or constraint matrices can create a different mathematical partition and are not accepted by silently substituting them into this algorithm. The variable bounds remain fixed across the full parameter box.
Exact rational arithmetic avoids rounding ambiguity at the derived boundaries, but it does not remove combinatorial work or fraction-growth limits. A cap should retain an unresolved completeness status. Do not replace an exact uncovered sliver with a dense sample grid and call the map complete. For a two-dimensional box, both polygon boundaries and lower-dimensional feasible portions require deliberate representation.
Choose a policy map rather than a sensitivity number
A shadow price from one LP describes local objective response under an unchanged basis. A multiparametric policy shows how that basis can change across an entire specified domain, including saturation and infeasible regions. The two analyses are related but answer different scopes of question. This page is useful when repeated decisions will be evaluated across known parameter ranges.
Save the parameter box, region inequalities, affine formulas and selection convention together. A list of a few numerical optima cannot reproduce a complete policy or disclose nonunique boundaries. The result does not optimize over the parameters themselves; it supplies a decision for each feasible parameter value. Choosing a distribution over parameters, a worst parameter or an adaptive control interpretation requires an additional application model.
A few questions, answered
Is this repeated sampled LP solving?
No. It derives affine optimizer formulas and exact region inequalities from candidate bases.
Can the objective depend on parameters?
This page holds the objective and constraint matrix fixed and varies only right-hand sides.
Why can regions overlap?
Degenerate or nonunique optima can make several bases valid at the same parameter values.
Does a cap prove missing regions are infeasible?
No. A cap leaves region completeness unresolved.