(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 value is
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 [EMAIL
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.. single fact, not even complex)
)
If there are *no matches* to this pattern,
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
tracking which rules fires and for what facts through
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
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,
String
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 deeply
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 to
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.1)))
(assert
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 ?count 0) ;; initializer
(bind ?count (+ ?count 1)) ;; action
?count ;; result
(encounter (code ?c
10 matches
Mail list logo