[rules-users] rule algorithm

thomas kukofka thomaskukofka at web.de
Fri Aug 29 10:08:12 EDT 2008


Hello,

I search a rule implementation for the following calculation:
I have n Objects of differents types (A, B, C, ...) each with a parameter
certainty.

the overall certainty is calculated as follows: certaintyOverall =
(certaintyA * weightA + certaintyB * weightB + ... ) / (weightA  + weightB +
...)

If it can be assumed that all Objects in the formula always exist it's quite
easy:
when
  A (certaintyA: certainty)
  B (certaintyB: certainty)
  ...
then
  certaintyOverall = (certaintyA * weightA + certaintyB * weightB + ... ) /
(weightA  + weightB + ...)

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?

Regards
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080829/888ffc61/attachment.html 


More information about the rules-users mailing list