Hello again, I have the following rule in my system: ----------------------------- (defrule rule-test (located (location ?l2)(thing ?t)) (adjacent (locale1 ?l2) (locale2 ?l3)) => (printout t "test geslaagd" crlf) ) -----------------------------
and the following facts: --------------------------- f-0 (MAIN::initial-fact) f-2 (MAIN::forest (class <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Forest>) (name "in the forest") (name_type <External-Address:java.lang.Class>)) f-3 (MAIN::desert (class <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Desert>) (name "in the desert") (name_type <External-Address:java.lang.Class>)) f-4 (MAIN::adjacent (class <External-Address:java.lang.Class>) (locale1 <External-Address:vs.storyworldontology.Forest>) (locale1_type <External-Address:java.lang.Class>) (locale2 <External-Address:vs.storyworldontology.Desert>) (locale2_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Adjacent>)) f-5 (MAIN::located (class <External-Address:java.lang.Class>) (location <External-Address:vs.storyworldontology.Forest>) (location_type <External-Address:java.lang.Class>) (thing <External-Address:vs.storyworldontology.Hero>) (thing_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Located>)) ------------------------- when i run the jess engine, the rule isn`t executed, (there is nothing printed) but a fact is added: ------------------------ f-6 (MAIN::need-adjacent (class nil) (locale1 <External-Address:vs.storyworldontology.Forest>) (locale1_type nil) (locale2 nil) (locale2_type nil) (OBJECT nil)) ----------------------- In my opinion the rule should be executed, based on fact 5 and fact 4. There should be printed "test geslaagd" What is wrong? I see that the needed fact contains some nils where there should be references ? I don`t understand why. I`ve already tried to make an "equals" function in the desert and the forest class, but that isn`t called. I think the objects shown in fact 5 and fact 4 are not totally the same (although it is the same object when i assert it fromout java) How can i see this....(watch and show functions don`t show any difference) Anybody an idea.... it makes me crazy !! Thanks a lot in advance ..... Sander ----- Original Message ----- From: "Eric Jain" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 03, 2003 7:32 PM Subject: JESS: Re: Re: Re: Problem with matching objects > > No, i didn`t ?? > > I assume Jess uses the objects "equals" method to check whether Java > objects are identical or not. The default implementation of this method > returns true only if the objects are physically identical, i.e. point to > the same location in memory. > > -- > Eric Jain > > -------------------------------------------------------------------- > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' > in the BODY of a message to [EMAIL PROTECTED], NOT to the list > (use your own address!) List problems? Notify [EMAIL PROTECTED] > -------------------------------------------------------------------- > -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
