Re: Counting backtracks

From: Joachim Schimpf <>
Date: Wed 30 Apr 2003 07:45:23 PM GMT
Message-ID: <>
Karen Petrie wrote:
> ...
> One question I have though, is that I can not find an equivalent of the
> minimize predicate in the IC library, is it possible to do this with IC?

The library(branch_and_bound) contains a generic minimize predicate,
which works for all solvers, including ic and fd.
You should use it even for fd because it imposes the bounds
slightly more eagerly and can therefore prune earlier in some
There is also a variant called bb_min/3 which allows you to select
different strategies and parameters for the b&b process.

For library(branch_and_bound), your code needs to be modified
slightly, because the event 280 is not used. Simplify your
write_info code as follows

        printf("Found a solution with cost %d \n", [Minimum]),
        printf("Backtracks to this point = %d \n \n", [B]).

and to do the minimization call

    bb_min(mylabeling(SearchVars), OptimalNumber,
           bb_options with [report_success:write_info/1])

 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc                     /
 Imperial College London    /
Received on Wed Apr 30 20:45:31 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:23 PM GMT GMT