pub trait ModelModifier: Sealed {
// Provided methods
fn add_constraint(
&self,
constraint: Expression,
) -> Result<(), ModificationFailure> { ... }
fn add_variable(
&self,
name: Name,
domain: Domain,
) -> Result<(), ModificationFailure> { ... }
}Expand description
A ModelModifier provides an interface to modify a model during solving.
Modifications are defined in terms of Conjure AST nodes, so must be translated to a solver specfic form before use.
It is implementation defined whether these constraints can be given at high level and passed through the rewriter, or only low-level solver constraints are supported.
See also: Solver::solve_mut.
Provided Methods§
fn add_constraint( &self, constraint: Expression, ) -> Result<(), ModificationFailure>
fn add_variable( &self, name: Name, domain: Domain, ) -> Result<(), ModificationFailure>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".