Overview | Group | Tree | Graph | Index | Concepts |
The examination of the constraints on a variable is triggered by any modification of that variable. There are several kinds of modifications, depending on the class of variable under consideration. We refer to a propagation event as the modification of a constrained variable. There is a key word associated with each of these propagation events.
There are three propagation events:
whenValue
means that a value has been assigned to the constrained variable.
whenRange
indicates that at least one of the boundaries (the minimum or the maximum) of the domain has been changed. This event is also generated when the variable is bound (in the sense of “assigned a value”).
whenDomain
indicates that the domain of a variable has been modified, either when an element is removed
from the domain, or when a boundary is modified, or when the variable is bound.The propagation events that are possible depend on the type of constrained variable under consideration. The following chart shows the correspondence between events and types of variables.
whenValue | whenRange | whenDomain | |
---|---|---|---|
IlcIntExp | yes | yes | yes |
IlcAnyExp | yes | yes | |
IlcFloatExp | yes | yes | |
IlcIntSetVar | yes | yes | |
IlcAnySetVar | yes | yes |
These events are triggered only if the variable is actually modified. For example, attempting to remove a value that is not in the domain triggers no event.
These events are used to control when a constraint should be examined. In fact, a constraint can be associated
with a given event for a given variable. For example, when a variable is processed in the constraint propagation algorithm,
if the whenDomain
event is the only triggered event, all the constraints associated with the
whenDomain
event are examined. Any constraints associated with the whenRange
or
the whenValue
events are not examined. These events are thus used for posting constraints.
See the concepts Choice Point, Propagation, and Reversibility for more information.
See Also