Dear Mark,
On Jun 3, 2009, at 6:47 PM, mark richardson wrote:
2. What data structure would be best to model virtual actors. (All
their
features are known, it is the change of state we are looking for).
Initially I thought a class would be the ideal structure, but how easy
is it to use classes in a constraint based environment?
If you know all the features of your data structure in advance, then
why not using plain (determined) records?
I am using objects in constraint problems all the time -- using them
in a script is strait forward. The advantage is that you can define
your data structure incrementally (inheritance). The disadvantage is
that it takes more memory if the objects are in the script and are
therefore copied all the time during search (when their spaces are
copied). So far I have not found a way to have the objects outside
the script and only the variables encapsulated in the objects are
inside the script (or at least no way without much programming
overhead effort).
Best
Torsten
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users