Judson, Ross wrote:
There are a few obvious ways to do simple things with time (expiring
facts, etc)...but I am wondering if there are some "best practices" in
this regard.  Constructing time-oriented caches of facts, waiting for a
certain amount of time to elapse...

Would anyone care to comment?
Here's what we're doing. Each fact in our expert system is a definstance from a Java bean. Every bean has at least these two properties: serialNumber and timeStamp. In the Java app. that uses Jess, we keep a list of active beans. We periodically scan the list for old beans--the ones that have a timeStamp that is too old. For each bean that is too old, we find its related fact by its serialNumber and retract the fact, and remove it from the list of active beans. Thus the beans that are too old are both eligable for garbage collection, and their related facts are removed from the expert system.

--
Richard Kasperowski
Tel: 617-576-1552, Fax: 617-576-2441
mailto:[EMAIL PROTECTED]
http://www.altisimo.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]
--------------------------------------------------------------------

Reply via email to