Trait good_lp::solvers::SolverModel[][src]

pub trait SolverModel {
    type Solution: Solution;
    type Error: Debug;
    fn solve(self) -> Result<Self::Solution, Self::Error>;
fn add_constraint(&mut self, c: Constraint) -> ConstraintReference; fn with(self, constraint: Constraint) -> Self
    where
        Self: Sized
, { ... } }

A solver’s own representation of a model, to which constraints can be added.

Associated Types

type Solution: Solution[src]

The type of the solution to the problem

type Error: Debug[src]

The error that can occur while solving the problem

Loading content...

Required methods

fn solve(self) -> Result<Self::Solution, Self::Error>[src]

Find the solution for the problem being modeled

fn add_constraint(&mut self, c: Constraint) -> ConstraintReference[src]

Adds a constraint to the Model and returns a reference to the index

Loading content...

Provided methods

fn with(self, constraint: Constraint) -> Self where
    Self: Sized
[src]

Takes a model and adds a constraint to it

Loading content...

Implementors

impl SolverModel for CoinCbcProblem[src]

This is supported on crate feature coin_cbc only.

impl SolverModel for HighsProblem[src]

This is supported on crate feature highs only.

impl SolverModel for LpSolveProblem[src]

This is supported on crate feature lpsolve only.

impl SolverModel for MiniLpProblem[src]

This is supported on crate feature minilp only.
Loading content...