Re: JESS: Can't use funcalls in backchained patterns?

"Henrique Lopes Cardoso" <[email protected]>
Newsgroups gmane.comp.java.jess
Message-ID <[email protected]>
That's correct.

Furthermore, I want to generate (time) facts only if they are used in
the LHS of a rule, not in other uses of (k) patterns. That was the point
of using back-chain.
Another issue is that rules are added at runtime. I may have some rules
of the form

   (k (when ?w)
   (time (when =(+ ?w ...)))
   => ...

but also some other rules of the form

   (k (when ?w)
   => ...

Doing the
    &:(progn (schedule-time-alert (+ ?w 3000)) TRUE)
thing in all rules of the former type is just more troublesome.

But if that's the only solution, maybe I'll stick to it.

Thanks.

Henrique



Ernest Friedman-Hill wrote:
> It would, but then you'd need a second rule to actually act on the
> alert. I think Henrique was looking for a way to do it in one rule,
> imagining that there would be many triggers like this.
>
>
> On Jul 21, 2010, at 10:05 AM, Wolfgang Laun wrote:
>
>> Why wouldn't a simple
>>
>> (defrule r
>>   (k (when ?w))
>> =>
>>   (schedule-timer-alert (+ ?w 3000))
>> )
>>
>> be sufficient?
>>
>> -W
>>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Informatics & Decision Sciences, Sandia National Laboratories
> PO Box 969, MS 9012, 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].
> --------------------------------------------------------------------
>
>

-- 
----- - - - - -  -  -  -  -  -   -   -
Henrique Lopes Cardoso
DEI/FEUP
Rua Dr. Roberto Frias | 4200-465 Porto
PORTUGAL
(+351)225081400 ext.1315
[email protected] | www.fe.up.pt/~hlc
----- - - - - -  -  -  -  -  -   -   -



--------------------------------------------------------------------
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].
--------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.