Hi there,

I want to set up a rule system which observes external sensor values 
continously, i.e. the temperature. If a certain limit is exceeded, a rule 
should fire. The problem is, that Jess executes rules until no more matching 
facts are found and the then stops. If a sensor exceeds it's limits after 
this run, nothing will happen.
The way I will try to solve this is by defining a "isidle"-rule with minimum 
salience, which matches on a special "dorun"-fact, retracts it, waits some 
time (100 ms) by calling an external wait function and asserts a new 
"dorun"-fact. If a sensor value has reached it's limit, the corresponing rule 
will fire, otherwise the "isidle"-rule will fire again.
Moreover, a special "stop"-rule will be defined with a higer salience than the 
"isidle"-rule, in order to be able to stop the running rule engine (which run 
in a seperate thread) by asserting a "stop"-fact.
Is this a reasonable solution or is there a possibility to reach this goal in 
a more simple way?

Johannes

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