Your rule matches individual facts that look like "(a 1)", not slots inside of a "t" fact, which is what you're actually asserting. You have to match the "t" fact explicitly, and furthermore, you have to match it all as part of one pattern. The equivalent, correct rule could look like

(defrule r1
  (t (a ?a) (d ?d) {b > ?a}  { c > ?d || b > ?d })
  =>
  (printout t "test" crlf))


On Mar 12, 2010, at 11:21 AM, Andrew Meng wrote:

Hello,

I try to write a rule to compare values in two slot but it does not fire. See the jess code below. Can anyone point me the issue or a better way to do it?



---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
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].
--------------------------------------------------------------------

Reply via email to