« Return to Thread: JESS: rule problems

Re: JESS: rule problems

by Dusan Sormaz :: Rate this Message:

Reply to Author | View in Thread

Joao,

can you show the complete rule? Your code snippet is missing a parenthesis at the end of the first Area line.

Also when you say: "it is not working" it is not enough to understand the possible error. show either error messages or explain what is shown, for example, does error show when you load (compile) rules, or when you try to run them.

Dusan Sormaz

At 05:39 AM 4/1/2008, you wrote:
Hello,

My question is about if it is possible to assign the same class of
objects several times in the same rule. I mean, let say i have a class
"Area" and I have multiple facts containing objects of the class "Area"
in the working memory. Can I do something like this:

(defrule
(Area {name=="area1"}(OBJECT ?Area1)
(Area {name=="area2"}(OBJECT ?Area2)
....
and then I can work with these objects. I tested and is not working. It
seems that jess refuses to assign two times the same class in the rule.
Of course I had import my class "Area" to jess, it can recognize it. Can
you help me about this?

Thanks,

Joao Mourao

--------------------------------------------
Unclassified email





*********************************************************************
*
Dusan Sormaz PhD, Associate Professor
* Ohio University
* Department of Industrial and Systems Engineering
* 277 Stocker Center, Athens, OH 45701-2979
* phone: (740) 593-1545
* fax:   (740) 593-0778
* e-mail: sormaz@...
* url: http://www.ent.ohiou.edu/~sormaz
*********************************************************************


 « Return to Thread: JESS: rule problems

LightInTheBox - Buy quality products at wholesale price