public abstract class AbstractSelectorVariablesDecorator extends SolverDecorator<ISolver> implements IOptimizationProblem
| Constructor and Description |
|---|
AbstractSelectorVariablesDecorator(ISolver solver) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
getExpectedNumberOfClauses() |
int |
getNbexpectedclauses() |
boolean[] |
getPrevboolmodel() |
int[] |
getPrevfullmodel() |
int[] |
getPrevmodel() |
boolean |
isOptimal()
Allows to check afterwards if the solution provided by the solver is
optimal or not.
|
boolean |
isSolutionOptimal() |
int[] |
model()
Provide a model (if any) for a satisfiable formula.
|
boolean |
model(int var)
Provide the truth value of a specific variable in the model.
|
void |
setExpectedNumberOfClauses(int nb)
To inform the solver of the expected number of clauses to read.
|
void |
setNbexpectedclauses(int nbexpectedclauses) |
void |
setPrevboolmodel(boolean[] prevboolmodel) |
void |
setPrevfullmodel(int[] prevfullmodel) |
void |
setPrevmodel(int[] prevmodel) |
void |
setSolutionOptimal(boolean isSolutionOptimal) |
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, 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, reset, setDBSimplificationAllowed, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, toString, toString, unsatExplanationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcalculateObjective, discard, discardCurrentSolution, forceObjectiveValueTo, getObjectiveValue, hasNoObjectiveFunction, nonOptimalMeansSatisfiable, setTimeoutForFindingBetterSolutionfindModel, findModel, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, nConstraints, newVar, nVars, primeImplicant, primeImplicant, printInfos, printInfospublic AbstractSelectorVariablesDecorator(ISolver solver)
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 SolverDecorator<ISolver>nb - the expected number of clauses.IProblem.newVar(int)public int getExpectedNumberOfClauses()
public boolean admitABetterSolution()
throws TimeoutException
IOptimizationProblemadmitABetterSolution in interface IOptimizationProblemTimeoutException - if the solver cannot answer in reasonable time.ISolver.setTimeout(int)public boolean admitABetterSolution(IVecInt assumps) throws TimeoutException
IOptimizationProblemadmitABetterSolution in interface IOptimizationProblemassumps - a set of literals in Dimacs format.TimeoutException - if the solver cannot answer in reasonable time.ISolver.setTimeout(int)public int[] model()
IProblemmodel in interface IProblemmodel in class SolverDecorator<ISolver>IProblem.isSatisfiable(),
IProblem.isSatisfiable(IVecInt)public boolean model(int var)
RandomAccessModelmodel in interface RandomAccessModelmodel in class SolverDecorator<ISolver>var - the variable id in Dimacs format#model()public boolean isOptimal()
IOptimizationProblemisOptimal in interface IOptimizationProblempublic int getNbexpectedclauses()
public void setNbexpectedclauses(int nbexpectedclauses)
public int[] getPrevfullmodel()
public void setPrevfullmodel(int[] prevfullmodel)
public int[] getPrevmodel()
public void setPrevmodel(int[] prevmodel)
public boolean[] getPrevboolmodel()
public void setPrevboolmodel(boolean[] prevboolmodel)
public boolean isSolutionOptimal()
public void setSolutionOptimal(boolean isSolutionOptimal)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.