Skip to main content

simplex

Function simplex 

Source
pub fn simplex(p: &LpProblem) -> Result<LpResult, GeomError>
Expand description

Solves a linear program by the two-phase simplex method.

Phase one minimises the total artificial infeasibility from an artificial-variable basis; a positive optimum there proves the problem infeasible, since that value is the least total violation achievable. Phase two then optimises the real objective from the feasible basis phase one produced.

Bland’s rule is used throughout, so the method terminates on any problem, including degenerate ones where a faster pivoting rule would cycle.

§Errors

Returns an error if the problem’s parts disagree in shape.