public class OptToPBSATAdapter extends PBSolverDecorator
| Constructor and Description |
|---|
OptToPBSATAdapter(IOptimizationProblem problem) |
| Modifier and Type | Method and Description |
|---|---|
Number |
getCurrentObjectiveValue()
Return the value of the objective function in the last model found.
|
boolean |
isOptimal() |
boolean |
isSatisfiable()
Check the satisfiability of the set of constraints contained inside the
solver.
|
boolean |
isSatisfiable(boolean global)
Check the satisfiability of the set of constraints contained inside the
solver.
|
boolean |
isSatisfiable(IVecInt myAssumps)
Check the satisfiability of the set of constraints contained inside the
solver.
|
boolean |
isSatisfiable(IVecInt myAssumps,
boolean global)
Check the satisfiability of the set of constraints contained inside the
solver.
|
int[] |
model()
Provide a model (if any) for a satisfiable formula.
|
boolean |
model(int var)
Provide the truth value of a specific variable in the model.
|
int[] |
model(PrintWriter out)
Compute a minimal model according to the objective function of the
IPBProblem decorated.
|
void |
setTimeoutForFindingBetterSolution(int seconds)
Allow to set a specific timeout when the solver is in optimization mode.
|
String |
toString(String prefix)
Display a textual representation of the solver configuration.
|
addAtLeast, addAtLeast, addAtMost, addAtMost, addExactly, addExactly, addPseudoBoolean, getObjectiveFunction, setObjectiveFunctionaddAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, addExactly, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSolverKeptHot, isVerbose, modelWithInternalVariables, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, primeImplicant, printInfos, printInfos, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, toString, unsatExplanationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, addExactly, clearLearntClauses, expireTimeout, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSolverKeptHot, isVerbose, modelWithInternalVariables, newVar, nextFreeVarId, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, unsatExplanationfindModel, findModel, nConstraints, newVar, nVars, primeImplicant, primeImplicant, printInfos, printInfospublic OptToPBSATAdapter(IOptimizationProblem problem)
public boolean isSatisfiable()
throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>TimeoutExceptionpublic boolean isSatisfiable(boolean global)
throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>global - whether that call is part of a global process (i.e.
optimization) or not. if (global), the timeout will not be
reset between each call.TimeoutExceptionpublic boolean isSatisfiable(IVecInt myAssumps, boolean global) throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>myAssumps - a set of literals (represented by usual non null integers in
Dimacs format).global - whether that call is part of a global process (i.e.
optimization) or not. if (global), the timeout will not be
reset between each call.TimeoutExceptionpublic boolean isSatisfiable(IVecInt myAssumps) throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>myAssumps - a set of literals (represented by usual non null integers in
Dimacs format).TimeoutExceptionpublic int[] model()
IProblemmodel in interface IProblemmodel in class SolverDecorator<IPBSolver>IProblem.isSatisfiable(),
IProblem.isSatisfiable(IVecInt)public int[] model(PrintWriter out)
out - a writer to display information in verbose modepublic boolean model(int var)
RandomAccessModelmodel in interface RandomAccessModelmodel in class SolverDecorator<IPBSolver>var - the variable id in Dimacs format#model()public String toString(String prefix)
ISolvertoString in interface ISolvertoString in class SolverDecorator<IPBSolver>prefix - the prefix to use on each line.public boolean isOptimal()
public Number getCurrentObjectiveValue()
public void setTimeoutForFindingBetterSolution(int seconds)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.