<div dir="ltr">Hello,<br><br>I search a rule implementation for the following calculation:<br>I have n Objects of differents types (A, B, C, ...) each with a parameter certainty.<br><br>the overall certainty is calculated as follows: certaintyOverall = (certaintyA * weightA + certaintyB * weightB + ... ) / (weightA&nbsp; + weightB + ...)<br>
<br>If it can be assumed that all Objects in the formula always exist it&#39;s quite easy:<br>when <br>&nbsp; A (certaintyA: certainty)<br>&nbsp; B (certaintyB: certainty)<br>&nbsp; ...<br>then<br>&nbsp; certaintyOverall = (certaintyA * weightA + certaintyB * weightB + ... ) / (weightA&nbsp; + weightB + ...)<br>
<br>But if one ore more objects are missing the formula should be reduced to the certainty and weights of the existing objects. But there are too many combinations of existing/nonexisting objects. How can this be implemented in Drools?<br>
<br>Regards<br>Thomas<br><br></div>