[ library(fd) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]
# minimize_bound_check

If within a minimization, force a check of the cost variable against
the cost bound, which may lead to earlier failure.

## Description

This predicate can be used within a goal that is being minimized
using minimize/2 or any of its variants. If used in other contexts
it has no effect just succeeds.
The behaviour of minimize/2 is such that the cost bound is tightened
whenever a better solution is found, but this tightening does not
trigger an automatic check. It can therefore be advantageous and
lead to earlier failure when minimize_bound_check/0 is called after
every labeling step.

### Fail Conditions

Fails if the current cost cannot become smaller that the cost bound.
### Resatisfiable

No.
## Examples

labeling([]).
labeling([X|Xs]) :-
% do the check urgently, before any propagation happens
call_priority((indomain(X), minimize_bound_check), 2),
labeling(Xs).

## See Also

minimize / 2, minimize / 4, minimize / 6, minimize / 8