Struct z3::Optimize[][src]

pub struct Optimize<'ctx> { /* fields omitted */ }
Expand description

Context for solving optimization queries.

Implementations

Create a new optimize context.

Assert hard constraint to the optimization context.

See also:

Assert soft constraint to the optimization context. Weight is a positive, rational penalty for violating the constraint. Group is an optional identifier to group soft constraints.

See also:

Add a maximization constraint.

See also:

Add a minimization constraint.

See also:

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:

Backtrack one level.

Preconditions:

See also:

Check consistency and produce optimal values.

See also:

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.

Retrieve the objectives for the last Optimize::check()

This contains maximize/minimize objectives and grouped soft constraints.

Retrieve a string that describes the last status returned by Optimize::check().

Use this method when Optimize::check() returns SatResult::Unknown.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.