Thanks Mike and Pe for your comments on this. Amitesh Sinha Technical Architect Telecom Business Unit Patni Computer Systems [EMAIL PROTECTED]
-----Original Message----- From: Michael Neale [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 2:49 AM To: [email protected] Subject: Re: [drools-user] XOR group This is something that can be tackled by doing lazy condition evaluation (backward), which may be included in the future as an option. In most cases, I don't think the impact on performance would really be anything much. Of course there are some cases where it would - one "hack" which has been suggested before - is to put a lazy check inside the consequence itself. So the "condition" is not a condition node, but just a check before the consequence does what it wants. This "hack" is then invisible to the engine, but may work in some special cases. On 1/17/06, Peter Van Weert <[EMAIL PROTECTED]> wrote: > > As far as I know you cannot really do this, because Drools is a > Rete-based system, which is an eager evaluation algorithm. This means > the complete conflict set gets cumputed, followed by the selection of > one to fire (match - select - act). I guess the XOR group will then > delete the other rules from the agenda as well. That's my guess of > course, since I don't know much about the internal details of Drools. > And yes, you are right, this could get really inefficient in some cases, > but, in general, this remains limited. If it really starts to become a > performance issue, you should consider using a system based on a lazy > evaluation algorithm... > > Yours, > Pé > > > Sinha, Amitesh wrote: > > If the XOR group is used, all conditions are evaluated and only one > > consequence is executed. E.g., > > If I have N rules, all N conditions are evaluated before one consequence > > is triggered. If the value of N is very high, this is going to degrade > > the performance drastically. > > > > <rule-set> > > > > <rule name=" Rule1"> > > - > > - > > - > > </rule> > > <rule name=" Rule2 "> > > - > > - > > - > > </rule> > > . > > . > > . > > > > <rule name=" RuleN "> > > - > > - > > - > > </rule> > > </rule-set> > > > > > > Is there a way we can use so that when one condition is satisfied, none > > of the other conditions are evaluated? > > > > > > Thanks in advance, > > > > Amitesh > > > > http://www.patni.com > > World-Wide Partnerships. World-Class Solutions. > > _____________________________________________________________________ > > > > This e-mail message may contain proprietary, confidential or legally > > privileged information for the sole use of the person or entity to > > whom this message was originally addressed. Any review, e-transmission > > dissemination or other use of or taking of any action in reliance upon > > this information by persons or entities other than the intended > > recipient is prohibited. If you have received this e-mail in error > > kindly delete this e-mail from your records. If it appears that this > > mail has been forwarded to you without proper authority, please notify > > us immediately at [EMAIL PROTECTED] and delete this mail. > > _____________________________________________________________________ > > > > > http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _____________________________________________________________________
