5.179. in_interval_reified
DESCRIPTION | LINKS |
- Origin
- Constraint
- Synonyms
, .
- Arguments
- Restrictions
- Purpose
Enforce the following equivalence, .
- Example
-
The constraint holds since:
Its first argument is greater than or equal to its second argument and less than or equal to its third argument (i.e.,Β ).
The corresponding Boolean variable is set to 1 since condition holds.
- Typical
- Symmetries
- Reformulation
The constraint can be reformulated in terms of linear constraints. For convenience, we rename to , to , to , and to . The constraint is decomposed into the following conjunction of constraints:
We show how to encode these constraints with linear inequalities. The first constraint, i.e.,Β is encoded by posting one of the following three constraints:
On the one hand, cases a) and b) correspond to situations where one can fix , no matter what value will be assigned to . On the other hand, in case c), can take both values 0 or 1 depending on the value assigned to . As shown by FigureΒ 5.179.1, all possible solutions for the pair of variables satisfy the following two linear inequalities and . The first inequality discards all points that are above the line that goes through the two extreme solution points and , while the second one removes all points that are below the line that goes through the two extreme solution points and .
Figure 5.179.1. Illustration of the reformulation of the reified constraint with two linear inequalities
The second constraint, i.e.,Β is encoded by posting one of the following three constraints:
On the one hand, cases d) and e) correspond to situations where one can fix , no matter what value will be assigned to . On the other hand, in case f), can take both value 0 or 1 depending on the value assigned to . As shown by FigureΒ 5.179.2, all possible solutions for the pair of variables satisfy the following two linear inequalities and . The first inequality discards all points that are above the line that goes through the two extreme solution points and , while the second one removes all points that are below the line that goes through the two extreme solution points and .
Figure 5.179.2. Illustration of the reformulation of the reified constraint with two linear inequalities
The third constraint, i.e.,Β is encoded as:
Case g) handles the implication , while cases h) and i) take care of the other side .
- See also
-
uses in its reformulation: Β (bound consistency preserving reformulation).
- Keywords
characteristic of a constraint: reified constraint.
constraint arguments: binary constraint.