On Oct 24, 2006, at 4:33 AM, [EMAIL PROTECTED] wrote:
I'd like to know "when there is
no more rule left to be triggered " to inject another fact (or maybe retract the no processed rule from working memory), I want to stay in the loop until fact generator goes out of fact. How can know that there is no other rules to
be trigers without leaving the cycle.

The "run" function (both in Jess and in Java) returns when there are no more rules to fire. So you can just do

while (true) {
    myRete.run();
    makeSomeMoreFacts();
}


or

(while TRUE
    (run)
    (makeSomeMoreFacts))


---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          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]
--------------------------------------------------------------------

Reply via email to