The definition of "all rules have fired on it" is somewhat
application-dependent, so there's no automatic way to do what you
want; but there's generally some way to accomplish it yourself. For
example, you might use a low-salience rule that only fires if there
are no other activated rules:
(defrule remove-old-heart-rate-facts
(declare (salience -100))
?hr <- (heart-rate)
=>
(retract ?hr))
I think Stephen Elliott wrote:
> is there a way to remove facts only when all rules have fired on it?
>
> in my case, the Rete engine is set to run-until-halt, and i have a set
> of rule that all use, for example, a heart-rate fact. however, after
> they have all used the heart rate fact, there's no need to have it
> around, so i want to retract the fact.
>
> what's the best way to do this?
>
> thanks,
>
> -stephen
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------