|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.tools.SolverDecorator<IPBSolver>
org.sat4j.pb.PBSolverDecorator
org.sat4j.pb.OptToPBSATAdapter
public class OptToPBSATAdapter
Utility class to use optimization solvers instead of simple SAT solvers in code meant for SAT solvers.
| Constructor Summary | |
|---|---|
OptToPBSATAdapter(org.sat4j.specs.IOptimizationProblem problem)
|
|
| Method Summary | |
|---|---|
boolean |
isSatisfiable()
|
boolean |
isSatisfiable(boolean global)
|
boolean |
isSatisfiable(org.sat4j.specs.IVecInt assumps)
|
boolean |
isSatisfiable(org.sat4j.specs.IVecInt assumps,
boolean global)
|
int[] |
model()
|
boolean |
model(int var)
|
java.lang.String |
toString(java.lang.String prefix)
|
| Methods inherited from class org.sat4j.pb.PBSolverDecorator |
|---|
addPseudoBoolean, getExplanation, setListOfVariablesForExplanation, setObjectiveFunction |
| Methods inherited from class org.sat4j.tools.SolverDecorator |
|---|
addAllClauses, addAtLeast, addAtMost, addClause, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getStat, getTimeout, isDBSimplificationAllowed, nConstraints, newVar, newVar, nVars, printInfos, printStat, printStat, removeConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setTimeout, setTimeoutMs, setTimeoutOnConflicts |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sat4j.specs.ISolver |
|---|
addAllClauses, addAtLeast, addAtMost, addClause, clearLearntClauses, expireTimeout, getStat, getTimeout, isDBSimplificationAllowed, newVar, newVar, printStat, printStat, removeConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setTimeout, setTimeoutMs, setTimeoutOnConflicts |
| Methods inherited from interface org.sat4j.specs.IProblem |
|---|
findModel, findModel, nConstraints, nVars, printInfos |
| Constructor Detail |
|---|
public OptToPBSATAdapter(org.sat4j.specs.IOptimizationProblem problem)
| Method Detail |
|---|
public boolean isSatisfiable()
throws org.sat4j.specs.TimeoutException
isSatisfiable in interface org.sat4j.specs.IProblemisSatisfiable in class org.sat4j.tools.SolverDecorator<IPBSolver>org.sat4j.specs.TimeoutException
public boolean isSatisfiable(boolean global)
throws org.sat4j.specs.TimeoutException
isSatisfiable in interface org.sat4j.specs.IProblemisSatisfiable in class org.sat4j.tools.SolverDecorator<IPBSolver>org.sat4j.specs.TimeoutException
public boolean isSatisfiable(org.sat4j.specs.IVecInt assumps,
boolean global)
throws org.sat4j.specs.TimeoutException
isSatisfiable in interface org.sat4j.specs.IProblemisSatisfiable in class org.sat4j.tools.SolverDecorator<IPBSolver>org.sat4j.specs.TimeoutException
public boolean isSatisfiable(org.sat4j.specs.IVecInt assumps)
throws org.sat4j.specs.TimeoutException
isSatisfiable in interface org.sat4j.specs.IProblemisSatisfiable in class org.sat4j.tools.SolverDecorator<IPBSolver>org.sat4j.specs.TimeoutExceptionpublic int[] model()
model in interface org.sat4j.specs.IProblemmodel in class org.sat4j.tools.SolverDecorator<IPBSolver>public boolean model(int var)
model in interface org.sat4j.specs.IProblemmodel in class org.sat4j.tools.SolverDecorator<IPBSolver>public java.lang.String toString(java.lang.String prefix)
toString in interface org.sat4j.specs.ISolvertoString in class org.sat4j.tools.SolverDecorator<IPBSolver>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||