[Oz] Multiple evaluation question
Kent Hoxsey
khoxsey at ix.netcom.com
Wed Feb 10 03:07:05 CET 1999
I have a question about how to apply a set of constraints to each of a
group of items. I hope I can make my question clear enough to answer.
The problem I am trying to solve is a configuration problem, checking if
the configurations of attributes on an item are consistent with a set of
rules.
My model has a rule that says a certain two of the attributes of an item
cannot be the same, which I define as a reified constraint:
declare X Y R in {FD.decl X} {FD.decl Y} R::0#1
R = (X \=: Y)
Now imagine I have two items, each with two attributes:
A = item(attr1:1 attr2:2)
B = item(attr1:1 attr2:1)
What I would like to do is to apply a procedure to item A, save the
value of R, and then apply the procedure to item B and again save the
value of R. But my understanding of Oz is that once I have assigned
values to X and Y from item A and evaluated the model, I cannot reset
the values for item B, even in a procedure.
I know that I could pass in all the values to be checked as parameters
to the program, and re-execute the program each time, but I was hoping
there was a more elegant way to do this.
Regards,
Kent
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-users
mailing list