I think Nik Joshi wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > Is there any way to retract a fact (inside JESS) based on time? I want to > be able to phase out facts that are older than some user set threshold of > time. I could do the phase out inside of Java but it would be nice if I > could do it in JESS. Any help is highly appreciated. Thanks! >
There are two possibilities. First, you can add a time stamp slot to the facts you want to age, and then retract them based on matching the contents of that slot. Second, jess.Fact has a getTime() method. The return value is a monotonically (but not linearly) increasing value; if you recorded the value periodically, you could then retract facts with lower values. --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
