I think Scott Gallant wrote:
> Spoke too early...with our small test case things worked well. When
> applying the change to a larger scale model. When running in a larger
> enviroment with more activity, we're not seeing rules fire at all except for
> a small set early.
>
...
>
> One thing I noticed was that you had a synchronized block around the
> getNextActivation call within the loop but the loop itself makes the same
> call.
Hmmm. This paragraph makes me wonder whether you made the patch
correctly. Note that the call to getNextActivation() in the while()
condition is to be deleted and replaced by a new one inside the
synchronized block -- hence there's still only one call per iteration
of the loop. If you've got -both- calls then you're going to lose
activations, with the extreme case being that no rules would fire at
all, as you observe.
> In any recent version of Jess, in jess/Agenda.java, in the
> two-argument form of run(), there's a while loop that looks like this:
>
> while (!m_halt && n < max && (a = getNextActivation(r)) != null) {
> ...
> }
>
> Change it to look like this:
>
> while (!m_halt && n < max) {
> synchronized (r.getCompiler()) {
> if (a = getNextActivation(r)) == null)
> break;
> ...
> }
> }
---------------------------------------------------------
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]
--------------------------------------------------------------------