5.331. relaxed_sliding_sum
DESCRIPTION | LINKS | GRAPH |
- Origin
CHIP
- Constraint
- Arguments
- Restrictions
- Purpose
There are between and sequences of consecutive variables of the collection such that the sum of the variables of the sequence is in .
- Example
-
Within the sequence we have exactly 3 subsequences of consecutive values such that their sum is located within the interval : subsequences , and . Consequently the constraint holds since the number of such subsequences is located within the interval .
- Typical
- Symmetries
- Algorithm
- See also
-
used in graph description: Β (the sliding constraint).
- Keywords
characteristic of a constraint: hypergraph.
combinatorial object: sequence.
constraint type: sliding sequence constraint, soft constraint, relaxation.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph property(ies)
-
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.331.1 respectively show the initial and final graph associated with the Example slot. For each vertex of the graph we show its corresponding position within the collection of variables. The constraint associated with each arc corresponds to a conjunction of two constraints involving 4 consecutive variables. In PartΒ (B), we did not put vertex 1 since the single arc constraint that mentions vertex 1 does not hold (i.e.,Β the sum is not located in interval ). However, the directed hypergraph contains 3 arcs, so the constraint is satisfied since it was requested to have between 3 and 4 arcs.
Figure 5.331.1. (A)Β Initial and (B)Β final graph of the constraint of the Example slot where each ellipse represents an hyperedge involving vertices (e.g., the rightmost ellipse represents the constraint )