Thanks, although "well known" is a relative term--and the online documentation (http://www.mozart-oz.org/documentation/system/node22.html#label186 ) isn't that all that helpful unless you already know what it's talking about. 
 
When I replace FD.distinct with FD.distinctD in the Sudoku code, the number of search nodes for the sample problem drops from 20 to 0!
 
-- Russ

 
On 11/10/05, Raphael Collet <[EMAIL PROTECTED]> wrote:
Russ Abbott wrote:
> In answer to the question in the previous message, it appears that
> FD.distinct doesn't figure out that the cell between 7 and 6 must be 2.
>
>     declare A B C V = [A B C]
>     V ::: 1#3
>     {FD.distinct V}
>     A \=: 2
>     B \=: 2
>     {Show V}

FD.distinct is well known for not being clever in that case.  Use
FD.distinctD instead.  This one will detect that the set {A,B}={1,3},
and propagate that C does not belong to that set, giving C=2.

   {FD.distinctD V}

Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to