I think Scott Gallant wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > Rules firing in an endless loop...We have a thread set up specifically for > Jess.runUntilHalt(). > > In a different thread, we have things definstanced into the fact base. > > We have two rules in question. One has a higher salience than the other. > It appears that the lower salience rule is firing about 50% of the time. So > it appears to us that salience isn't being checked as we would guess. > > We turned off run-until-halt, definstanced the objects and did an agenda. > The lower salience activation has a smaller time associated with it. My > guess is that the waitForActivations() call to runUntilHalt is being > returned before the higher salience rule is activated. So the lower > salience rule fires, then we wait for activations again and then the higher > salience rule is fired. > > Is the time on the activation what I think it is?...the time that the > activation was triggered.
It's calculated from the "pseudo-time" (basically, absolute time ordering) of the assertions of the individual facts, so yes, pretty much. > Does waitForActivations return as soon as there is one activation? Yes. > > Does anyone have a suggestion? We're thinking about doing away with > salience and using more predicates, but that would be painful for us as > we've used salience across the board and made some assumptions based on > that. > > Scott This is a really interesting problem -- your diagnosis skills are excellent. The current behavior certainly is logical and practical, but unfortunately, you're right, it does make salience somewhat less... salient. One possibility would be for Jess to be modified such that all the activations due to a single assertion, retraction, or modification must appear on the agenda atomically, such that no rules could fire while they were being added. I'll have to think about whether this is desirable or even possible. Of course, if you want to try to implement this yourself and report back, I'd be happy to listen! --------------------------------------------------------- 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] --------------------------------------------------------------------
