pub struct Model { /* private fields */ }Implementations§
Source§impl Model
impl Model
pub fn new() -> Self
pub fn with_config(self, config: SolverConfig) -> Self
pub fn add_variable(&mut self) -> Var
pub fn add_constraint( &mut self, lhs: impl Into<LinearExpr<Var>>, sense: ConstraintSense, rhs: impl Into<LinearExpr<Var>>, ) -> Constr
pub fn set_objective( &mut self, sense: ObjectiveSense, expression: impl Into<LinearExpr<Var>>, )
pub fn is_lp(&self) -> bool
pub fn to_standard(&self) -> StandardModel
pub fn solve(&mut self) -> Result<(), SolverError>
pub fn variables(&self) -> &Vec<Var>
pub fn constraints(&self) -> &Vec<Constr>
pub fn objective(&self) -> &Option<Objective>
pub fn solution(&self) -> &SolverSolution<Var>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl !RefUnwindSafe for Model
impl !Send for Model
impl !Sync for Model
impl Unpin for Model
impl !UnwindSafe for Model
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more