Hi Folks,

I'm looking to use JESS in an alarm processor subsystem. I look to your experience to let me
know if JESS is the right tools or if there is a better solution.

My main question is about handling temporal issues within JESS. Such as rule timeouts. What i think I'm looking for is a implementation of a watchdog timer or similar. Or maybe I've missed something (like backward chaining : not sure I
understand that really ) that already accomplishes the following:

For example. Rule X fires is rules A, B and C fire. Rule X outputs the message " A and B and C fired" however Rule Y fires if rules A and C fire but rule B does not. Rule Y outputs the message " A and C fired. But B failed to fire"

Now in my application the data can be received out of order and sometimes due to faults are never received. I would like rule Y to fire to signal that data has not been received BUT only after an appropriate time out, in case the data is delayed

At the moment :
(A) fact asserted (i.e. data enters to satisfy rule A)
Rule A fires
(C) fact asserted
Rule C fires
Rule Y fires
"A and C fired. But B failed to fire"
(B) fact asserted
Rule B fires
Rule X fires
"A and B and C fired"

Net result : the operator sees a problem message where none exists. Since this is output from the JESS engine,
the output cannot be recalled or de asserted like facts in working memory.

ideal solution :
Rule Y modified to fire only if (B) is not received 30 seconds after all other conditions are met
(A) fact asserted
Rule A fires
(C) fact asserted
Rule C fires
Rule Y fires - but now waits till its timeout expires
< 16 seconds pass >
(B) fact asserted
Rule B fires
Rule Y expires as conditions are not met
Rule X fires
"A and B and C fired"
<reset>
(A) fact asserted
Rule A fires
(C) fact asserted
Rule C fires
Rule Y fires - but now waits till its timeout expires
< 31 seconds pass >
Rule Y fires as conditions are now met
"A and C fired. But B failed to fire"

PS. I would be willing to write this up for the wiki later if a good JESS solution is hammered out.
Thanks
Gary


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