#[non_exhaustive]pub enum Error {
InvalidProblem(String),
ArtificialVariablesRequired,
NotDualFeasible(String),
NotOptimal,
IterationLimit(usize),
}Expand description
Errors returned by solve and reoptimize.
Infeasible and unbounded problems are not errors: they are reported
through Status.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidProblem(String)
The problem is malformed (e.g. a constraint with the wrong number of coefficients).
ArtificialVariablesRequired
Method::Simplex was requested but the problem has >= or =
constraints, which need artificial variables. Use BigM or TwoPhase.
NotDualFeasible(String)
Method::DualSimplex was requested but the slack basis is
not dual feasible (a cost with the wrong sign, or an equality constraint), so the dual
simplex cannot start. Use BigM or TwoPhase.
NotOptimal
reoptimize was given a previous solution that is not optimal, so
there is no basis to start from. Solve the extended problem from scratch instead.
IterationLimit(usize)
The iteration limit in Options was reached (possible cycling).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()