Or you could watch the advice for rule firing and keep a count.

alan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:ejfried@;ca.sandia.gov]
Sent: Thursday, November 14, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: Re: JESS: fireing one rule when none of the others fire


This is a kind of meta-linguistic thing; you want a rule to be able to
reason about what other rules will do or have done. This isn't a
feature that Jess currently offers.

Furthermore, it's a vague problem statement, because I don't know if
you mean "has fired in response to a specific assertion" or "has fired
since run was called, and run is about to return without firing any
rules." But if you mean the latter -- i.e., you want to perform an
action if run() would return without firing any rules --  then that's
easy, because both (run) and Rete.run() return the number of rules
fired. You can do this:

(if (eq 0 (run)) then
    (do whatever))

The statement (do whatever) could include (run) if your action
modifies working memory so that other rules may be activated.





I think Richard Patten wrote:
> 
> Hello everybody,
>   I want to make a rule fire if none of the other rules fire (this is very
important, I dont want to fire this rule if any other rule has fired).  Its
something like specifying an 'else' statement in a program.  How can I
achieve this in JESS.
> 
> thanks
> Richard.
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site



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

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