5.289. nvalues_except_0
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
Let be the number of distinct values, different from 0, assigned to the variables of the collection. Enforce condition to hold.
- Example
-
The constraint holds since the number of distinct values, different from 0, occurring within the collection is equal (i.e.,Β is set toΒ ) to its third argument .
- Typical
- Symmetries
Items of are permutable.
All occurrences of two distinct values of that are both different from 0 can be swapped; all occurrences of a value of that is different from 0 can be renamed to any unused value that is also different from 0.
- Arg. properties
Contractible wrt. when .
Extensible wrt. when .
- Reformulation
The constraint can be expressed in term of the conjunction .
- Used in
- See also
- Keywords
characteristic of a constraint: joker value.
constraint type: counting constraint, value partitioning constraint.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph property(ies)
-
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.289.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property we show the different strongly connected components of the final graph. Each strongly connected component corresponds to a value distinct from 0 that is assigned to some variables of the collection. Beside value 0, the 3 following values 1, 4 and 5 are assigned to the variables of the collection.
Figure 5.289.1. Initial and final graph of the constraint
(a) (b)