Struct conjure_core::model::Model
source · pub struct Model {
pub variables: SymbolTable,
pub constraints: Expression,
pub context: Arc<RwLock<Context<'static>>>,
/* private fields */
}
Fields§
§variables: SymbolTable
§constraints: Expression
§context: Arc<RwLock<Context<'static>>>
Implementations§
source§impl Model
impl Model
pub fn new( variables: SymbolTable, constraints: Expression, context: Arc<RwLock<Context<'static>>>, ) -> Model
pub fn new_empty(context: Arc<RwLock<Context<'static>>>) -> Model
pub fn update_domain(&mut self, name: &Name, new_domain: Domain)
pub fn get_domain(&self, name: &Name) -> Option<&Domain>
pub fn add_variable(&mut self, name: Name, decision_var: DecisionVariable)
pub fn get_constraints_vec(&self) -> Vec<Expression>
pub fn set_constraints(&mut self, constraints: Vec<Expression>)
pub fn set_context(&mut self, context: Arc<RwLock<Context<'static>>>)
pub fn add_constraint(&mut self, expression: Expression)
pub fn add_constraints(&mut self, expressions: Vec<Expression>)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Model
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)