|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractTernIntSConstraint
choco.cp.solver.constraints.integer.DistanceXYZ
public final class DistanceXYZ
A constraint to state |x0 - x1| operator x2 + c where operator can be =, <=, >= and x1, x2, x3 are variables Warning: only achieves BoundConsistency for the moment !
Field Summary | |
---|---|
protected int |
cste
|
static int |
EQ
|
static int |
GT
|
static int |
LT
|
protected int |
operator
|
Fields inherited from class choco.kernel.solver.constraints.integer.AbstractTernIntSConstraint |
---|
v0, v1, v2 |
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
cIndices, constraintType, extensions, vars |
Fields inherited from class choco.kernel.solver.propagation.Propagator |
---|
active, constAwakeEvent, priority, propagationEngine |
Fields inherited from interface choco.kernel.solver.constraints.SConstraint |
---|
LOGGER |
Constructor Summary | |
---|---|
DistanceXYZ(IntDomainVar x0,
IntDomainVar x1,
IntDomainVar x2,
int c,
int op)
Enforces |x0 - x1| op x2 + c where op can be =, <, > |
Method Summary | |
---|---|
void |
awakeOnBounds(int varIndex)
|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int idx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRemovals(int idx,
DisposableIntIterator deltaDomain)
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
boolean |
filterEQFromXZToY()
|
boolean |
filterEQFromYZToX()
|
void |
filterFixPoint()
|
boolean |
filterFromXYtoLBZ()
|
boolean |
filterFromXYtoUBZ()
|
boolean |
filterGTFromXZtoY()
|
boolean |
filterGTFromYZtoX()
|
boolean |
filterLTFromXZtoY()
|
boolean |
filterLTFromYZtoX()
|
int |
getFilteredEventMask(int idx)
|
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
String |
toString()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnRem, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, setConstraintIndex, setExtension, setVar |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, awake, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int operator
protected final int cste
public static final int EQ
public static final int LT
public static final int GT
Constructor Detail |
---|
public DistanceXYZ(IntDomainVar x0, IntDomainVar x1, IntDomainVar x2, int c, int op)
x0
- x1
- x2
- c
- the constantop
- the operator to be chosen among {0,1,2} standing for (eq,lt,gt)Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public boolean filterFromXYtoLBZ() throws ContradictionException
ContradictionException
public boolean filterFromXYtoUBZ() throws ContradictionException
ContradictionException
public boolean filterEQFromYZToX() throws ContradictionException
ContradictionException
public boolean filterEQFromXZToY() throws ContradictionException
ContradictionException
public boolean filterLTFromYZtoX() throws ContradictionException
ContradictionException
public boolean filterLTFromXZtoY() throws ContradictionException
ContradictionException
public boolean filterGTFromYZtoX() throws ContradictionException
ContradictionException
public boolean filterGTFromXZtoY() throws ContradictionException
ContradictionException
public void filterFixPoint() throws ContradictionException
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnBounds(int varIndex) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
ContradictionException
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic String toString()
toString
in class AbstractSConstraint<IntDomainVar>
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |