We often want to write rules that fire when we have a certain number of facts that meet some criteria. If I am trying to write a rule that fires on a certain cardinality, it isn't very straightforward.
We can write a rule that will try to keep a count of the number of facts that meet a certain template. We can write a rule that matches on a specific number (using constraints). We write a number of these rules, one for each number we are looking for. Jess supports the (count-query-results) function, which can be helpful but can't really be used on the left side of a rule. Some variant on the logical support mechanism might be feasible here. So what is the best mechanism for counting facts that meet a pattern, then using that count to drive rules? RJ -------------------------------------------------------------------- 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] --------------------------------------------------------------------
