G'day everyone,

I've looked through the Jess book, but couldn't find the answer to this question: if I have several rules that activate when a particular fact is asserted, how do I ensure only the first relevant (i.e. in the order I defined them) rule is fired? Salience seemed like overkill for this, I was pretty sure there was an option to set this...

A snippet from my .clp file:
(defrule r1 (newAddress (locality ~"") (postCode ~"") (state ~"") ) => (printout t "r1 ") )
(defrule r2 (newAddress (locality ~"") (state ~"") ) => (printout t "r2 ") )

as you can see, a newAddress fact with locality, postcode and state will activate both rules; I only want r1 to activate.


Matthew Hutchinson
Ph.D. Candidate
Department of Spatial Sciences
Curtin University of Technology
GPO Box U1987
Perth, Western Australia 6845

Reply via email to