Re: JESS: Using a slot with blanks on its definition

2008-10-30 Thread Wolfgang Laun
Although I really should have been more outspoken in my previous mail, I do hope that the choice of words in my example (confusion, sore eyes) is an indication that I'm very much against using this trick (which isn't even a hack, let alone a haque), too. Looking at the suitable places in the Jess

JESS: Minor undetected error: (list) in regular slot

2008-10-30 Thread Wolfgang Laun
The distinction between a (slot s) and a (multislot m) is that the former can hold a single value and the latter a list. Jess enforces this by the Jess parser accepting just a single expression for slots, as opposed to a list of expressions for multislots. Therefore the following construct where

Re: JESS: Use deffacts in assert object in slot value

2008-10-30 Thread Wolfgang Laun
On Wed, Oct 29, 2008 at 3:17 PM, Nopphadol Chalortham [EMAIL PROTECTED]wrote: Thank you for your answer. I have tried this method already. It works. But I would like to use only deffacts construct. Do you have any answer? There is a somewhat roundabout way to achieve that. In the deffacts

Re: JESS: Using a slot with blanks on its definition

2008-10-30 Thread Uiratan Cavalcante
Hey Jason, Thanks for this advise and opinion. Ive already notice this for my research group. There is another person with the task of achieving changes in the ontology. But we need do implement some intelligent assistence. So, these tasks, for now, must be done together. This ontology has

Re: JESS: Test for null

2008-10-30 Thread Hal Hildebrand
Are you talking about whether the slot is nil or not? You can just do: (some-slot nil) to match for an empty slot or (some-slot ~nil) to match a non-empty slot On Oct 30, 2008, at 7:58 AM, David Coyle wrote: Hello: I'm working with objects that have numerous relationships to others.

Re: JESS: Using a slot in a rule

2008-10-30 Thread John Chrysakis
On Wed, 29 Oct 2008, Wolfgang Laun wrote: How do you know that there is a transition fact in working memory before (run) is executed? through runUntilHalt Are there any updates of this transition fact and how are they being done? Please confirm that you are not calling setSlotValue()

Re: JESS: Test for null

2008-10-30 Thread Henrique Lopes Cardoso
Hi, Don't know if this is what you are looking for, but in Jess, null is represented as nil (inherited from CLIPS). http://www.jessrules.com/jess/docs/71/basics.html Try this out: (deftemplate foo (slot bar) (slot qwe) ) (defrule r ?f - (foo (qwe nil)) = (printout t Got a

JESS: Defrule Pattern Matching and Shadow Facts

2008-10-30 Thread John Chrysakis
Hello to jess community, I have a problem with the patterns of a rule In my clp file I have defined: (deftemplate Door(declare (from-class Door ))) (deftemplate User(declare (from-class User ))) (defrule MainDoor-rule (Door {mainDoorState == closed}) (User {userLocation == NearDoorRegion })

JESS: Listening to added facts

2008-10-30 Thread levent kent
Hello, one can catch the asserted and retracted facts in the knoledgebase by setting the event mask to JessEvent.FACT. How about catching only asserted facts(not retracted) or is there anyway to discriminate between them? thanks, -- Levent Kent

Re: JESS: Listening to added facts

2008-10-30 Thread Ernest Friedman-Hill
When an event comes, check the type. WHen a fact is asserted, you'll get the constant JessEvent.FACT; if it's being retracted, the type is JessEvent.FACT + JessEvent.REMOVED . On Oct 30, 2008, at 11:30 AM, levent kent wrote: Hello, one can catch the asserted and retracted facts in the

Re: JESS: Listening to added facts

2008-10-30 Thread levent kent
Thanks a lot! On Thu, Oct 30, 2008 at 4:39 PM, Ernest Friedman-Hill [EMAIL PROTECTED]wrote: When an event comes, check the type. WHen a fact is asserted, you'll get the constant JessEvent.FACT; if it's being retracted, the type is JessEvent.FACT + JessEvent.REMOVED . On Oct 30, 2008, at