Fun one with Accumulate:
(deftemplate encounter
(slot date)
(slot code))
(reset)
(assert (encounter (date "2005-10-31") (code 440)))
(assert (encounter (date "2005-10-31") (code 440)))
(assert (encounter (date "2005-10-31") (code 777.1)))
(assert (encounter (date "2005-10-31") (code 468.
This (that uses ?c and ?s) also prints 0 every time.
Thanks again and again,
Roger S.
On 11/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I think Roger Studner wrote:
>
> >
> > (defrule count-icd9-codes
> >
> > ?c <- (accumulate (bind ?
Get from the slot OBJECT.
something like (bind ?obj (fact-slot-value ?fact OBJECT))
I could be wrong :)
On 11/14/05, erich.oliphant <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am implementing a convienenice userfunction that takes a bound shadow
> fact
> as an argument and returns some of it's deep
I am trying to do some 'counting'.
I make a defquery to return a fact. I get back the Iterator.. i retreive the token.. I get the fact.
When I try to modify the fact.. I get an error that 'the fact is not in working memory'.
I mean, I even asserted the fact before using it. I just don't
want t
Can someone explain slot-specific to me?
ex:
(deftemplate ICD9_COUNTING_GROUP (declare (slot-specific TRUE))
(slot count)
(multislot codes))
from the LHS of my rule:
?cGroup <- (ICD9_COUNTING_GROUP
(codes $?codes))
from the RHS of my rule:
(modify ?cGroup (count (+ 1 ?theC
You can use instance of, do a cast, and then contruct the right Value
(or LongValue in the case of a Long/long) and then set a slot with that
value.
Source code examples help, so here ya go:
public static void insertFactFromTemplateNameAndSlotValueMap(Rete engine, Deftemplate t,
And even an addendum to this question:
Is there (I read something 'akin' to this in the mailing archive) a big
performance hit as well?
I like to use beans/shadow facts for a variety of reasons, but have always
been under the impression that when i'm going to assert a 'huge' number of a
particula
conditions on the RHS.
Any suggestions?
Thanks,
Roger Studner
use it to track various
'inferred' pieces of information.
Thanks both of you for your help
Roger S
On 12/1/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I think Roger Studner wrote:
> > Has anyone has success in industry with a pattern or methodology for
> &
Are there situations or usages of (accumulate) that would actually prevent a rule from firing?
?c <- (accumulate (bind ?count
0)
;; initializer
(bind ?count
(+ ?count
1))
;; action
?count
(pattern to look for.. sing
#x27;s how you
can sweep a lot of data of different type together in one rule. The rule still
fires of some types are not present.
Martijn
From:
Roger Studner [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 2 december 2005
13:19
To: jess-users@sandia.gov
Subject: JESS: Accumulat
, or the rule
> will never fire.
>
> Other than that, yes, it should fire whenever the preceding patterns
> or its own embedded pattern match, returning 0 if the count is indeed 0.
>
>
> I think Roger Studner wrote:
> [Charset iso-8859-1 unsupported, filtering to ASCII.
To jump in.. I suggest that everyone buys that book if they are going to use
Jess. It *does* repeat some material available in the online docs and other
places, but also includes quite a good bit more code and examples than I
found anywhere else.
Roger Studner
On 1/26/06, Daniela CLARO <[EM
(defrule biggest-number
(number ?number)
(not (number ?num2 > ?num))
=>
(printout t "biggest number: ")
(printout t ?number crlf)
)
I think?
On 2/1/06, erich.oliphant <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am trying to figure out the best way to have a rule fire only for a fact
> whose slot
Not to dodge the answer, but I do milliseconds in all my date work. I guess
in my mind I just didn't mind have a 'bean' object that did the work for me
to allow my rules to be ignorant of what the value field type was that was
being compared (until RHS 'pretty printing' of course)
Roger
On 2/2/
15 matches
Mail list logo