5.180. in_intervals

DESCRIPTIONLINKS
Origin

Domain definition.

Constraint

πš’πš—_πš’πš—πšπšŽπš›πšŸπšŠπš•πšœ(πš…π™°πš,π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚)

Synonym

πš’πš—.

Arguments
πš…π™°πšπšπšŸπšŠπš›
π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πš•πš˜πš -πš’πš—πš,πšžπš™-πš’πš—πš)
Restrictions
πš›πšŽπššπšžπš’πš›πšŽπš(π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚,[πš•πš˜πš ,πšžπš™])
π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.πš•πš˜πš β‰€π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.πšžπš™
|π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚|>0
Purpose

Enforce the domain variable πš…π™°πš to take a value within one of the intervals specified by the collection of intervals π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.

Example
(5,πš•πš˜πš -1 πšžπš™-1,πš•πš˜πš -3 πšžπš™-5,πš•πš˜πš -8 πšžπš™-8)

The πš’πš—_πš’πš—πšπšŽπš›πšŸπšŠπš•πšœ constraint holds since its first argument πš…π™°πš=5 belongs to the second intervals of the collection of intervals π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.

Typical
|π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚|>1
Symmetries
  • Items of π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚ are permutable.

  • π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.πš•πš˜πš  can be decreased.

  • π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.πšžπš™ can be increased.

  • One and the same constant can be added to πš…π™°πš as well as to the πš•πš˜πš  and πšžπš™ attributes of all items of π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.

Arg. properties

Extensible wrt. π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš‚.

Remark

Entailment occurs immediately after posting this constraint.

Systems

dom in Gecode, in in JaCoP, in in SICStus.

See also

specialisation: πš’πš—_πš’πš—πšπšŽπš›πšŸπšŠπš•Β (set of intervals replaced by single interval).

Keywords

constraint arguments: unary constraint.

constraint type: value constraint, predefined constraint.

filtering: arc-consistency.

modelling: interval, domain definition.