On May 8, 2008, at 10:03 AM, ivo jonker wrote:
I see. That sounds good.
Does this mean Jess automatically evaluates the rules when i call
the Modify for every second i update the Time?
Pattern matching is driven by working memory changes, and it's very
smart about what to re-test. That's the whole point of the "Rete
algorithm" on which Jess is ultimately based. When the time is
updated, patterns that check the time in some way may be re-evaluated.
Jess does the minimum possible amount of computation.
2008/5/8 Ernest Friedman-Hill <[EMAIL PROTECTED]>:
On May 8, 2008, at 9:24 AM, ivo jonker wrote:
Thanks a lot, this is exactly what i was looking for.
I've just ordered the book: Jess in action and it should arrive
shortly. I'm looking forward to it and i know it will be usefull.
Anyway, while i'm at it. I was wondering how JESS would be suitable
for using Time as a fact. I believe jess is not able to respond 100%
real-time, so i guess it's useless using time as a fact when testing
for changes into seconds... I might be wrong though.
It works fairly well, actually. You have a fact like
(time (seconds 87268726))
and then have a thread, either written in Java or in Jess, which
keeps a reference to this Fact object and uses Rete.modify() or
(modify) to update the "seconds" slot periodically. Then your rules
can just match that slot however they like and when the fact is
updated the matches are evaluated.
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.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]
.
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.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]
--------------------------------------------------------------------