You could assert a checkpoint fact, such as (checkpoint ?timestamp), and
then later retract all facts asserted after this timestamp by comparing the
fact-id of the checkpoint fact.

This technique assumes:

a) fact-id's are increasing numeric values
b) you haven't reached the max fact-id value (wrap-around)

but otherwise, it should work.

alan

-----Original Message-----
From: Nik Joshi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 3:13 PM
To: [EMAIL PROTECTED]
Subject: JESS: retracting a fact based on time?


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!

- Nik.

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

--------------------------------------------------------------------
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