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

deletemin(?Var, +List, -Rest)

Select from List the variable Var which has the smallest lower domain bound, and return the rest of the list.
A variable.
A term unifying with a list of domain variables or integers.
A list of domain variables or integers.


This predicate is used in labeling procedures. Especially when labeling start times in scheduling problems, it is often a good strategy to start with the earliest possible tasks, because fixing those will cause useful bounds propagation on the start times of the other tasks. This predicate selects from a list the variable with the smallest lower bound. Numbers are treated as if they were variables with singleton domains.

Fail Conditions

Fails if List is empty.




   start_time_labeling([]) :- !.
   start_time_labeling(Vars) :-
        deletemin(X, Vars, Rest),

See Also

deleteff / 3, deleteffc / 3, indomain / 1, labeling / 1