pub struct Model { /* private fields */ }Expand description
A constraint programming model that owns variables and constraints.
Models are the root of object lifetimes and create variables, constraints, and solvers associated with the same backend instance.
Implementations§
Source§impl Model
impl Model
Sourcepub fn int_var<'b, X>(&'b self, x: X, name: Option<&str>) -> IntVar<'b>
pub fn int_var<'b, X>(&'b self, x: X, name: Option<&str>) -> IntVar<'b>
New integer variable associated with this model. x can be:
- a single integer value (constant variable)
- a slice of possible integer values
Sourcepub fn int_var_bounded<'b, X, Y>(
&'b self,
x: X,
y: Y,
name: Option<&str>,
bounded: Option<bool>,
) -> IntVar<'b>
pub fn int_var_bounded<'b, X, Y>( &'b self, x: X, y: Y, name: Option<&str>, bounded: Option<bool>, ) -> IntVar<'b>
New bounded integer variable associated with this model. x and y shall be integer values bounded: Force bounded (True) or enumerated domain (False). If None, Choco will automatically choose the best option.
pub fn bool_var<'model>( &'model self, value: Option<bool>, name: Option<&str>, ) -> BoolVar<'model>
pub fn solver(&self) -> Solver<'_>
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl !Send for Model
impl !Sync for Model
impl Unpin for Model
impl UnsafeUnpin 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