How this calculation works
Linear programming chooses values of several variables to optimize a linear objective while satisfying all entered constraints and bounds. This calculator converts the model to a nonnegative-variable form and solves it with exact rational two-phase simplex. A continuous optimum is checked using a feasible primal point and nonnegative dual multipliers with equal objective value. Mixed mode adds branch and bound for selected bounded integer variables. It distinguishes an optimum, an infeasible model, an improving unbounded direction and a resource limit rather than collapsing those outcomes into one generic error.
Optimize cᵀx subject to entered linear relations and l≤x≤u; selected coordinates can also satisfy xᵢ∈Z.A worked example
Maximize x+y subject to 2x+y≤4, x+2y≤4 and x,y≥0. The continuous optimum is x=y=4/3, giving 8/3. Multipliers 1/3 on each inequality certify the same bound: adding one third of both rows gives x+y≤8/3. If x and y must be integers with bounds zero through four, the best objective is two, for example at (2,0), (1,1) or (0,2). Rounding both continuous coordinates independently is not an integer-optimization proof.
Good to know
Supports 1–8 original variables and at most 24 rational constraint rows. Coefficients follow the bounded exact parser. Continuous variables may have absent bounds or be free. Integer variables require finite lower and upper bounds; their endpoints may themselves be fractional and are rounded inward to feasible integers. Limits are 2,000 simplex pivots per relaxation, 2,000 branch nodes, 10,000 total branch pivots and bounded fraction growth. Hitting a limit raises an error without claiming optimality or infeasibility. Nonlinear terms and logical constraints are unsupported.
Reference: SciPy — linear programming formulation and bounds (opens in a new tab) ↗
Variable bounds and constraint direction are part of the mathematical model
A missing lower bound is not the same as zero. A free variable may be positive or negative, while a nonnegative variable cannot represent a signed adjustment without a transformation. This page makes every lower and upper bound explicit in an ordered table. Equality constraints impose both directions simultaneously. Reversing an inequality changes the feasible region, so the parser retains the selected relation instead of assuming every input row is an upper bound.
Phase one first searches for feasibility when the standard starting basis is unavailable. Phase two then improves the actual objective. Exact rational pivots avoid deciding whether a small residual is zero by an unstated tolerance. At an optimum, the mapped solution is substituted back into the original bounds and relations. A dual bound matching its objective provides a separate optimality certificate, not just a message that the algorithm stopped changing the variables.
Integer decisions require a discrete search, not cosmetic rounding
A fractional relaxation can bound a branch without supplying a valid integer answer. Branch and bound selects a fractional integer coordinate and splits its domain at the neighboring integers. Infeasible branches are discarded; a continuous objective bound can also prove that a branch cannot beat the current integer solution. Only after every remaining branch is eliminated or bounded does a feasible incumbent become a certified discrete optimum.
An unbounded continuous relaxation does not automatically prove an integer model is feasible. This solver requires finite domains for its integer coordinates and continues the appropriate feasibility branching before accepting an improving continuous ray. Multiple optimal points are possible, and the returned point need not be the only one. The Local maximum and minimum calculator with derivative graph instead analyzes a scalar function; it does not enforce a collection of coupled linear inequalities or integer variable domains.
A few questions, answered
Can I omit the upper bound on a continuous variable?
Yes. Enter inf in its upper-bound column. Enter -inf,inf for a fully free continuous variable. Integer variables need finite bounds on this bounded solver.
Does infeasible mean the objective is too expensive?
No. It means no values satisfy the stated constraints, bounds and integrality conditions. An unbounded objective instead has feasible values but no finite optimum in the chosen direction.