5.330. range_ctr
DESCRIPTION | LINKS | GRAPH |
- Origin
Arithmetic constraint.
- Constraint
- Arguments
- Restrictions
- Purpose
Constraint the difference between the maximum value and the minimum value of a set of domain variables. More precisely, let denote the difference between the largest and the smallest variables of the collection plus one. Enforce the following constraint to hold: .
- Example
-
The constraint holds since is equal (i.e.,Β is set to ) to its last argument .
Figure 5.330.1. Illustration of the Example slot: three variables respectively fixed to values 1, 9 and 4, and their corresponding range
- Typical
- Symmetries
Items of are permutable.
All occurrences of two distinct values of can be swapped.
One and the same constant can be added to the attribute of all items of .
- Arg. properties
Contractible wrt. when .
Extensible wrt. when .
- Used in
- See also
- Keywords
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
Since we want to keep all the vertices of the initial graph we use the arc generator together with the arc constraint. This predefined arc constraint always holds.
PartsΒ (A) andΒ (B) of FigureΒ 5.330.2 respectively show the initial and final graph associated with the Example slot. Since we use the arc constraint both graphs are identical.
Figure 5.330.2. Initial and final graph of the constraint
(a) (b)