Hi,

 

Given the following:

 

 

Rete engine = new Rete ();

                        Deftemplate d =

                        new Deftemplate("Aus-Address", "A Aus-Address", engine);

                        d.addSlot("state-territ-name", Funcall.NIL, "STRING");

                        d.addSlot("minPostCode", Funcall.NIL, "STRING");

                        d.addSlot("maxPostCode", Funcall.NIL, "STRING");

                       d.addMultiSlot("CommonFormState", Funcall.NILLIST);

                        engine.addDeftemplate(d);

                       

//data for WA

                                    Fact f = new Fact("Aus-Address", engine);

                                    f.setSlotValue("state-territ-name", new Value("Western Australia", RU.STRING));

                                    f.setSlotValue("minPostCode",      new Value("6000", RU.STRING));

                                    f.setSlotValue("maxPostCode",      new Value("6999", RU.STRING));

                                    ValueVector CommonFormState = new ValueVector();

                                    CommonFormState.add(new Value("WA", RU.STRING));

                                    CommonFormState.add(new Value("W Australia", RU.STRING));

                                    CommonFormState.add(new Value("West. Australia", RU.STRING));

                                    f.setSlotValue("CommonFormState",  new Value(CommonFormState, RU.LIST));

                                    engine.assertFact(f);

                       

I have tried to define the following rule, but it did not work as stated below:

 

   String ruleString = new String();

   ruleString = "(defrule findProperState (Aus-Address (state-territ-name ?x) (CommonFormState \"W Australia\")) => (printout t \"result is: \" ?x crlf) )" ;

                                    engine.executeCommand(ruleString);

 

I shall be grateful if any one could define a rule that contains a multislot (CommonFormState).

Thanks.

 

Emmanuel.

 

 

____________________________

Emmanuel A. Shyllon

Research Fellow,

Department of Spatial Sciences,

Curtin University of Technology,
GPO Box U1987

Perth WA 6845,

Australia 
Ph: +61 8 9266 3194    

Fx: +61 8 9266 2703 

Mobile: +61 (0) 401320777

 

Email: [EMAIL PROTECTED]
Web: www.spatial.curtin.edu.au

 

Reply via email to