org.sat4j.pb
Class PseudoOptDecorator

java.lang.Object
  extended by org.sat4j.tools.SolverDecorator<IPBSolver>
      extended by org.sat4j.pb.PBSolverDecorator
          extended by org.sat4j.pb.PseudoOptDecorator
All Implemented Interfaces:
java.io.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

Constructor Summary
PseudoOptDecorator(IPBSolver solver)
           
 
Method Summary
 boolean admitABetterSolution()
           
 boolean admitABetterSolution(IVecInt assumps)
           
 java.lang.Number calculateObjective()
           
 void discard()
           
 void discardCurrentSolution()
           
 void forceObjectiveValueTo(java.lang.Number forcedValue)
           
 java.lang.Number getObjectiveValue()
           
 boolean hasNoObjectiveFunction()
           
 boolean isSatisfiable()
           
 boolean isSatisfiable(boolean global)
           
 boolean isSatisfiable(IVecInt assumps)
           
 boolean isSatisfiable(IVecInt assumps, boolean global)
           
 int[] model()
           
 boolean model(int var)
           
 boolean nonOptimalMeansSatisfiable()
           
 void reset()
           
 void setObjectiveFunction(ObjectiveFunction objf)
           
 java.lang.String toString(java.lang.String prefix)
           
 
Methods inherited from class org.sat4j.pb.PBSolverDecorator
addPseudoBoolean, getObjectiveFunction
 
Methods inherited from class org.sat4j.tools.SolverDecorator
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, nConstraints, newVar, newVar, nextFreeVarId, nVars, printInfos, printStat, printStat, removeConstr, removeSubsumedConstr, setDBSimplificationAllowed, setExpectedNumberOfClauses, setSearchListener, 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.IProblem
findModel, findModel, nConstraints, nVars, printInfos
 
Methods inherited from interface org.sat4j.specs.ISolver
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, clearLearntClauses, expireTimeout, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, newVar, newVar, nextFreeVarId, printStat, printStat, removeConstr, removeSubsumedConstr, setDBSimplificationAllowed, setExpectedNumberOfClauses, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts
 

Constructor Detail

PseudoOptDecorator

public PseudoOptDecorator(IPBSolver solver)
Method Detail

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)
Specified by:
setObjectiveFunction in interface IPBSolver
Overrides:
setObjectiveFunction in class PBSolverDecorator

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 java.lang.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 java.lang.String toString(java.lang.String prefix)
Specified by:
toString in interface ISolver
Overrides:
toString in class SolverDecorator<IPBSolver>

getObjectiveValue

public java.lang.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(java.lang.Number forcedValue)
                           throws ContradictionException
Specified by:
forceObjectiveValueTo in interface IOptimizationProblem
Throws:
ContradictionException


Copyright © 2009 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.