On 05.10.2005, at 02:55, Russ Abbott wrote:
I was apparently also confused about FD. I had imagined that FD would
apply to any finite domain. Looking at the tutorial, CTM, and the FD
documentation, it now seems that FD is restricted to integers.
For example, I wanted to do a simple version of the Zebra puzzle .
When I looked at the Zebra solution
(http://www.mozart-oz.org/documentation/fdt/node23.html ) for
guidance, I found that even though the problem has no numbers in its
problem statement, the solution is expressed in terms of integers
(house numbers). Is there any way to do this problem (using FD or
some other Oz feature) that doesn't require that the search space be
defined in terms of integer ranges?
FD integers are indeed limited to non-negative integers. However, you
may map them to arbitrary values in the solution (e.g. by interpreting
them as indices in a tuple).
The reason for this limitation is that all FD propagators are
implemented for integers.
Finally, I'm also confused about terminology. In the Zebra puzzle, the
distribute line is
{FD.distribute ff Nb}. But the documentation for FD.distribute says
the final argument must be a vector of FD ranges. Nb isn't a vector.
It' s a record whose fields have integer ranges as values. So what is
the limitation on the final argument of FD.distribute?
"A vector is a record with a label different from '|' or a list. The
elements of the list or the fields of the record are called the
elements of the vector. A finite domain vector is a vector all of whose
elements are finite domain integers."
http://www.mozart-oz.org/documentation/system/
node8.html#chapter.types_modes_constr
Best,
--
Torsten Anders
Sonic Arts Research Centre
Queen's University Belfast (UK)
www.torsten-anders.de
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users