5.195. int_value_precede
DESCRIPTION | LINKS | AUTOMATON |
- Origin
- Constraint
- Synonyms
, , .
- Arguments
- Restrictions
- Purpose
-
If value occurs in the collection of variables then its first occurrence should be preceded by an occurrence of value .
- Example
-
The constraint holds since the first occurrence of value 0 precedes the first occurrence of value 1.
- Typical
- Symmetries
- Arg. properties
Suffix-contractible wrt. .
Aggregate: , , .
- Algorithm
A filtering algorithm for maintaining value precedence is presented inΒ [YatChiuLawJimmyLee04]. Its complexity is linear to the number of variables of the collection .
- Systems
precede in Gecode, value_precede in MiniZinc.
- See also
generalisation: Β ( of 2 replaced by of at least 2 ), Β ( of replaced by of ).
- Keywords
characteristic of a constraint: automaton, automaton without counters, reified automaton constraint.
constraint network structure: Berge-acyclic constraint network.
constraint type: order constraint.
symmetry: symmetry, indistinguishable values, value precedence.
- Automaton
FigureΒ 5.195.1 depicts the automaton associated with the constraint. Let be the variable of the collection. To each triple corresponds a signature variable as well as the following signature constraint: .
Figure 5.195.1. Automaton of the constraint (state means that value was not yet encountered, while state means that value was already encountered)
Figure 5.195.2. Hypergraph of the reformulation corresponding to the automaton of the constraint