clpfd constraints not taking effect
James Hogan <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAAG0J9-J+jabSNg74YOMKJ0UmTE9=667x6TkDbSAtrv9UAM6TA@mail.gmail.com> |
Hi, I have a whole bunch of constraints being fed into clpfd, however sometimes some of them don't seem to take effect. I've reduced one particular case down to something like this: ?- B #= C+1, B #< D, C #>= 10, C #>= 100. B in 101..sup, B#=<D+ -1, C+1#=B, D in 12..sup, C in 100..sup. The last constraint doesn't seem to have taken effect B in 101..sup, but B < D, so D should be reduced to 102..sup. It works as I expected if I: * swap the last two constraints around * or remove the C#>= 10 * or add another constraint C #< 1000000 Any ideas what's happening here, and whether there's anything I can do to force clpfd to enforce all the constrains without having to try and enforce an order on the constraints or add arbitrary constraints to avoid sup? Thanks -- James Hogan