-
- All Superinterfaces:
Handler
- All Known Implementing Classes:
TimeoutMaxSATHandler
public interface MaxSATHandler extends Handler
Interface for a handler for MaxSAT solvers.- Since:
- 1.0
- Version:
- 2.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanaborted()Returns whether the computation was aborted by the handler.default voidfinishedSolving()This method is called when the MaxSAT solver finished solving.booleanfoundLowerBound(int lowerBound, Assignment model)This method is called when the MaxSAT solver found a new lower bound for a solution.booleanfoundUpperBound(int upperBound, Assignment model)This method is called when the MaxSAT solver found a new upper bound for a solution.intlowerBoundApproximation()Returns the last approximation of the result or -1 if there is no approximation for the lower bound.SATHandlersatHandler()Returns a SAT handler which can be used to cancel internal SAT calls of the MaxSAT solver.intupperBoundApproximation()Returns the last approximation of the result or -1 if there is no approximation for the lower bound.
-
-
-
Method Detail
-
satHandler
SATHandler satHandler()
Returns a SAT handler which can be used to cancel internal SAT calls of the MaxSAT solver.- Returns:
- a SAT handler
-
aborted
default boolean aborted()
Description copied from interface:HandlerReturns whether the computation was aborted by the handler.
-
foundLowerBound
boolean foundLowerBound(int lowerBound, Assignment model)This method is called when the MaxSAT solver found a new lower bound for a solution.- Parameters:
lowerBound- the cost of the lower boundmodel- the model of the lower bound, may be null if not applicable- Returns:
trueif the solving process should be continued, otherwisefalse
-
foundUpperBound
boolean foundUpperBound(int upperBound, Assignment model)This method is called when the MaxSAT solver found a new upper bound for a solution.- Parameters:
upperBound- the cost of the upper boundmodel- the model of the upper bound, may be null if not applicable- Returns:
trueif the solving process should be continued, otherwisefalse
-
finishedSolving
default void finishedSolving()
This method is called when the MaxSAT solver finished solving.
-
lowerBoundApproximation
int lowerBoundApproximation()
Returns the last approximation of the result or -1 if there is no approximation for the lower bound. If the handler does not cancel the solving process, it is not guaranteed that this method will return the optimal result. Use the respective method of the MaxSAT solver instead.- Returns:
- the last approximation of the result or -1 if no approximation is known
-
upperBoundApproximation
int upperBoundApproximation()
Returns the last approximation of the result or -1 if there is no approximation for the lower bound. If the handler does not cancel the solving process, it is not guaranteed that this method will return the optimal result. Use the respective method of the MaxSAT solver instead.- Returns:
- the last approximation of the result or -1 if no approximation is known
-
-