Enum good_lp::solvers::ResolutionError[][src]

pub enum ResolutionError {
    Unbounded,
    Infeasible,
    Other(&'static str),
}

Represents an error that occurred when solving a problem.

Examples

Infeasible

use good_lp::*;
let mut vars = variables!();
let x = vars.add_variable(); // unbounded variable
let result = vars.maximise(x)
             .using(default_solver)
             .with(constraint!(x <= 9))
             .with(constraint!(x >= 10))
             .solve(); // x cannot be less than 9 and more than 10 at the same time
assert_eq!(result.err(), Some(ResolutionError::Infeasible));

Variants

Unbounded

The problem is unbounded. It doesn’t have a finite optimal values for its variables. The objective can be made infinitely large without violating any constraints.

Infeasible

There exists no solution that satisfies all of the constraints

Other(&'static str)

Another error occurred

Trait Implementations

impl Clone for ResolutionError[src]

impl Debug for ResolutionError[src]

impl Display for ResolutionError[src]

impl Error for ResolutionError[src]

impl PartialEq<ResolutionError> for ResolutionError[src]

impl StructuralPartialEq for ResolutionError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.