Hi,
I have the following problem:
I want to update the intensity parameter of a fact through time. For 
instance: (a 1 5.0) meaning that "a" has intensity "5.0" at time-stamp "1". 
I want that "a" at time-stamp "2" becomes something like (a 2 3.4) where the 
intensity value is calculated from a function "f-of-time". Besides this, I 
have one rule that changes facts when a specific situation is true, which in 
this case I didn�t want the update rule to fire (because the change rule 
returns the facts updated already). Here are the rules:

(defrule change
?f1 <- (a ?ts1 ?int1)
(situation s1)
=>
(retract ?f1)
(assert (a (my-get-time) (f-of-time ?ts1 ?int1)))
(assert (update a false)))


(defrule r-update
?f1 <- (update a true)
?f2 <- (a ?ts ?int)
=>
(retract ?f1)
(retract ?f2)
(assert (a (my-get-time) (f-of-time ?ts ?int))))


I wanted with these rules the following sequence:
>(assert (a 1 5.0))
>(run)
---> fire r-update and generate (a 2 3.4)
>(run)
---> fire r-update and generate (a 3 2.2)
>(assert (situation s1))
>(run)
---> fire change (and not fire r-update) and generate (a 4 10.0)
>(run)
---> fire r-update and generate (a 5 9.2)
>(run)
---> fire r-update and generate (a 6 8.1)

but the rules I wrote don't do this, because the first time r-update fires 
it retracts the (update a true) fact and this rule will never fire again, 
but I cannot take the rectract out because that way the r-update would enter 
in a infinite cycle.

Could any one help me with this?
Thanx.
Dario








_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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