5.150. in_interval
| DESCRIPTION | LINKS | GRAPH | AUTOMATON |
- Origin
Domain definition.
- Constraint
in_interval(VAR,LOW,UP)
- Synonym(s)
- Argument(s)
-
VAR dvar LOW int UP int - Restriction(s)
-
LOW≤UP - 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
- See also
- Key words
characteristic of a constraint: automaton, automaton without counters, derived collection.
constraint arguments: unary constraint.
constraint network structure: Berge-acyclic constraint network.
- Derived Collection(s)
-
col(VARIABLE−collection(var−dvar),[item(var−VAR)]) col(INTERVAL−collection(low−int,up−int),[item(low−LOW,up−UP)])
- Arc input(s)
VARIABLE INTERVAL
- Arc generator
-
PRODUCT↦collection(variable,interval) - Arc arity
-
2 - Arc constraint(s)
-
• variable.var≥interval.low • variable.var≤interval.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


(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: VAR≥LOW∧VAR≤UP⇔S.
Figure 5.150.2. Automaton of the in_interval constraint

Figure 5.150.3. Hypergraph of the reformulation corresponding to the automaton of the in_interval constraint
