There are several other ways:
 
- assign priorites to rules, i.e., salience
- write a function computing the discount and call this function
- in the rule for >100, add (!) the discount for the range 100:200 and in the 
rule >200 add (!) the additional (!) discount for 200:infinity.
 
-W
 

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]im Auftrag 
von Juan Sequeda
Gesendet: Mittwoch, 15. April 2009 06:04
An: [email protected]
Betreff: JESS: Re: How to decide which rule to use


I know I can state in the first rule that the discount is for more than 100 and 
less than 200. But I want to know if there is another way.

Thanks





On Tue, Apr 14, 2009 at 11:00 PM, Juan Sequeda < [email protected]> wrote:


Hi

I'm guessing this may be a common question, but it seems that the Jess website 
is down and can't find the answer.

In the Pricing demo there is a rule:
Give a 10% discount to everybody who spends more than $100.

Now what happens if I create another rule:

Give a 20% discount to everybody who spends more than $200.

and if somebody spends more than $200, both rules get applied, which means that 
there is first a discount of 10% and then the second rule runs and gets a 
discount of 20%. Is there a way to let just one specific rule run and not both?

Thanks for the help

Juan Sequeda, Ph.D Student
Dept. of Computer Sciences
The University of Texas at Austin
www.juansequeda.com
www.semanticwebaustin.org



Reply via email to