public final class MaxSatDecorator extends AbstractSelectorVariablesDecorator
| Constructor and Description | 
|---|
| MaxSatDecorator(ISolver solver) | 
| MaxSatDecorator(ISolver solver,
               boolean equivalence) | 
| Modifier and Type | Method and Description | 
|---|---|
| IConstr | addClause(IVecInt literals)Create a clause from a set of literals The literals are represented by
 non null integers such that opposite literals a represented by opposite
 values. | 
| boolean | admitABetterSolution(IVecInt assumps)Look for a solution of the optimization problem when some literals are
 satisfied. | 
| Number | calculateObjective()Compute the value of the objective function for the current solution. | 
| void | discard()Discard the current solution in the optimization problem. | 
| 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 | nonOptimalMeansSatisfiable()A suboptimal solution has different meaning depending of the optimization
 problem considered. | 
| void | reset()Clean up the internal state of the solver. | 
| void | setExpectedNumberOfClauses(int nb)To inform the solver of the expected number of clauses to read. | 
| void | setTimeoutForFindingBetterSolution(int seconds)Allow to set a specific timeout when the solver is in optimization mode. | 
admitABetterSolution, getExpectedNumberOfClauses, getNbexpectedclauses, getPrevboolmodel, getPrevfullmodel, getPrevmodel, isOptimal, isSolutionOptimal, model, model, setNbexpectedclauses, setPrevboolmodel, setPrevfullmodel, setPrevmodel, setSolutionOptimaladdAllClauses, addAtLeast, addAtMost, addBlockingClause, addExactly, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, isSolverKeptHot, isVerbose, modelWithInternalVariables, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, primeImplicant, printInfos, printInfos, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, setDBSimplificationAllowed, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setUnitClauseProvider, setVerbose, toString, toString, unsatExplanationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindModel, findModel, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, nConstraints, newVar, nVars, primeImplicant, primeImplicant, printInfos, printInfospublic MaxSatDecorator(ISolver solver)
public MaxSatDecorator(ISolver solver, boolean equivalence)
public void setExpectedNumberOfClauses(int nb)
ISolverp cnf line is
 read in dimacs formatted input file.
 
 Note that this method is supposed to be called AFTER a call to
 newVar(int)setExpectedNumberOfClauses in interface ISolversetExpectedNumberOfClauses in class AbstractSelectorVariablesDecoratornb - the expected number of clauses.IProblem.newVar(int)public IConstr addClause(IVecInt literals) throws ContradictionException
ISolveraddClause in interface ISolveraddClause in class SolverDecorator<ISolver>literals - a set of literalsContradictionException - iff the vector of literals is empty or if it contains only
             falsified literals after unit propagationISolver.removeConstr(IConstr)public void reset()
ISolverreset in interface ISolverreset in class SolverDecorator<ISolver>public boolean hasNoObjectiveFunction()
IOptimizationProblempublic boolean nonOptimalMeansSatisfiable()
IOptimizationProblempublic Number calculateObjective()
IOptimizationProblemIOptimizationProblem.getObjectiveValue()public void discardCurrentSolution()
                            throws ContradictionException
IOptimizationProblemContradictionException - if a trivial inconsistency is detected.public boolean admitABetterSolution(IVecInt assumps) throws TimeoutException
IOptimizationProblemadmitABetterSolution in interface IOptimizationProblemadmitABetterSolution in class AbstractSelectorVariablesDecoratorassumps - a set of literals in Dimacs format.TimeoutException - if the solver cannot answer in reasonable time.ISolver.setTimeout(int)public void discard()
             throws ContradictionException
IOptimizationProblemContradictionException - if a trivial inconsistency is detected.IOptimizationProblem.discardCurrentSolution()public Number getObjectiveValue()
IOptimizationProblempublic void forceObjectiveValueTo(Number forcedValue) throws ContradictionException
IOptimizationProblemContradictionExceptionpublic void setTimeoutForFindingBetterSolution(int seconds)
IOptimizationProblemCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.