4.2.2.14. Deprecated constraints

In this section: at_least, at_most, exactly, global_cardinality_low_up, global_cardinality_low_up_closed.

at_least

predicate at_least(int: n, array [$X] of var $$E: xs, $$E: value)

Requires at least n variables in xs to take the value value.

This constraint is deprecated. Use count(i in xs)(i=value) >= n instead.

at_most

predicate at_most(int: n, array [$X] of var $$E: xs, $$E: value)

Requires at most n variables in xs to take the value value.

This constraint is deprecated. Use count(i in xs)(i=value) <= n instead.

exactly

predicate exactly(int: n, array [$X] of var $$E: xs, $$E: value)

Requires exactly n variables in xs to take the value value.

This constraint is deprecated. Use count(i in xs)(i=value) = n instead.

global_cardinality_low_up

predicate global_cardinality_low_up(array [$X] of var int: x,
                                    array [$Y] of int: cover,
                                    array [$Y] of int: lower_bound,
                                    array [$Y] of int: upper_bound)

Requires that for all i, the value cover[i] appears at least lower_bound[i] and at most upper_bound[i] times in the array x.

This constraint is deprecated. Use global_cardinality(x, cover, lower_bound, upper_bound) instead.

global_cardinality_low_up_closed

predicate global_cardinality_low_up_closed(array [$X] of var int: x,
                                           array [$Y] of int: cover,
                                           array [$Y] of int: lower_bound,
                                           array [$Y] of int: upper_bound)

Requires that for all i, the value cover[i] appears at least lower_bound[i] and at most upper_bound[i] times in the array x.

The elements of x must take their values from cover.

This constraint is deprecated. Use global_cardinality_closed(x, cover, lower_bound, upper_bound) instead.