Have been working solely with rules and have now created an overall rule flow that has
enabled me to eliminate parts of the conditions of many rules, because the rules are in
rule flow groups. For example, if the glucose value must be below 40 to get into a rule
flow group called "Below 40", then I do not need to check that the glucose is
below 40 in the condition of every rule in the group.
I have noticed, however, that when a fact is inserted, it appears to activate all rules
for which the conditions match, even though the majority of the rules are not in the rule
flow group. I am interpreting this as simply activating everything applicable, taking
advantage of the Rete, and then the activated rules are filtered by rule flow group. Is
this a correct interpretation?
The corollary question is whether I am using best practice by eliminating
"redundant" conditions from my rules, or whether I should include in those
conditions the constraints that were determining whether the rule flow group becomes
active. If this scaled up to one to two thousand rules, would the activations and
filtering be more costly?
Thanks for any advice. My colleagues and I were very happy to eliminate the redundant
conditions because it makes our rules look simpler, but now concerned may be going down
wrong track.
- Mike