|
||||||||||
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.AbstractLargeIntSConstraint
choco.cp.solver.constraints.global.tree.TreeSConstraint
public final class TreeSConstraint
A global tree partitioning constraint that deals with several restrictions:
- The number of trees allowed to partition the graph (assuming an isolated node forms a tree),
- The number of proper trees allowed to partition the graph (assuming a proper tree contains at least 2 nodes),
- Partial order between the nodes of the digraph,
- Incomparability relations between the nodes of the digraph,
- Degree restrictions related to the number of incoming arc of each node,
- Time windows associated with each node that represent the starting time from each node.
All these attributes are embedded in a specific data structure, the description of the input
data structure is available in the structure.inputStructure
package.
Field Summary | |
---|---|
protected static boolean |
AFFICHE
boolean for debug and show a trace of the execution |
protected DeductionsAdvisor |
deduction
deduction manager |
protected FilteringAdvisor |
filtering
filtering manager |
protected int |
nbNodes
total number of nodes involved in the graph |
protected Solver |
solver
Choco problem embedding the tree constraint |
protected StructuresAdvisor |
structure
internal structure manager |
protected TreeParameters |
tree
attributes |
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 | |
---|---|
TreeSConstraint(IntDomainVar[] allVars,
TreeParameters tree)
constructor: allocates the data util for a Choco constraint |
Method Summary | |
---|---|
void |
awake()
Initial awake of the tree constraint. |
void |
awakeOnBounds(int idx)
Event based propagation related to the update of the bounds of a variable. |
void |
awakeOnInf(int idx)
Event based propagation related to the update of the lower bound of a variable. |
void |
awakeOnInst(int idx)
Event based propagation related to the instanciation of a variable. |
void |
awakeOnRem(int idx,
int i)
Event based propagation related to the removal of a value in the domain of a variable. |
void |
awakeOnRemovals(int idx,
DisposableIntIterator deltaDomain)
Event based propagation related to the removal of a set of values in the domain of a variable. |
void |
awakeOnSup(int idx)
Event based propagation related to the update of the upper bound of a variable. |
boolean |
isSatisfied()
Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple) |
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 ! |
void |
propagate()
The main propagation method. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
getConstraintType, isConsistent |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getFilteredEventMask, 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 static final boolean AFFICHE
protected Solver solver
protected TreeParameters tree
protected int nbNodes
protected StructuresAdvisor structure
protected DeductionsAdvisor deduction
protected FilteringAdvisor filtering
Constructor Detail |
---|
public TreeSConstraint(IntDomainVar[] allVars, TreeParameters tree)
allVars
- the set of variable related to the description of the tree constrainttree
- the input data structure available in the structure.inputStructure
packageMethod Detail |
---|
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public boolean isSatisfied()
AbstractIntSConstraint
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
public void awake() throws ContradictionException
TreeParameters
. Each manager of filtering, deduction and update are initiliazed.
awake
in class Propagator
ContradictionException
public void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
idx
- the index of the variable instanciated
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
idx
- the variable index for which the lower bound is updated
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
idx
- the variable index for which the upper bound is updated
ContradictionException
public void awakeOnBounds(int idx) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
idx
- the variable index for which the bounds are updated
ContradictionException
public void awakeOnRem(int idx, int i) throws ContradictionException
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
idx
- the variable index for which a value is removedi
- the value removed
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
idx
- the variable index for which a set of values is removeddeltaDomain
- an iterator over the removed values
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |