Re: JESS: String to Symbol

2005-11-08 Thread Roger Studner
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.

Re: JESS: String to Symbol

2005-11-08 Thread Roger Studner
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 ?

Re: JESS: Accessing the Java object behind a shadow fact in a userfunction

2005-11-14 Thread Roger Studner
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

JESS: defquery

2005-11-14 Thread Roger Studner
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

JESS: Hrmm.

2005-11-14 Thread Roger Studner
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

Re: JESS: Object to built-in type

2005-11-18 Thread Roger Studner
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,              

Re: JESS: Size of an activation record

2005-11-22 Thread Roger Studner
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

JESS: creating an audit trail

2005-12-01 Thread Roger Studner
conditions on the RHS. Any suggestions? Thanks, Roger Studner

Re: JESS: creating an audit trail

2005-12-01 Thread 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 > &

JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
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

Re: JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
#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

Re: JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
, 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.

Re: JESS: Goal in each action

2006-01-26 Thread Roger Studner
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

Re: JESS: Finding fact the max/min slot value

2006-02-01 Thread Roger Studner
(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

Re: JESS: Re: Java Date in JESS

2006-02-02 Thread Roger Studner
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/