Simple predicate for instantiating a collection of GFD domain variables to elements of their domains. (Integers are also allowed in the collection; they are effectively ignored.) The variables are instantiated in the order in which they appear in the collection; the implementation is essentially:
labeling(Vars) :-
collection_to_list(Vars, List),
gfd_update,
( foreach(Var,List) do
indomain(Var,min)
).
Note that labeling performs the search in ECLiPSe, but it uses
indomain/2 with min, which is optimised for use with Gecode, and a
gfd_update before the labeling starts to ensure that no recomputation
will not be done for events before the labeling starts.