org.sat4j.pb
Class PseudoOptDecorator
java.lang.Object
org.sat4j.tools.SolverDecorator<IPBSolver>
org.sat4j.pb.PBSolverDecorator
org.sat4j.pb.PseudoOptDecorator
- All Implemented Interfaces:
- Serializable, IPBSolver, IOptimizationProblem, IProblem, ISolver
- Direct Known Subclasses:
- PseudoIteratorDecorator
public class PseudoOptDecorator
- extends PBSolverDecorator
- implements IOptimizationProblem
A decorator that computes minimal pseudo boolean models.
- Author:
- daniel
- See Also:
- Serialized Form
Methods inherited from class org.sat4j.tools.SolverDecorator |
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, addExactly, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getLogPrefix, getSearchListener, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isVerbose, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, printInfos, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, setDBSimplificationAllowed, setExpectedNumberOfClauses, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, toString, unsatExplanation |
Methods inherited from interface org.sat4j.specs.ISolver |
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, addExactly, clearLearntClauses, expireTimeout, getLogPrefix, getSearchListener, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isVerbose, newVar, nextFreeVarId, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, setDBSimplificationAllowed, setExpectedNumberOfClauses, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, unsatExplanation |
PseudoOptDecorator
public PseudoOptDecorator(IPBSolver solver)
isSatisfiable
public boolean isSatisfiable()
throws TimeoutException
- Specified by:
isSatisfiable
in interface IProblem
- Overrides:
isSatisfiable
in class SolverDecorator<IPBSolver>
- Throws:
TimeoutException
isSatisfiable
public boolean isSatisfiable(boolean global)
throws TimeoutException
- Specified by:
isSatisfiable
in interface IProblem
- Overrides:
isSatisfiable
in class SolverDecorator<IPBSolver>
- Throws:
TimeoutException
isSatisfiable
public boolean isSatisfiable(IVecInt assumps,
boolean global)
throws TimeoutException
- Specified by:
isSatisfiable
in interface IProblem
- Overrides:
isSatisfiable
in class SolverDecorator<IPBSolver>
- Throws:
TimeoutException
isSatisfiable
public boolean isSatisfiable(IVecInt assumps)
throws TimeoutException
- Specified by:
isSatisfiable
in interface IProblem
- Overrides:
isSatisfiable
in class SolverDecorator<IPBSolver>
- Throws:
TimeoutException
setObjectiveFunction
public void setObjectiveFunction(ObjectiveFunction objf)
- Description copied from interface:
IPBSolver
- Provide an objective function to the solver.
- Specified by:
setObjectiveFunction
in interface IPBSolver
- Overrides:
setObjectiveFunction
in class PBSolverDecorator
- Parameters:
objf
- the objective function
admitABetterSolution
public boolean admitABetterSolution()
throws TimeoutException
- Specified by:
admitABetterSolution
in interface IOptimizationProblem
- Throws:
TimeoutException
admitABetterSolution
public boolean admitABetterSolution(IVecInt assumps)
throws TimeoutException
- Specified by:
admitABetterSolution
in interface IOptimizationProblem
- Throws:
TimeoutException
hasNoObjectiveFunction
public boolean hasNoObjectiveFunction()
- Specified by:
hasNoObjectiveFunction
in interface IOptimizationProblem
nonOptimalMeansSatisfiable
public boolean nonOptimalMeansSatisfiable()
- Specified by:
nonOptimalMeansSatisfiable
in interface IOptimizationProblem
calculateObjective
public Number calculateObjective()
- Specified by:
calculateObjective
in interface IOptimizationProblem
discardCurrentSolution
public void discardCurrentSolution()
throws ContradictionException
- Specified by:
discardCurrentSolution
in interface IOptimizationProblem
- Throws:
ContradictionException
reset
public void reset()
- Specified by:
reset
in interface ISolver
- Overrides:
reset
in class SolverDecorator<IPBSolver>
model
public int[] model()
- Specified by:
model
in interface IProblem
- Overrides:
model
in class SolverDecorator<IPBSolver>
model
public boolean model(int var)
- Specified by:
model
in interface IProblem
- Overrides:
model
in class SolverDecorator<IPBSolver>
toString
public String toString(String prefix)
- Specified by:
toString
in interface ISolver
- Overrides:
toString
in class SolverDecorator<IPBSolver>
getObjectiveValue
public Number getObjectiveValue()
- Specified by:
getObjectiveValue
in interface IOptimizationProblem
discard
public void discard()
throws ContradictionException
- Specified by:
discard
in interface IOptimizationProblem
- Throws:
ContradictionException
forceObjectiveValueTo
public void forceObjectiveValueTo(Number forcedValue)
throws ContradictionException
- Specified by:
forceObjectiveValueTo
in interface IOptimizationProblem
- Throws:
ContradictionException
isOptimal
public boolean isOptimal()
- Specified by:
isOptimal
in interface IOptimizationProblem
modelWithInternalVariables
public int[] modelWithInternalVariables()
- Specified by:
modelWithInternalVariables
in interface ISolver
- Overrides:
modelWithInternalVariables
in class SolverDecorator<IPBSolver>
Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.