Expand description
Linear programming by the two-phase simplex method.
Solves minimise cᵀx subject to
A_ub x <= b_ub(inequalities),A_eq x = b_eq(equalities), and- per-variable bounds
lower <= x <= upper(default0 <= x < ∞; usef64::NEG_INFINITY/f64::INFINITYfor free sides).
The problem is converted to standard form (shifting or splitting variables as the bounds require, adding slack variables), phase one finds a feasible basis with artificial variables, and phase two optimises. Pivoting uses Bland’s rule, so the method cannot cycle on degenerate problems; it is reliable rather than fast, and is intended for problems of up to a few hundred variables and constraints. To maximise, negate the objective.
See the book entry Linear programming.
Structs§
- Linear
Program - A linear program (see the module docs). Build with
LinearProgram::newand thewith_*methods. - LpSolution
- The solution of a linear program.
xandobjectiveare meaningful only whenstatusisLpStatus::Optimal.
Enums§
- LpStatus
- The outcome class of a solve.