|
||||||||||
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
choco.cp.solver.constraints.reified.ReifiedAllSConstraint
public class ReifiedAllSConstraint
A constraint that allows to reify another constraint into a boolean value. b = 1 <=> cons is satisfied b = 0 <=> oppositeCons is satisfied
cons and oppositeCons do not need to be really the constraint and its opposite, it can be two different constraints as well
Field Summary | |
---|---|
protected AbstractSConstraint |
cons
|
protected AbstractSConstraint |
oppositeCons
|
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 |
Method Summary | ||
---|---|---|
void |
addExtension(int extensionNumber)
Adds a new extension. |
|
void |
addListener(AbstractSConstraint thecons)
|
|
void |
addListener(boolean dynamicAddition)
This function connects a constraint with its variables in several ways. |
|
void |
awakeOnBounds(int varIdx)
|
|
void |
awakeOnEnv(int varIdx,
int x)
Default propagation on enveloppe modification: propagation on removing a value from the enveloppe. |
|
void |
awakeOnEnvRemovals(int sIdx,
DisposableIntIterator deltaDomain)
BEWARE: No need to dipose the iterator, this done in the calling methode |
|
void |
awakeOnInf(int varIdx)
Default propagation on improved lower bound: propagation on domain revision. |
|
void |
awakeOnInst(int varIdx)
Default propagation on instantiation. |
|
void |
awakeOnKer(int varIdx,
int x)
Default propagation on kernel modification: propagation on adding a value to the kernel. |
|
void |
awakeOnkerAdditions(int sIdx,
DisposableIntIterator deltaDomain)
BEWARE: No need to dipose the iterator, this done in the calling methode |
|
void |
awakeOnRem(int varIdx,
int val)
Default propagation on one value removal: propagation on domain revision. |
|
void |
awakeOnRemovals(int varIdx,
DisposableIntIterator deltaDomain)
|
|
void |
awakeOnSup(int varIdx)
Default propagation on improved upper bound: propagation on domain revision. |
|
void |
filter()
|
|
void |
filterReifiedConstraintFromBool()
|
|
void |
filterReifiedConstraintFromCons()
|
|
SConstraintType |
getConstraintType()
Return the type of constraint, ie the type of variable involved in the constraint |
|
int |
getIndex(AbstractVar v)
|
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
|
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
|
boolean |
isSatisfied(int[] tuple)
|
|
static
|
makeTableVar(IntDomainVar bool,
C cons,
C oppcons)
|
|
String |
pretty()
pretty printing of the object. |
|
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
|
void |
setPropagationEngine(PropagationEngine propEng)
Define the propagation engine within the constraint. |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, awake, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final AbstractSConstraint cons
protected final AbstractSConstraint oppositeCons
Method Detail |
---|
public static <C extends AbstractSConstraint> Var[] makeTableVar(IntDomainVar bool, C cons, C oppcons)
public final void addExtension(int extensionNumber)
addExtension
in interface IExtensionnable
addExtension
in class AbstractSConstraint
extensionNumber
- should use the number returned by getAbstractSConstraintExtensionNumberpublic final void filterReifiedConstraintFromBool() throws ContradictionException
ContradictionException
public void filterReifiedConstraintFromCons() throws ContradictionException
ContradictionException
public final void filter() throws ContradictionException
ContradictionException
public final void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInf(int varIdx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in interface RealPropagator
ContradictionException
public void awakeOnSup(int varIdx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in interface RealPropagator
ContradictionException
public void awakeOnRem(int varIdx, int val) throws ContradictionException
awakeOnRem
in interface IntPropagator
ContradictionException
public void awakeOnRemovals(int varIdx, DisposableIntIterator deltaDomain) throws ContradictionException
awakeOnRemovals
in interface IntPropagator
ContradictionException
public void awakeOnBounds(int varIdx) throws ContradictionException
awakeOnBounds
in interface IntPropagator
ContradictionException
public void awakeOnKer(int varIdx, int x) throws ContradictionException
awakeOnKer
in interface SetPropagator
ContradictionException
public void awakeOnEnv(int varIdx, int x) throws ContradictionException
awakeOnEnv
in interface SetPropagator
ContradictionException
public void awakeOnInst(int varIdx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in interface SetPropagator
ContradictionException
public void awakeOnkerAdditions(int sIdx, DisposableIntIterator deltaDomain) throws ContradictionException
SetPropagator
awakeOnkerAdditions
in interface SetPropagator
ContradictionException
public void awakeOnEnvRemovals(int sIdx, DisposableIntIterator deltaDomain) throws ContradictionException
SetPropagator
awakeOnEnvRemovals
in interface SetPropagator
ContradictionException
public final boolean isConsistent()
isConsistent
in class Propagator
public final void addListener(AbstractSConstraint thecons)
public final int getIndex(AbstractVar v)
public final void addListener(boolean dynamicAddition)
AbstractSConstraint
addListener
in class AbstractSConstraint
dynamicAddition
- if the addition should be dynamicalpublic final void setPropagationEngine(PropagationEngine propEng)
ContradictionException
.
setPropagationEngine
in class Propagator
propEng
- the current propagation enginepublic final String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint
public boolean isSatisfied()
isSatisfied
in interface SConstraint
public SConstraintType getConstraintType()
SConstraint
getConstraintType
in interface SConstraint
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |