Struct rplex::Variable [−][src]
pub struct Variable { /* fields omitted */ }
Expand description
A Variable in a Problem.
The general usage pattern is to create Variables outside of a
Problem with var!(...)
and then add them to the Problem with
prob.add_variable(...)
.
#[macro_use]
extern crate rplex;
use rplex::{Env, Problem, Variable};
fn main() {
let env = Env::new().unwrap();
let mut prob = Problem::new(&env, "dummy").unwrap();
prob.add_variable(var!("x" -> 4.0 as Binary)).unwrap();
prob.add_variable(var!(0.0 <= "y" <= 100.0 -> 3.0 as Integer)).unwrap();
prob.add_variable(var!(0.0 <= "z" <= 4.5 -> 2.0)).unwrap();
}
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Variable
impl UnwindSafe for Variable
Blanket Implementations
Mutably borrows from an owned value. Read more