public class ConflictMap extends MapPb implements IConflict
| Modifier and Type | Field and Description |
|---|---|
protected VecInt[] |
byLevel
allows to access directly to all variables belonging to a particular
level At index 0, unassigned literals are stored (usually level -1); so
there is always a step between index and levels.
|
protected BigInteger |
coefMult |
protected BigInteger |
coefMultCons |
protected int |
currentLevel |
protected BigInteger |
currentSlack
to store the slack of the current resolvant
|
protected boolean |
hasBeenReduced |
protected long |
numberOfReductions |
protected IPreProcess |
preProcess |
protected BigInteger |
sumAllCoefs |
assertiveLiteral, autoDivisionStrategy, degree, weightedLitsTAUTOLOGY| Modifier and Type | Method and Description |
|---|---|
static IConflict |
createConflict(PBConstr cpb,
int level,
boolean noRemove,
SkipStrategy skip,
IPreProcess preProcessing,
IPostProcess postProcessing,
IWeakeningStrategy weakeningStrategy,
AutoDivisionStrategy autoDivisionStrategy,
PBSolverStats stats)
constructs the data structure needed to perform cutting planes
|
static IConflictFactory |
factory() |
int |
getBacktrackLevel(int maxLevel)
computes the level for the backtrack : the highest decision level for
which the conflict is assertive.
|
long |
getNumberOfReductions() |
boolean |
hasBeenReduced() |
boolean |
isAssertive(int dl)
change the currentLevel of the conflict to a new decision level and tests
if the conflict is assertive (allows to imply a literal) at this new
decision level
|
boolean |
isUnsat()
tests if the conflict is unsatisfiable
|
int |
oldGetBacktrackLevel(int maxLevel) |
boolean |
oldIsAssertive(int dl) |
protected BigInteger |
possConstraint(IWatchPb wpb,
BigInteger[] theCoefs) |
void |
postProcess(int dl) |
protected BigInteger |
ppcm(BigInteger a,
BigInteger b)
computes the least common factor of two integers (Plus Petit Commun
Multiple in french)
|
void |
preProcess() |
BigInteger |
reduceInConstraint(IWatchPb wpb,
BigInteger[] coefsBis,
int indLitImplied,
BigInteger degreeBis,
BigInteger slackResolve)
constraint reduction : removes a literal of the constraint.
|
protected BigInteger |
reduceUntilConflict(int litImplied,
int ind,
BigInteger[] reducedCoefs,
BigInteger degreeReduced,
IWatchPb wpb) |
BigInteger |
resolve(PBConstr cpb,
int litImplied,
VarActivityListener val)
computes a cutting plane with a pseudo-boolean constraint. this method
updates the current instance (of ConflictMap).
|
protected BigInteger |
saturation(BigInteger[] coefs,
BigInteger degree,
IWatchPb wpb) |
void |
setDecisionLevel(int dl) |
BigInteger |
slackConflict()
computes the slack of the current instance
|
boolean |
slackIsCorrect(int dl) |
String |
toString() |
void |
undoOne(int lit) |
void |
updateSlack(int level) |
buildConstraintFromConflict, buildConstraintFromMapPb, cuttingPlane, cuttingPlane, cuttingPlane, cuttingPlane, getAssertiveLiteral, getCardDegree, getDegree, getNumberOfCuttingPlanesCardinalities, isCardinality, isLongSufficient, reduceCoeffsByGCD, reduceCoeffsByPower2, saturation, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildConstraintFromConflict, buildConstraintFromMapPb, cuttingPlane, cuttingPlane, cuttingPlane, cuttingPlane, getAssertiveLiteral, getCardDegree, getDegree, isCardinality, isLongSufficient, reduceCoeffsByPower2, saturation, sizeprotected boolean hasBeenReduced
protected long numberOfReductions
protected BigInteger currentSlack
protected BigInteger sumAllCoefs
protected int currentLevel
protected IPreProcess preProcess
protected VecInt[] byLevel
protected BigInteger coefMult
protected BigInteger coefMultCons
public static IConflict createConflict(PBConstr cpb, int level, boolean noRemove, SkipStrategy skip, IPreProcess preProcessing, IPostProcess postProcessing, IWeakeningStrategy weakeningStrategy, AutoDivisionStrategy autoDivisionStrategy, PBSolverStats stats)
cpb - pseudo-boolean constraint which raised the conflictlevel - current decision levelpublic static IConflictFactory factory()
public void postProcess(int dl)
postProcess in interface IConflictpublic BigInteger resolve(PBConstr cpb, int litImplied, VarActivityListener val)
public void preProcess()
protected BigInteger reduceUntilConflict(int litImplied, int ind, BigInteger[] reducedCoefs, BigInteger degreeReduced, IWatchPb wpb)
protected BigInteger possConstraint(IWatchPb wpb, BigInteger[] theCoefs)
public BigInteger slackConflict()
slackConflict in interface IConflictpublic boolean oldIsAssertive(int dl)
public boolean isAssertive(int dl)
isAssertive in interface IConflictdl - the decision levelpublic void setDecisionLevel(int dl)
setDecisionLevel in interface IConflictpublic boolean isUnsat()
protected BigInteger ppcm(BigInteger a, BigInteger b)
a - first integerb - second integerpublic BigInteger reduceInConstraint(IWatchPb wpb, BigInteger[] coefsBis, int indLitImplied, BigInteger degreeBis, BigInteger slackResolve)
reduceInConstraint in interface IConflictwpb - the initial constraint to reducecoefsBis - the coefficients of the constraint wrt which the reduction
will be proposedindLitImplied - index in wpb of the literal that should be resolveddegreeBis - the degree of the constraint wrt which the reduction will be
proposedprotected BigInteger saturation(BigInteger[] coefs, BigInteger degree, IWatchPb wpb)
public int getBacktrackLevel(int maxLevel)
getBacktrackLevel in interface IConflictmaxLevel - the lowest level for which the conflict is assertivepublic int oldGetBacktrackLevel(int maxLevel)
public void updateSlack(int level)
updateSlack in interface IConflictpublic boolean slackIsCorrect(int dl)
slackIsCorrect in interface IConflictpublic boolean hasBeenReduced()
public long getNumberOfReductions()
Copyright © 2020 Centre de Recherche en Informatique de Lens (CRIL). All rights reserved.