RE: JESS: Find the minimum

2011-08-26 Thread Cathy & Bob Crothers
half Of Wolfgang Laun Sent: Wednesday, August 24, 2011 10:27 AM To: jess-users@sandia.gov Subject: Re: JESS: Find the minimum Not sure whether this meets all the possibly undisclosed requirements, not sure about the relation of row numbers and words, but this is firing one, even when there is wor

Re: JESS: Find the minimum

2011-08-24 Thread Wolfgang Laun
Not sure whether this meets all the possibly undisclosed requirements, not sure about the relation of row numbers and words, but this is firing one, even when there is words from more than one page: (defrule find-lines-per-block-ssn ?w1 <- (word (page ?page) (rowNumber ?rowNumber1

Re: JESS: Find the minimum

2011-08-23 Thread Win . Carus
-> I hope the following provides the functionality you're looking for. Note that the word deftemplate has been modified to incorporate a memory slot that indicates that it has already been selected as a minimal-distance pair; this prevents these facts from participating in spurious future mat

Re: JESS: Find the minimum

2011-08-23 Thread Wolfgang Laun
What makes one word different from another one? Surely *you* know (but *we*don't), and this must be a constraint in that rule. If it is the rowNumber, than this condition would be logically correct: (rowNumber ?rowNumber2 &:(<> ?rowNumber1 ?rowNumber2)) although it were better written as (ro

JESS: Find the minimum

2011-08-23 Thread Cathy & Bob Crothers
I would like find ?word1 and ?word2 such that the absolute value of ?rowNumber1 minus?rowNumber2 is the minimum number and ?word1 is not equal to ?word2 rowNumber are integers, 1, 2, 3 I have verified that there is a single minimum. I have tried (defrule find-lines-per-block-ss