Counting backtracks with several calls to fd_labeling
Nicolas Barnier <[email protected]> Tue, 27 May 2025 16:54:51 +0200
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Dear All,
I can't figure out a way of properly counting the (total) number of
backtracks with the finite domain solver in presence of several calls to
fd_labeling, like in the following example (where my naïve attempt
obviously fails):
solve(Xs, Ys, B):-
[... define model with variables Xs and Ys ...]
fd_labeling(Xs, [backtracks(BX)]),
fd_labeling(Ys, [backtracks(BY)]),
B is BX+BY,
[... print solution ...].
Any suggestion?
Best regards,
-- Nicolas