5.110. domain

DESCRIPTIONLINKS
Origin

Domain definition.

Constraint

domain(VARIABLES,LOW,UP)

Synonym(s)

dom.

Argument(s)
VARIABLEScollection(vardvar)
LOWint
UPint
Restriction(s)
required(VARIABLES,var)
LOWUP
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(varV1,varV2,...,varV|VARIABLES|,LOW,UP) constraint can be expressed in term of the conjunction

   V1LOWV1UP,

   V2LOWV2UP,

    ..................

   V|VARIABLES|LOWV|VARIABLES|UP.

Systems

domain in SICStus.

See also

in_interval, in.

Key words

constraint type: predefined constraint, value constraint.

modelling: interval, domain definition.