5.32. atmost
| DESCRIPTION | LINKS | GRAPH | AUTOMATON |
- Origin
CHIP
- Constraint
- Synonym
.
- Arguments
- Restrictions
- Purpose
At most variables of the collection are assigned value .
- Example
-
The constraint holds since at most 1 value of the collection is equal to value 2.
- Typical
- Symmetries
Items of are permutable.
can be increased.
An occurrence of a value of can be replaced by any other value that is different from .
- Systems
occurenceMax in Choco, count in Gecode, count in JaCoP, count in SICStus.
- See also
common keyword: Β (value constraint).
generalisation: Β ( replaced by ).
implied by: Β ( replaced by ).
related: .
- Keywords
characteristic of a constraint: automaton, automaton with counters.
constraint network structure: alpha-acyclic constraint network(2).
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
Since each arc constraint involves only one vertex ( is fixed), we employ the arc generator in order to produce a graph with a single loop on each vertex.
PartsΒ (A) andΒ (B) of FigureΒ 5.32.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property, the loops of the final graph are stressed in bold.
Figure 5.32.1. Initial and final graph of the constraint


(a) (b)
- Automaton
FigureΒ 5.32.2 depicts the automaton associated with the constraint. To each variable of the collection corresponds a 0-1 signature variable . The following signature constraint links and : . The automaton counts the number of variables of the collection that are assigned value and finally checks that this number is less than or equal to .
Figure 5.32.2. Automaton of the constraint

Figure 5.32.3. Hypergraph of the reformulation corresponding to the automaton of the constraint
