## 5.180. in_intervals

Origin

Domain definition.

Constraint

$\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }\right)$

Synonym

$\mathrm{\pi \pi }$.

Arguments
 $\mathrm{\pi  \pi °\pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$
Restrictions
 $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ $|\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }|>0$
Purpose

Enforce the domain variable $\mathrm{\pi  \pi °\pi }$ to take a value within one of the intervals specified by the collection of intervals $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$.

Example

The $\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ constraint holds since its first argument $\mathrm{\pi  \pi °\pi }=5$ belongs to the second intervals of the collection of intervals $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$.

Typical
$|\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }|>1$
Symmetries
• Items of $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$ are permutable.

• can be decreased.

• $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }.\mathrm{\pi \pi }$ can be increased.

• One and the same constant can be added to $\mathrm{\pi  \pi °\pi }$ as well as to the and $\mathrm{\pi \pi }$ attributes of all items of $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$.

Arg. properties

Extensible wrt. $\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »\pi }$.

Remark

Entailment occurs immediately after posting this constraint.

Systems

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

specialisation: $\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$Β (set of intervals replaced by single interval).