5.110. domain
| DESCRIPTION | LINKS |
- Origin
Domain definition.
- Constraint
domain(VARIABLES,LOW,UP)
- Synonym(s)
- Argument(s)
-
VARIABLES collection(var−dvar) LOW int UP int - Restriction(s)
-
required(VARIABLES,var) LOW≤UP - Purpose
Enforce all the variables of the collection VARIABLES to take a value within the interval [LOW,UP].
- Example
-
(〈2,8,2〉,1,9) The domain constraint holds since all the values 2, 8 and 2 of its first argument are greater than or equal to its second argument LOW=1 and less than or equal to its third argument UP=9.
- Remark
The domain constraint is called dom in Gecode (
http://www.gecode.org/
).- Reformulation
The domain(〈var−V1,var−V2,...,var−V|VARIABLES|〉,LOW,UP) constraint can be expressed in term of the conjunction
V1≥LOW ∧ V1≤UP,
V2≥LOW ∧ V2≤UP,
..................
V|VARIABLES|≥LOW ∧ V|VARIABLES|≤UP.
- Systems
- See also
- Key words