On 06/07/11 02:15, Lyle Kopnicky wrote:
OK, thanks. It would be nice to get an error at the level of the sugar
instead of the desugared version. (I think I just volunteered myself. :)
I had originally used this constraint instead:
Item1*Item2*Item3*Item4 div 1000000 =: 711
No errors, but the answer I get is:
[sol(_{1#708} _{1#708} _{1#708} _{1#708})]
Dear Lyle,
A quick response that might help (I don't have time to look at it in
detail):
The equation Item1*Item2*Item3*Item4 div 1000000 =: 711 is not a
constraint in the FD library, so it is decomposed into library
constraints. This introduces temporary variables! The problem is that
these variables are standard unbound variables. They must be FD
variables, otherwise constraints using them will block (that is, wait
until they become FD variables, which never happens!).
The upshot is that you should only call constraints in the FD library
and you have to declare all variables in the problem as FD variables.
Don't let the compiler decompose constraint expressions!
Peter
_________________________________________________________________________________
mozart-users mailing list
mozart-users@mozart-oz.org
http://www.mozart-oz.org/mailman/listinfo/mozart-users