public class SumLeximinDecompositionOWAOptimizer extends Object implements IMultiObjOptimizationProblem, IIntegerPBSolver
| Modifier and Type | Field and Description |
|---|---|
protected List<IntegerVariable> |
objBoundVariables |
| Constructor and Description |
|---|
SumLeximinDecompositionOWAOptimizer(IIntegerPBSolver solver,
BigInteger[] weights) |
SumLeximinDecompositionOWAOptimizer(IIntegerPBSolver solver,
int[] weights) |
protected final List<IntegerVariable> objBoundVariables
public SumLeximinDecompositionOWAOptimizer(IIntegerPBSolver solver, int[] weights)
public SumLeximinDecompositionOWAOptimizer(IIntegerPBSolver solver, BigInteger[] weights)
public boolean admitABetterSolution()
throws TimeoutException
admitABetterSolution in interface IOptimizationProblemTimeoutExceptionpublic boolean admitABetterSolution(IVecInt assumps) throws TimeoutException
admitABetterSolution in interface IOptimizationProblemTimeoutExceptionprotected void setInitConstraints()
protected BigInteger minObjValuesBound()
public boolean hasNoObjectiveFunction()
hasNoObjectiveFunction in interface IOptimizationProblempublic boolean nonOptimalMeansSatisfiable()
nonOptimalMeansSatisfiable in interface IOptimizationProblempublic Number calculateObjective()
calculateObjective in interface IOptimizationProblempublic Number getObjectiveValue()
getObjectiveValue in interface IOptimizationProblempublic void forceObjectiveValueTo(Number forcedValue) throws ContradictionException
forceObjectiveValueTo in interface IOptimizationProblemContradictionExceptionpublic void discard()
throws ContradictionException
discard in interface IOptimizationProblemContradictionExceptionpublic void discardCurrentSolution()
throws ContradictionException
discardCurrentSolution in interface IOptimizationProblemContradictionExceptionpublic boolean isOptimal()
isOptimal in interface IOptimizationProblempublic void setTimeoutForFindingBetterSolution(int seconds)
setTimeoutForFindingBetterSolution in interface IOptimizationProblempublic void addObjectiveFunction(ObjectiveFunction obj)
addObjectiveFunction in interface IMultiObjOptimizationProblempublic BigInteger[] getObjectiveValues()
getObjectiveValues in interface IMultiObjOptimizationProblempublic boolean model(int var)
model in interface RandomAccessModelpublic int[] modelWithInternalVariables()
modelWithInternalVariables in interface ISolverpublic int[] primeImplicant()
primeImplicant in interface IProblempublic boolean primeImplicant(int p)
primeImplicant in interface IProblempublic boolean isSatisfiable()
throws TimeoutException
isSatisfiable in interface IProblemTimeoutExceptionpublic boolean isSatisfiable(IVecInt assumps, boolean globalTimeout) throws TimeoutException
isSatisfiable in interface IProblemTimeoutExceptionpublic boolean isSatisfiable(boolean globalTimeout)
throws TimeoutException
isSatisfiable in interface IProblemTimeoutExceptionpublic boolean isSatisfiable(IVecInt assumps) throws TimeoutException
isSatisfiable in interface IProblemTimeoutExceptionpublic int[] findModel()
throws TimeoutException
findModel in interface IProblemTimeoutExceptionpublic int[] findModel(IVecInt assumps) throws TimeoutException
findModel in interface IProblemTimeoutExceptionpublic int nConstraints()
nConstraints in interface IProblempublic void printStat(PrintStream out, String prefix)
public void printStat(PrintWriter out, String prefix)
public void printStat(PrintWriter out)
public void clearLearntClauses()
clearLearntClauses in interface ISolverpublic void setDBSimplificationAllowed(boolean status)
setDBSimplificationAllowed in interface ISolverpublic boolean isDBSimplificationAllowed()
isDBSimplificationAllowed in interface ISolverpublic <S extends ISolverService> void setSearchListener(SearchListener<S> sl)
setSearchListener in interface ISolverpublic void setUnitClauseProvider(UnitClauseProvider ucp)
setUnitClauseProvider in interface ISolverpublic <S extends ISolverService> SearchListener<S> getSearchListener()
getSearchListener in interface ISolverpublic void setVerbose(boolean value)
setVerbose in interface ISolverpublic void setLogPrefix(String prefix)
setLogPrefix in interface ISolverpublic String getLogPrefix()
getLogPrefix in interface ISolverpublic IVecInt unsatExplanation()
unsatExplanation in interface ISolverpublic int realNumberOfVariables()
realNumberOfVariables in interface ISolverpublic boolean isSolverKeptHot()
isSolverKeptHot in interface ISolverpublic void setKeepSolverHot(boolean keepHot)
setKeepSolverHot in interface ISolverpublic ISolver getSolvingEngine()
getSolvingEngine in interface ISolverpublic IntegerVariable newIntegerVar(BigInteger maxValue)
newIntegerVar in interface IIntegerPBSolverpublic BigInteger getIntegerVarValue(IntegerVariable var)
getIntegerVarValue in interface IIntegerPBSolverpublic IConstr addAtLeast(IntegerVariable var, int degree) throws ContradictionException
addAtLeast in interface IIntegerPBSolverContradictionExceptionpublic IConstr addAtLeast(IVecInt literals, IVec<BigInteger> coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, BigInteger degree) throws ContradictionException
addAtLeast in interface IIntegerPBSolverContradictionExceptionpublic IConstr addAtLeast(IVecInt literals, IVecInt coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, int degree) throws ContradictionException
addAtLeast in interface IIntegerPBSolverContradictionExceptionpublic IConstr addAtMost(IntegerVariable var, int degree) throws ContradictionException
addAtMost in interface IIntegerPBSolverContradictionExceptionpublic IConstr addAtMost(IVecInt literals, IVec<BigInteger> coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, BigInteger degree) throws ContradictionException
addAtMost in interface IIntegerPBSolverContradictionExceptionpublic IConstr addAtMost(IVecInt literals, IVecInt coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, int degree) throws ContradictionException
addAtMost in interface IIntegerPBSolverContradictionExceptionpublic IConstr addExactly(IntegerVariable var, int degree) throws ContradictionException
addExactly in interface IIntegerPBSolverContradictionExceptionpublic IConstr addExactly(IVecInt literals, IVec<BigInteger> coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, BigInteger weight) throws ContradictionException
addExactly in interface IIntegerPBSolverContradictionExceptionpublic IConstr addPseudoBoolean(IVecInt lits, IVec<BigInteger> coeffs, boolean moreThan, BigInteger d) throws ContradictionException
IPBSolveraddPseudoBoolean in interface IPBSolverlits - a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.moreThan - true if it is a constraint >= degree, false if it is a
constraint <= degreed - the degree of the cardinality constraintContradictionException - iff the vector of literals is empty or if the constraint is
falsified after unit propagationISolver.removeConstr(IConstr)public IConstr addExactly(IVecInt literals, IVecInt coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, int weight) throws ContradictionException
addExactly in interface IIntegerPBSolverContradictionExceptionpublic IConstr addPseudoBoolean(IVecInt lits, IVec<BigInteger> coeffs, IVec<IntegerVariable> integerVars, IVec<BigInteger> integerVarsCoeffs, boolean moreThan, BigInteger d) throws ContradictionException
addPseudoBoolean in interface IIntegerPBSolverContradictionExceptionpublic int nextFreeVarId(boolean reserve)
nextFreeVarId in interface ISolverpublic void addIntegerVariableToObjectiveFunction(IntegerVariable var, BigInteger weight)
addIntegerVariableToObjectiveFunction in interface IIntegerPBSolverpublic IConstr addAtMost(IVecInt literals, IVecInt coeffs, int degree) throws ContradictionException
IPBSolveraddAtMost in interface IPBSolverliterals - a set of literals The vector can be reused since the solver is
not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.degree - the degree of the pseudo-boolean constraintContradictionException - iff the constraint is found trivially unsat.ISolver.removeConstr(IConstr)public void registerLiteral(int p)
registerLiteral in interface ISolverpublic IConstr addAtMost(IVecInt literals, IVec<BigInteger> coeffs, BigInteger degree) throws ContradictionException
IPBSolveraddAtMost in interface IPBSolverliterals - a set of literals The vector can be reused since the solver is
not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.degree - the degree of the pseudo-boolean constraintContradictionException - iff the constraint is found trivially unsat.ISolver.removeConstr(IConstr)public void setExpectedNumberOfClauses(int nb)
setExpectedNumberOfClauses in interface ISolverpublic IConstr addClause(IVecInt literals) throws ContradictionException
addClause in interface ISolverContradictionExceptionpublic IConstr addAtLeast(IVecInt literals, IVecInt coeffs, int degree) throws ContradictionException
IPBSolveraddAtLeast in interface IPBSolverliterals - a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.degree - the degree of the pseudo-boolean constraintContradictionException - iff the constraint is found trivially unsat.ISolver.removeConstr(IConstr)public IConstr addBlockingClause(IVecInt literals) throws ContradictionException
addBlockingClause in interface ISolverContradictionExceptionpublic IConstr discardCurrentModel() throws ContradictionException
discardCurrentModel in interface ISolverContradictionExceptionpublic IVecInt createBlockingClauseForCurrentModel()
createBlockingClauseForCurrentModel in interface ISolverpublic boolean removeConstr(IConstr c)
removeConstr in interface ISolverpublic IConstr addAtLeast(IVecInt literals, IVec<BigInteger> coeffs, BigInteger degree) throws ContradictionException
IPBSolveraddAtLeast in interface IPBSolverliterals - a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.degree - the degree of the pseudo-boolean constraintContradictionException - iff the constraint is found trivially unsat.ISolver.removeConstr(IConstr)public boolean removeSubsumedConstr(IConstr c)
removeSubsumedConstr in interface ISolverpublic IConstr addExactly(IVecInt literals, IVecInt coeffs, int weight) throws ContradictionException
IPBSolveraddExactly in interface IPBSolverliterals - a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.weight - the number of literals that must be satisfiedContradictionException - iff the constraint is trivially unsatisfiable.public void addAllClauses(IVec<IVecInt> clauses) throws ContradictionException
addAllClauses in interface ISolverContradictionExceptionpublic void printInfos(PrintWriter out, String prefix)
printInfos in interface IProblempublic IConstr addExactly(IVecInt literals, IVec<BigInteger> coeffs, BigInteger weight) throws ContradictionException
IPBSolveraddExactly in interface IPBSolverliterals - a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.coeffs - the coefficients of the literals. The vector can be reused
since the solver is not supposed to keep a reference to that
vector.weight - the number of literals that must be satisfiedContradictionException - iff the constraint is trivially unsatisfiable.public void printInfos(PrintWriter out)
printInfos in interface IProblempublic IConstr addAtMost(IVecInt literals, int degree) throws ContradictionException
addAtMost in interface ISolverContradictionExceptionpublic void setObjectiveFunction(ObjectiveFunction obj)
IPBSolversetObjectiveFunction in interface IPBSolverobj - the objective functionpublic IConstr addAtLeast(IVecInt literals, int degree) throws ContradictionException
addAtLeast in interface ISolverContradictionExceptionpublic ObjectiveFunction getObjectiveFunction()
IPBSolvergetObjectiveFunction in interface IPBSolverpublic IConstr addExactly(IVecInt literals, int n) throws ContradictionException
addExactly in interface ISolverContradictionExceptionpublic void setTimeout(int t)
setTimeout in interface ISolverpublic void setTimeoutOnConflicts(int count)
setTimeoutOnConflicts in interface ISolverpublic void setTimeoutMs(long t)
setTimeoutMs in interface ISolverpublic int getTimeout()
getTimeout in interface ISolverpublic long getTimeoutMs()
getTimeoutMs in interface ISolverpublic void expireTimeout()
expireTimeout in interface ISolverpublic AssignmentOrigin getOriginInModel(int p)
getOriginInModel in interface ISolverpublic void setUnitClauseConsumer(UnitClauseConsumer ucc)
setUnitClauseConsumer in interface ISolverCopyright © 2020 Centre de Recherche en Informatique de Lens (CRIL). All rights reserved.