[ library(ic_global) | Reference Manual | Alphabetic Index ]
atmost(+N, ?Vars, +V)
At most N elements of Vars have the value V.
- +N
- An integer
- ?Vars
- A collection (a la collection_to_list/2) of domain variables or integers
- +V
- An integer
Description
   This constraint ensures that at most N element of Vars have the value V.
   As soon as some domain variable from the collection is updated, this
   constraint is woken and it checks if the constraint is still satisfiable
   and if so, if it is already satisfied or not.
Fail Conditions
   Fails if more than N elements of Vars are instantiated to V.
Resatisfiable
   No.
See Also
element / 3, occurrences / 3, lists : collection_to_list / 2