public class ExplanationForSignedClause extends IExplanation
Modifier and Type | Field and Description |
---|---|
static boolean |
ASSERT_NO_LEFT_BRANCH
Set to false when skip assertion that
no left branch are backtracked to
|
static boolean |
DEFAULT_X
Set to true to force all cause to use default explanations
|
static boolean |
FINE_PROOF
FOR DEBUGGING PURPOSE ONLY.
|
static boolean |
PROOF
FOR DEBUGGING PURPOSE ONLY.
|
Constructor and Description |
---|
ExplanationForSignedClause(Implications ig) |
Modifier and Type | Method and Description |
---|---|
void |
addLiteral(IntVar var,
IntIterableRangeSet dom,
boolean pivot)
Add a signed literal (var ∈ dom) to this explanation.
|
void |
extractConstraint(Model mModel,
ClauseStore ngstore)
Extract and post the nogood related to this explanation
|
int |
getAssertingLevel() |
int |
getCardinality() |
IntIterableRangeSet |
getComplementSet(IntVar var) |
IntIterableRangeSet |
getFreeSet()
Return an empty set available (created and returned) or create a new one
|
IntIterableRangeSet |
getFreeSet(int val)
Return an available set (created and returned) or create a new one
then add 'val' to it.
|
IntIterableRangeSet |
getFreeSet(int a,
int b)
Return an available set (created and returned) or create a new one
then add range ['a','b'] to it.
|
ValueSortedMap<IntVar> |
getFront() |
HashMap<IntVar,IntIterableRangeSet> |
getLiterals() |
IntIterableRangeSet |
getRootSet(IntVar var) |
IntIterableRangeSet |
getSet(int p) |
IntIterableRangeSet |
getSet(IntVar var) |
void |
learnSignedClause(ContradictionException cex)
From a given conflict, defined by cex and the current implication graph mIG,
this method will compute the signed clause inferred from the conflict.
|
void |
learnSolution(DecisionPath path) |
void |
recycle()
Recycle this explanation when it is not used anymore.
|
void |
returnSet(IntIterableRangeSet set) |
String |
toString() |
public static boolean ASSERT_NO_LEFT_BRANCH
public static boolean DEFAULT_X
public static boolean PROOF
public static boolean FINE_PROOF
public ExplanationForSignedClause(Implications ig)
public void extractConstraint(Model mModel, ClauseStore ngstore)
IExplanation
extractConstraint
in class IExplanation
mModel
- the model to post the nogood inpublic void recycle()
IExplanation
recycle
in class IExplanation
public void learnSolution(DecisionPath path)
public void learnSignedClause(ContradictionException cex)
extractConstraint(Model, ClauseStore)
will return the computed result.cex
- the conflictpublic void addLiteral(IntVar var, IntIterableRangeSet dom, boolean pivot)
(v ∈ A ∨ X), (v ∈ B ∨ Y) : (v ∈ (A∩B) ∨ X ∨ Y)
(v ∈ ∅ ∨ Z) : (Z)
((∀i v ∈ Ai) ∨ Z) : (v ∈ (∪i Ai) ∨ Z)
var
- signed literal variabledom
- signed literal domainpivot
- true if var is the pivot variablepublic int getCardinality()
public int getAssertingLevel()
public IntIterableRangeSet getFreeSet()
public IntIterableRangeSet getFreeSet(int val)
public IntIterableRangeSet getFreeSet(int a, int b)
public void returnSet(IntIterableRangeSet set)
public IntIterableRangeSet getSet(int p)
p
- positionpublic IntIterableRangeSet getSet(IntVar var)
var
- a variablepublic IntIterableRangeSet getComplementSet(IntVar var)
var
- a variablepublic IntIterableRangeSet getRootSet(IntVar var)
var
- a variablepublic ValueSortedMap<IntVar> getFront()
public HashMap<IntVar,IntIterableRangeSet> getLiterals()
Copyright © 2018. All rights reserved.