choco
Interface Propagator

All Superinterfaces:
java.lang.Cloneable, Constraint, Entity, java.util.EventListener, VarEventListener
All Known Subinterfaces:
BoolConstraint, DecisionConstraint, IntConstraint, MixedConstraint, PalmConstraint, PalmMixedConstraint, RealConstraint, SetConstraint, SymbolicDecision
All Known Implementing Classes:
AbstractBinBoolConstraint, AbstractBinBoolConstraintWithCounterOpposite, AbstractBinCompositeConstraint, AbstractBinIntConstraint, AbstractBinRealIntConstraint, AbstractBinSetConstraint, AbstractBinSetIntConstraint, AbstractBipartiteFlow, AbstractBipartiteGraph, AbstractBipartiteMatching, AbstractCompositeConstraint, AbstractConstraint, AbstractDecision, AbstractIntConstraint, AbstractLargeBoolConstraint, AbstractLargeBoolConstraintWithCounterOpposite, AbstractLargeCompositeConstraint, AbstractLargeIntConstraint, AbstractLargeRealConstraint, AbstractMixedConstraint, AbstractPalmBinIntConstraint, AbstractPalmLargeIntConstraint, AbstractPalmSplit, AbstractPalmTernIntConstraint, AbstractPalmUnIntConstraint, AbstractPalmUnRealConstraint, AbstractSetConstraint, AbstractTernIntConstraint, AbstractTernSetConstraint, AbstractUnIntConstraint, AbstractUnRealConstraint, AbstractUnSetConstraint, AC2001BinConstraint, AC3BinConstraint, AC4BinConstraint, AllDifferent, Assignment, BinConjunction, BinDisjunction, BooleanChanneling, BoundAllDiff, Cardinality, ConstantConstraint, CspBinConstraint, CspLargeConstraint, Cumulative, Disjoint, Element, ElementV, EqualXC, EqualXYC, Equation, Equiv, GAC2001LargeConstraint, GlobalCardinality, GreaterOrEqualXC, GreaterOrEqualXYC, Guard, IntLinComb, InverseChanneling, LargeConjunction, LargeDisjunction, LessOrEqualXC, Lex, MemberX, MemberXY, MixedCstElt, MixedEqXY, NogoodConstraint, NotEqualXC, NotEqualXYC, NotMemberX, NotMemberXY, Occurrence, PalmAllDifferent, PalmAssignment, PalmCardinality, PalmElt, PalmElt2D, PalmEqualXC, PalmEqualXYC, PalmEquation, PalmGreaterOrEqualXC, PalmGreaterOrEqualXYC, PalmIntLinComb, PalmLessOrEqualXC, PalmMixedCstElt, PalmMixedEqXY, PalmNotEqualXC, PalmNotEqualXYC, PalmOccurence, PalmSplitLeft, PalmSplitRight, SetCard, SetIntersection, TimesXYZ

public interface Propagator
extends VarEventListener, Constraint

An interface for all implementations of listeners.


Method Summary
 int assignIndices(AbstractCompositeConstraint root, int i, boolean dynamicAddition)
          performs the global numbering (wrt root) of the variables contained in the subtree this, starting from i
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
 void awakeOnVar(int idx)
          Propagation: Propagating the constraint when the domain of a variable has been modified (shrunk) since the last consistent state.
 void constAwake(boolean isInitialPropagation)
          Forces a propagation of the constraint.
 void delete()
          Removes a constraint from the network.
 PropagationEvent getEvent()
          Returns the constraint awake var associated with this constraint.
 ConstraintPlugin getPlugIn()
          Returns the constraint plugin.
 int getPriority()
          Propagation: Accessing the priority level of the queue handling the propagation of the constraint.
 boolean isCompletelyInstantiated()
          Utility: Testing if all variables involved in the constraint are instantiated.
 boolean isConsistent()
          tests if the constraint is consistent with respect to the current state of domains
 java.lang.Boolean isEntailed()
          Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables.
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 
Methods inherited from interface choco.prop.VarEventListener
addListener, isActive, setActive, setPassive
 
Methods inherited from interface choco.Constraint
clone, getConstraintIdx, getNbVars, getVar, getVarIdxInOpposite, isEquivalentTo, isSatisfied, opposite, setConstraintIndex, setVar
 
Methods inherited from interface choco.Entity
getProblem, pretty
 

Method Detail

getPlugIn

ConstraintPlugin getPlugIn()
Returns the constraint plugin. Useful for extending the solver.


isCompletelyInstantiated

boolean isCompletelyInstantiated()
Utility: Testing if all variables involved in the constraint are instantiated.


constAwake

void constAwake(boolean isInitialPropagation)
Forces a propagation of the constraint.


awake

void awake()
           throws ContradictionException
Propagation: Propagating the constraint for the very first time until local consistency is reached.

Throws:
ContradictionException

awakeOnVar

void awakeOnVar(int idx)
                throws ContradictionException
Propagation: Propagating the constraint when the domain of a variable has been modified (shrunk) since the last consistent state.

Specified by:
awakeOnVar in interface VarEventListener
Throws:
ContradictionException

propagate

void propagate()
               throws ContradictionException
Propagation: Propagating the constraint until local consistency is reached.

Throws:
ContradictionException

getPriority

int getPriority()
Propagation: Accessing the priority level of the queue handling the propagation of the constraint. Results range from 1 (most reactive, for listeners with fast propagation algorithms) to 4 (most delayed, for listeners with lengthy propagation algorithms).


delete

void delete()
Removes a constraint from the network. Beware, this is a permanent removal, it may not be backtracked


getEvent

PropagationEvent getEvent()
Returns the constraint awake var associated with this constraint.


isEntailed

java.lang.Boolean isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables.


isConsistent

boolean isConsistent()
tests if the constraint is consistent with respect to the current state of domains


assignIndices

int assignIndices(AbstractCompositeConstraint root,
                  int i,
                  boolean dynamicAddition)
performs the global numbering (wrt root) of the variables contained in the subtree this, starting from i

Parameters:
root - the overall root constraint, for which the variables are numbered
i - the index that will assigned to the first variable in the subtree this (originally 0)
dynamicAddition - whether the addition is undone automatically on backtracking
Returns:
the index of the last variable in the subtree