|
||||||||||
| 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.ConstraintRelaxingPseudoOptDecorator
public class ConstraintRelaxingPseudoOptDecorator
| Constructor Summary | |
|---|---|
ConstraintRelaxingPseudoOptDecorator(IPBSolver solver)
|
|
| Method Summary | |
|---|---|
boolean |
admitABetterSolution()
Look for a solution of the optimization problem. |
boolean |
admitABetterSolution(IVecInt assumps)
Look for a solution of the optimization problem when some literals are satisfied. |
Number |
calculateObjective()
Deprecated. |
void |
discard()
Deprecated. |
void |
discardCurrentSolution()
Discard the current solution in the optimization problem. |
void |
forceObjectiveValueTo(Number forcedValue)
Force the value of the objective function. |
Number |
getObjectiveValue()
Read only access to the value of the objective function for the current solution. |
boolean |
hasNoObjectiveFunction()
If the optimization problem has no objective function, then it is a simple decision problem. |
boolean |
isOptimal()
Allows to check afterwards if the solution provided by the solver is optimal or not. |
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 assumps)
Check the satisfiability of the set of constraints contained inside the solver. |
boolean |
isSatisfiable(IVecInt assumps,
boolean global)
Check the satisfiability of the set of constraints contained inside the solver. |
boolean |
nonOptimalMeansSatisfiable()
A suboptimal solution has different meaning depending of the optimization problem considered. |
String |
toString(String prefix)
Display a textual representation of the solver configuration. |
| Methods inherited from class org.sat4j.pb.PBSolverDecorator |
|---|
addAtLeast, addAtLeast, addAtMost, addAtMost, addExactly, addExactly, addPseudoBoolean, getObjectiveFunction, setObjectiveFunction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.sat4j.specs.IProblem |
|---|
findModel, findModel, model, model, nConstraints, newVar, nVars, primeImplicant, primeImplicant, printInfos |
| Constructor Detail |
|---|
public ConstraintRelaxingPseudoOptDecorator(IPBSolver solver)
| Method Detail |
|---|
public boolean isSatisfiable()
throws TimeoutException
IProblem
isSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>TimeoutException
public boolean isSatisfiable(boolean global)
throws TimeoutException
IProblem
isSatisfiable 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.
TimeoutException
public boolean isSatisfiable(IVecInt assumps,
boolean global)
throws TimeoutException
IProblem
isSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>assumps - 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.
TimeoutException
public boolean isSatisfiable(IVecInt assumps)
throws TimeoutException
IProblem
isSatisfiable in interface IProblemisSatisfiable in class SolverDecorator<IPBSolver>assumps - a set of literals (represented by usual non null integers in
Dimacs format).
TimeoutException
public boolean admitABetterSolution()
throws TimeoutException
IOptimizationProblem
admitABetterSolution in interface IOptimizationProblemTimeoutException - if the solver cannot answer in reasonable time.ISolver.setTimeout(int)
public boolean admitABetterSolution(IVecInt assumps)
throws TimeoutException
IOptimizationProblem
admitABetterSolution in interface IOptimizationProblemassumps - a set of literals in Dimacs format.
TimeoutException - if the solver cannot answer in reasonable time.ISolver.setTimeout(int)public boolean hasNoObjectiveFunction()
IOptimizationProblem
hasNoObjectiveFunction in interface IOptimizationProblempublic boolean nonOptimalMeansSatisfiable()
IOptimizationProblem
nonOptimalMeansSatisfiable in interface IOptimizationProblem@Deprecated public Number calculateObjective()
IOptimizationProblem
calculateObjective in interface IOptimizationProblemIOptimizationProblem.getObjectiveValue()public Number getObjectiveValue()
IOptimizationProblem
getObjectiveValue in interface IOptimizationProblem
public void forceObjectiveValueTo(Number forcedValue)
throws ContradictionException
IOptimizationProblem
forceObjectiveValueTo in interface IOptimizationProblemContradictionException@Deprecated public void discard()
IOptimizationProblem
discard in interface IOptimizationProblemIOptimizationProblem.discardCurrentSolution()public void discardCurrentSolution()
IOptimizationProblem
discardCurrentSolution in interface IOptimizationProblempublic boolean isOptimal()
IOptimizationProblem
isOptimal in interface IOptimizationProblempublic String toString(String prefix)
ISolver
toString in interface ISolvertoString in class SolverDecorator<IPBSolver>prefix - the prefix to use on each line.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||