5.349. sliding_card_skip0
DESCRIPTION | LINKS | GRAPH | AUTOMATON |
- Origin
N.Β Beldiceanu
- Constraint
- Arguments
- Restrictions
- Purpose
Let be the total number of variables of the collection . A maximum non-zero set of consecutive variables is defined in the following way:
All variables take a non-zero value,
or is equal to 0,
or is equal to 0.
Enforces that each maximum non-zero set of consecutive variables of the collection contains at least and at most values from the collection of values .
- Example
-
The constraint holds since the two maximum non-zero set of consecutive values and of its third argument take both 2 () values within the set of values .
- Typical
- Symmetries
- Usage
This constraint is useful in timetabling problems where the variables are interpreted as the type of job that a person does on consecutive days. Value 0 represents a rest day and one imposes a cardinality constraint on periods that are located between rest periods.
- Remark
One cannot initially state a constraint since the rest days are not yet allocated. One can also not use an constraint since it does not hold for the sequences of consecutive variables that contains at least one rest day.
- See also
related: Β (counting constraint on the full sequence), Β (counting constraint for different values on the full sequence).
specialisation: Β (maximal sequences replaced by the full sequence).
- Keywords
characteristic of a constraint: automaton, automaton with counters.
combinatorial object: sequence.
constraint network structure: alpha-acyclic constraint network(2).
constraint type: timetabling constraint, sliding sequence constraint.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Sets
-
- Constraint(s) on sets
- Graph model
Note that the arc constraint will produce the different sequences of consecutive variables that do not contain any 0. The set generator produces all the connected components of the final graph.
PartsΒ (A) andΒ (B) of FigureΒ 5.349.1 respectively show the initial and final graph associated with the Example slot. Since we use the set generator we show the two connected components of the final graph. Since these two connected components both contains between 2 and 3 variables that take their values in the constraint holds.
Figure 5.349.1. Initial and final graph of the constraint
(a) (b)
- Automaton
FigureΒ 5.349.2 depicts the automaton associated with the constraint. To each variable of the collection corresponds a signature variable . The following signature constraint links and :
.
Figure 5.349.2. Automaton of the constraint
Figure 5.349.3. Hypergraph of the reformulation corresponding to the automaton of the constraint