I think [EMAIL PROTECTED] wrote: > > (defrule rule1 > (x1 value1 ?cf1) > (x2 value2 ?cf2) > (x3 value3 ?cf3) > => > (assert (x3 value3 (min ?cf1 ?cf2 ?cf3)))
Perhaps this rule should retract or modify the existing fact, rather than asserting a second one, as this does? > (defrule rule2 > (x1 value1 ?cf1) > (x2 value2 ?cf2) > => > (assert (x3 value3 (min ?cf1 ?cf2))) > ) And this one should surely include a pattern like (not (x3 value3 ?)) or otherwise it will fire whether there is an x3 fact or not. > > By this way, the number of rules of the system would duplicate. Is there a > better solution? You want to do one thing under one set of conditions, and another thing under other conditions, so this really does warrant having two separate rules. Jess will notice the similarities, by the way, and share code in the Rete network for these two rules. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------