public interface OptimizationProverEnvironment extends BasicProverEnvironment<Void>, AutoCloseable
| Modifier and Type | Interface and Description |
|---|---|
static class |
OptimizationProverEnvironment.OptStatus
Status of the optimization problem.
|
BasicProverEnvironment.AllSatCallback<R>NO_MODEL_HELP| Modifier and Type | Method and Description |
|---|---|
OptimizationProverEnvironment.OptStatus |
check()
Optimize the objective function subject to the previously imposed constraints.
|
Model |
getModel()
Get a satisfying assignment.
|
Optional<Rational> |
lower(int handle,
Rational epsilon) |
int |
maximize(Formula objective)
Add the maximization
objective. |
int |
minimize(Formula objective)
Add minimization
objective. |
Optional<Rational> |
upper(int handle,
Rational epsilon) |
addConstraint, allSat, close, getModelAssignments, getUnsatCore, isUnsat, isUnsatWithAssumptions, pop, push, push, unsatCoreOverAssumptionsint maximize(Formula objective)
objective.
Note: push/pop may be used for switching objectives
int minimize(Formula objective)
objective.
Note: push/pop may be used for switching objectives
OptimizationProverEnvironment.OptStatus check() throws InterruptedException, SolverException
InterruptedExceptionSolverExceptionOptional<Rational> upper(int handle, Rational epsilon)
epsilon - Value to substitute for the epsilon.Optional<Rational> lower(int handle, Rational epsilon)
epsilon - Value to substitute for the epsilon.Model getModel() throws SolverException
BasicProverEnvironment.isUnsat()
call that returned false. A model might contain additional symbols with their
evaluation, if a solver uses its own temporary symbols. There should be at least an
value-assignment for each free symbol.
Please note that the prover is allowed to use standard numbers for any real variable in the
model after a sat-query returned OptimizationProverEnvironment.OptStatus.OPT. For integer formulas, we expect the
optimal assignment.
Example 1: For the constraint 'x<10' with a real x, the upper bound of x is '10-epsilon' (epsilon can even be set to zero). The model can return the assignment x=9. To get an optimal assignment, query the solver with an additional constraint 'x == 10-epsilon'.
Example 2: For the constraint 'x<10' with a integer x, the upper bound of x is '9' (epsilon is irrelevant here and can be zero). The model returns the optimal assignment x=9.
getModel in interface BasicProverEnvironment<Void>SolverException