[ library(gfd) | Reference Manual | Alphabetic Index ]

<ConsistencyModule:> all_ge(?Collection,?Y)

Constrains Collection to be greater than or equal to Y.
Collection
Collection of integers or (domain) variables
Y
An integer or (domain) variable (array notation accepted)

Description

Constrains every element in Collection to be greater than or equal to Y.

ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_bc for bounds consistency, and gfd_gac for domain (generalised arc) consistency.

This constraint is known as arith (with the greater than or equal to relation) in the Global Constraint Catalog, and is implemented using Gecode's rel() constraint.

Examples

[eclipse 34]: [X,Y,Z] :: 1..10, all_ge([X,Y,Z], 5).

X = X{[5 .. 10]}
Y = Y{[5 .. 10]}
Z = Z{[5 .. 10]}

[eclipse 35]: [X,Y,Z] :: 1..10, all_ge([X,Y,Z], A).

X = X{[1 .. 10]}
Y = Y{[1 .. 10]}
Z = Z{[1 .. 10]}
A = A{[-1000000 .. 10]}

[eclipse 36]: all_ge([3,4,5],3).            % succeed

[eclipse 37]: all_ge([2,3,4,5],3).          % fail

See Also

#>= / 2, all_lt / 2, all_gt / 2, all_le / 2, all_ne / 2, all_eq / 2