[−][src]Struct z3::Optimize
Context for solving optimization queries.
Methods
impl<'ctx> Optimize<'ctx>
[src]
pub fn new(ctx: &'ctx Context) -> Optimize<'ctx>
[src]
Create a new optimize context.
pub fn assert(&self, ast: &impl Ast<'ctx>)
[src]
Assert hard constraint to the optimization context.
See also:
pub fn maximize(&self, ast: &impl Ast<'ctx>)
[src]
pub fn minimize(&self, ast: &impl Ast<'ctx>)
[src]
pub fn push(&self)
[src]
Create a backtracking point.
The optimize solver contains a set of rules, added facts and assertions.
The set of rules, facts and assertions are restored upon calling
Optimize::pop()
.
See also:
pub fn pop(&self)
[src]
Backtrack one level.
Preconditions:
- The number of calls to
Optimize::pop
cannot exceed the number of calls toOptimize::push()
.
See also:
pub fn check(&self, assumptions: &[Bool<'ctx>]) -> SatResult
[src]
pub fn get_model(&self) -> Model<'ctx>
[src]
Retrieve the model for the last Optimize::check()
The error handler is invoked if a model is not available because
the commands above were not invoked for the given optimization
solver, or if the result was Z3_L_FALSE
.
pub fn get_reason_unknown(&self) -> Option<String>
[src]
Retrieve a string that describes the last status returned by Optimize::check()
.
Use this method when Optimize::check()
returns SatResult::Unknown
.
Trait Implementations
Auto Trait Implementations
impl<'ctx> !Send for Optimize<'ctx>
impl<'ctx> Unpin for Optimize<'ctx>
impl<'ctx> !Sync for Optimize<'ctx>
impl<'ctx> UnwindSafe for Optimize<'ctx>
impl<'ctx> RefUnwindSafe for Optimize<'ctx>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,