Hi all, I use Jess and Jade for building a multiagentsystem. Some of my agent rules should do a timebased firing.
I am not sure, what the best way is to do this. As an example, I try it in the following way: (assert(the-first-fact)) (bind ?timestamp (long(time))) (assert(timevalue ?timestamp)) (bind ?time (+ 5 (long(time)))) (assert(timemarke ?time)) (facts) (defrule check-time ?f <- (the-first-fact) (timevalue ?timestamp) (timemarke ?time) (test(= ?time ?timestamp)) => (retract ?f) (bind ?time (long(time))) (printout t "It fired at : "?time crlf) ) (defrule update-rule (declare (salience -100)) ?f <- (timevalue ?timestamp) => (retract ?f) (bind ?timestamp (long(time))) (assert (timevalue ?timestamp)) ;;(printout t "?timestamp : "?timestamp crlf) ) (run) Is this a good way to do temporal reasoning? Do I need the salience at rule update-rule? Thanks very much for help, Vincent ______________________________________________________________________________ FreeMail in der Premiumversion! Mit mehr Speicher, mehr Leistung, mehr Erlebnis und mehr Pramie. Jetzt unter http://club.web.de/?mc=021105 -------------------------------------------------------------------- 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] --------------------------------------------------------------------
