<div><br></div><div>   The algorithm as is does eager evaluation, as for the general case that is still better than doing selective evaluation. </div><div><br></div><div>   If, in your case, the decision of which rules to fire is an arbitrary application decision, and not based on the actual constraints of the rules themselves, then the only way would be by creating a control fact:</div>
<div><br></div><div>rule 1</div><div>when</div><div>   ControlFact( phase == Phase.ONE )</div><div>...</div><div><br></div><div>rule 2</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>when</div>
<div>   ControlFact( phase == Phase.TWO )</div></div><div>...</div><div><br></div><div>   This way, if the control fact is the first pattern in each rule it effectively disables all the beta evaluations for rules of phases other than the current one. Just be aware that by blocking the eager evaluation this way, phase switches are heavier than without the control fact, where most constraints were already previously evaluated. Obvious, but worth saying out loud... :)</div>
<div><br></div><div>   There is also a feature that Leonardo is working on that makes the engine automatically unlink and relink parts of the network, based on the existence and possibility of matching the other required facts in a rule LHS. It might achieve similar results to what you are looking for in some cases, but that is totally based on the constraints in there and not on any arbitrary application decision.</div>
<div><br></div><div>   Edson</div><br><br><div class="gmail_quote">2011/3/21 FrankVhh <span dir="ltr">&lt;<a href="mailto:frank.vanhoenshoven@agserv.eu">frank.vanhoenshoven@agserv.eu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
Having the same questions you had, I played a bit with agenda-groups to see<br>
if there was any notable performance effect.<br>
<br>
I added 200 extra rules which did not fire at all and did two &quot;series&quot; of<br>
rule executions. Once with all rules within the same agenda-group and once<br>
with the 200 extra rules in a different agenda-group, while setting focus to<br>
the firing rules. Allthough I cannot claim statistical significance, I<br>
didn&#39;t notice big effects.<br>
<br>
As I consider it, the reason for still evaluating all rules is because you<br>
would need an Update() statement everytime focus is switched to an other<br>
agenda-group to make sure Objects are matched to those rules.<br>
<br>
Maybe ruleflow-groups work a bit different - allthough I doubt it - but I<br>
haven&#39;t played with them yet.<br>
<br>
Regards,<br>
Frank<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Limiting-rule-evaluation-not-firing-tp2695533p2709697.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Limiting-rule-evaluation-not-firing-tp2695533p2709697.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>