If you just want to keep the most current data, then you have two
choices:
1) When an update comes in, find the old record for that track in
Jess's working memory, delete it, and add the new data (or modify
it). That finding step represents some potentially avoidable work
(although depending on how your data is structured, it may be a fast
operation in Jess).
- or -
2) Remember ( I want to say keep track of, but that'd be
confusing!) the association between each track and its working memory
record(s), and then when an update is available, you can do the
replacement efficiently.
For version 1), you might use a defquery to find the old facts so you
can remove them. For version 2), you might use a data structure
outside of Jess to serve as an adapter.
On Jul 18, 2007, at 3:24 PM, Krasnigor, Scott L (N-AST) wrote:
I have track kinematic data in working memory. When a track’s
kinematics are updated, I need to modify the associated kinematic
data in working memory. I tried using the add method, however,
looking at the watch statements, new facts were being created
instead of modifying the existing facts. I realized the user is
creating new kinematic objects for each update instead of using
existing objects so that I am unable to use add to update existing
kinematic facts in working memory. I am curious what would be the
most efficient way to perform this update. Thanks for any assistance.
Scott
-
Ernest Friedman-Hill
Advanced Software Research Phone: (925) 294-2154
Sandia National LabsFAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.com
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]