Trait good_lp::Solution [−][src]
A problem solution
Required methods
fn value(&self, variable: Variable<F>) -> f64
[src]
Get the optimal value of a variable of the problem
Provided methods
fn eval(&self, expr: &Expression<F>) -> f64 where
Self: Sized,
[src]
Self: Sized,
Example
use good_lp::{variables, variable, coin_cbc, SolverModel, Solution}; let mut vars = variables!(); let a = vars.add(variable().max(1)); let b = vars.add(variable().max(4)); let objective = a + b; let solution = vars.maximise(objective.clone()).using(coin_cbc).solve().unwrap(); assert_eq!(solution.eval(&objective), 5.);