5.150. in_interval

DESCRIPTIONLINKSGRAPHAUTOMATON
Origin

Domain definition.

Constraint

in_interval(VAR,LOW,UP)

Synonym(s)

dom, in.

Argument(s)
VARdvar
LOWint
UPint
Restriction(s)
LOWUP
Purpose

Enforce the domain variable VAR to take a value within the interval [LOW,UP].

Example
(3,2,5)

The in_interval constraint holds since its first argument VAR=3 is greater than or equal to its second argument LOW=2 and less than or equal to its third argument UP=5.

Remark

Entailment occurs immediately after posting this constraint.

The in_interval constraint is referenced under the name dom in Gecode.

Systems

in in Jacop, in in SICStus.

See also

in, domain.

Key words

characteristic of a constraint: automaton, automaton without counters, derived collection.

constraint arguments: unary constraint.

constraint network structure: Berge-acyclic constraint network.

constraint type: value constraint.

filtering: arc-consistency.

modelling: interval, domain definition.

Derived Collection(s)
col(VARIABLEcollection(vardvar),​​[item(varVAR)])
col(INTERVALcollection(lowint,upint),​​[item(lowLOW,upUP)])



Arc input(s)

VARIABLE INTERVAL

Arc generator
PRODUCTcollection(variable,interval)

Arc arity
2
Arc constraint(s)
variable.varinterval.low
variable.varinterval.up
Graph property(ies)
NARC=1


Graph model

Parts (A) and (B) of Figure 5.150.1 respectively show the initial and final graph associated with the Example slot. Since we use the NARC graph property, the unique arc of the final graph is stressed in bold.

Figure 5.150.1. Initial and final graph of the in_interval constraint

ctrs/in_intervalActrs/in_intervalB
(a) (b)


Automaton

Figure 5.150.2 depicts the automaton associated with the in_interval constraint. We have one single 0-1 signature variable S as well as the following signature constraint: VARLOWVARUPS.

Figure 5.150.2. Automaton of the in_interval constraint
ctrs/in_interval1
Figure 5.150.3. Hypergraph of the reformulation corresponding to the automaton of the in_interval constraint
ctrs/in_interval2