This constraint ensures that the cardinality (the number of occurrences) of values in Vars conforms to the specifications in Bounds. Bounds is a list of specifications in one of the following forms:
Note that all values that Vars can take must be specified in Bounds.
ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_gac for generalised arc consistency (domain consistency), gfd_bc for bounds consistency, and gfd_vc for value consistency.
This constraint is known as global_cardinality (occ{} spec) and global_cardinality_low_up (gcc{} spec) in the Global Constraint Catalog, and is implemented using Gecode's count() constraint (variant with two IntVarArgs and an IntArgs). The semantics is different from that given in the catalog, which does not require all values that Vars can take be specified by Bounds.
[eclipse 2]: gcc([occ{occ:2,value:3},occ{occ:0,value:5},occ{occ:1,value:6}], [3,3,8,6]). % fails -- value 8 not specified in Bounds [eclipse 3]: gcc([occ{occ:2,value:3},occ{occ:0,value:5},occ{occ:1,value:6}, gcc{low:0,high:3,value:8}], [3,3,8,6]). % succeed