I only want one notification no matter how many thresholds are exceeded in a 
data set.  How can this be done using three separate rules?

Thanks,
John


>From: "x xu" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: JESS: appropriate use of 'if' function?
>Date: Thu, 18 Apr 2002 14:12:14 -0700 (PDT)
>
>Why not use three seperate rules for each threshold?
>
>--- John Barr <[EMAIL PROTECTED]> wrote:
> >
> > (defrule notify-with-reason
> >     (thresholds (RPM ?RPM-threshold)
> >                 (Temperature ?Temperature-threshold)
> >                 (Pressure ?Pressure-threshold))
> >     (data-set (RPM ?RPM-value)
> >               (Temperature ?Temperature-value)
> >               (Pressure ?Pressure-value))
> >     (test (or (> ?RPM-value ?RPM-threshold)
> >               (> ?Temperature-value
> > ?Temperature-threshold)
> >               (> ?Pressure-value
> > ?Pressure-threshold)))
> > =>
> >     (bind ?reason-code 0)
> >     (if (> ?RPM-value ?RPM-threshold)
> >         then (bind ?reason-code (bit-or ?reason-code
> > 1)))
> >     (if (> ?Temperature-value
> > ?Temperature-threshold)
> >         then (bind ?reason-code (bit-or ?reason-code
> > 2)))
> >     (if (> ?Pressure-value ?Pressure-threshold)
> >         then (bind ?reason-code (bit-or ?reason-code
> > 4)))
> >     (printout t "THRESHOLD EXCEEDED, REASON CODE IS
> > " ?reason-code crlf))
> >
> > (reset)
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
>http://taxes.yahoo.com/
>
>--------------------------------------------------------------------
>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]
>--------------------------------------------------------------------
>


_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to