You have to make time explicit. Look at the FAQ (http:// www.jessrules.com/FAQ.shtml) for a simple rule that manages a "clock" fact, so your rules can know what time it is; then you need to add a slot to your templates to hold a timestamp. You could use the default- dynamic slot property to automatically set this when a fact is asserted. The you just write the rules against the time fact and timestamp slots.
On Feb 20, 2008, at 12:01 PM, Marco Zappatore wrote:
Dear Jess Developers, is there a way to compare the exact time at which two or more facts have been added to the working memory? For instance: -asserts fact f1 at time t -asserts fact f2 at time t+dt -activates some rules if dt not exceeds a given threshold -activates some other rules if not I'm already able to do that shifting from jess to java and viceversa but is it possible to do that directly in Jess without using a proper user-defined Java function.
--------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences Phone: (925) 294-2154 Sandia National Labs FAX: (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] --------------------------------------------------------------------
