Re: JESS: How can I write this rule?

2007-10-22 Thread Wolfgang Laun
enabled fact with greatest index1 and smallest index2. So id 3 is the fact that I want. Is it possible to do that with only one rule? Thank you. Nicolas From: [EMAIL PROTECTED] To: jess-users@sandia.gov Subject: RE: JESS: How can I write this rule? Date: Thu, 18 Oct 2007 16:59:19 -0400 Hello

Re: JESS: How can I write this rule?

2007-10-21 Thread Wolfgang Laun
Subject: RE: JESS: How can I write this rule? Date: Thu, 18 Oct 2007 16:59:19 -0400 Hello Ernest, There's a subtle difference between the solutions Jason and Wolfgang posted; you're basically using Jason's, but apparently you want Wolfgang's. Jason's and yours will fire for facts

Re: JESS: How can I write this rule?

2007-10-21 Thread Nicolas Fortin
that with only one rule? Thank you. Nicolas From: [EMAIL PROTECTED] To: jess-users@sandia.gov Subject: RE: JESS: How can I write this rule? Date: Thu, 18 Oct 2007 16:59:19 -0400 Hello Ernest, There's a subtle difference between the solutions Jason and Wolfgang posted; you're basically

RE: JESS: How can I write this rule?

2007-10-20 Thread Nicolas Fortin
that is enabled, and there is no other enabled fact with greatest index1 and smallest index2. So id 3 is the fact that I want. Is it possible to do that with only one rule? Thank you. Nicolas From: [EMAIL PROTECTED] To: jess-users@sandia.gov Subject: RE: JESS: How can I write this rule? Date

RE: JESS: How can I write this rule?

2007-10-20 Thread Robert Kirby
is the fact that I want. Is it possible to do that with only one rule? Thank you. Nicolas From: [EMAIL PROTECTED] To: jess-users@sandia.gov Subject: RE: JESS: How can I write this rule? Date: Thu, 18 Oct 2007 16:59:19 -0400 Hello Ernest, There's a subtle difference between the solutions

Re: JESS: How can I write this rule?

2007-10-18 Thread Wolfgang Laun
Nicolas Fortin wrote: Hello everybody, Suppose that I have the following template: (deftemplate MAIN::My-Template (slot id (type INTEGER)) (slot index1 (type INTEGER)) (slot index2 (type INTEGER))) I want a rule that would be activated by the fact with the greatest index1

Re: JESS: How can I write this rule?

2007-10-18 Thread Jason Morris
Hi NIcolas, A rule like this seems to work for me: (defrule greatest-one-smallest-two Find the My-Template with greatest index1 and smallest index2 (MAIN::My-Template (id ?id1)(index1 ?i1_1)(index2 ?i1_2)) (not (MAIN::My-Template (id ~?id1) (index1 ?i2_1:(= ?i2_1

Re: JESS: How can I write this rule?

2007-10-18 Thread Ernest Friedman-Hill
is performing a *or* rather than an *and* in this example. What is wrong? Thanks again. Nicolas Date: Thu, 18 Oct 2007 02:56:18 -0400From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: JESS: How can I write this rule? Hi NIcolas, A rule like this seems to work for me:(defrule greatest-one

RE: JESS: How can I write this rule?

2007-10-18 Thread Nicolas Fortin
Oct 2007 02:56:18 -0400From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: JESS: How can I write this rule? Hi NIcolas, A rule like this seems to work for me:(defrule greatest-one- smallest-two Find the My-Template with greatest index1 and smallest index2 (MAIN::My-Template (id ?id1)(index1 ?i1_1

JESS: How can I write this rule?

2007-10-17 Thread Nicolas Fortin
Hello everybody, Suppose that I have the following template: (deftemplate MAIN::My-Template (slot id (type INTEGER)) (slot index1 (type INTEGER)) (slot index2 (type INTEGER))) I want a rule that would be activated by the fact with the greatest index1 *and* the smallest index2.

Re: JESS: How can I write this rule?

2004-06-21 Thread Jeremic Zoran
ur help regards, Jeremic Zoran - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 21, 2004 3:00 AM Subject: Re: JESS: How can I write this rule? I think Jeremic Zoran wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] (deftemplate passed_co

AW: JESS: How can I write this rule?

2004-06-21 Thread Lars Hübner
I think Jeremic Zoran wrote: ERROR addStudentData function, JessException.getContext : while executing (concepts (ID ?cID) (prerequisite ?first ?one ?rest)) while executing (and (concepts (ID ?cID) (prerequisite ?first ?one ?rest)) (not (passed_concepts (ID ?one while executing (not (and

Re: AW: JESS: How can I write this rule?

2004-06-21 Thread ejfried
I think =?iso-8859-1?Q?Lars_H=FCbner?= wrote: Does it mean somewhat that in the error message no multivariables are contained? In the program code they are still specified. I suppose that's another clue, yes. I am moving away from the term multivariable, because it's confusing; there's no

JESS: How can I write this rule?

2004-06-20 Thread Jeremic Zoran
(deftemplate passed_concepts (slot ID (type INTEGER))) (deftemplate concept (slot ID (type INTEGER)) (multislot prerequisite) (slot ordinalNumber (type INTEGER)) (slot minKnowledgeLevel (type INTEGER))) there could be up to 23 passed_concepts in memory, and every concept could have 1, 2 or

Re: JESS: How can I write this rule?

2004-06-20 Thread ejfried
I think Jeremic Zoran wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] (deftemplate passed_concepts (slot ID (type INTEGER))) (deftemplate concept (slot ID (type INTEGER)) (multislot prerequisite) (slot ordinalNumber (type INTEGER)) (slot minKnowledgeLevel (type INTEGER)))