JESS: Finding fact the max/min slot value

2006-02-01 Thread erich.oliphant
Hi, I am trying to figure out the best way to have a rule fire only for a fact whose slot value is the min or max of a group of facts. For example: (deftemplate number (slot value)) (assert number (value 1)) (assert number (value 2)) (assert number (value 3)) (assert number (value 4))

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

2006-02-01 Thread ejfried
I think erich.oliphant wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hi, I am trying to figure out the best way to have a rule fire only for a fact whose slot value is the min or max of a group of facts. Match a negated pattern to the (nonexistent) fact in which some number is

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

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

2006-02-01 Thread erich.oliphant
Glad I asked, I was well on my way to create something needlessly complex. Thanks Guys. On Wed, 1 Feb 2006 14:00:55 -0800 (PST), ejfried wrote I think erich.oliphant wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hi, I am trying to figure out the best way to have a rule