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(" 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(" CommonFormState.add(new
Value("West. 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,
Fx: +61 8 9266
2703 Email: [EMAIL PROTECTED] |
- JESS: defrule for multisot Emmanuel Shyllon
- Re: JESS: defrule for multisot ejfried