Are the parameters for the calculations hierarchical in your model or are there just many components to each equation? For example:- Rule "Total Resource" when $s : Student( $e : employmentEarnings, $ss : scholarships, $a : assets) then insert(new TotalResource($s, $e + $ss + $a); end Rule "Child Care Expenses" when $s : Student( $nc : numberOfChildren, $pca : perChildAmount) then insert(new ChildCareExpenses($s, $nc * $pca); end Rule "Total Need" when $s : Student( $t : tuition, $la : LivingAllowance, $cce : childCareExpenses) ChildCareExpenses(student == $s, $cce : amount) then insert(new TotalNeed($s, $t + $la + $cce); end Rule "Total Eligible Loan Amount" when $s : Student($maa : maxAllowedAmount) TotalNeed( student == $s, $n : amount) TotalResource( student == $s, $r : amount) then insert(new TotalEligibleLoanAmount(Math.min($n - $r, $maa)); end Possible? Yes. Performant? Performance depends upon many factors (number of students, hardware, subjective definition of performant); but there have been many postings suggesting Drools is as quick, if not quicker than other commercial engines. There are plenty of ways to skin an apple. With kind regards, Mike
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Don Cameron Sent: 08 November 2007 23:28 To: [email protected] Subject: [rules-users] Rules for Hierarchical Type Calculation Formulas We have been using a custom rules engine successfully for our 1000+ rules for our student loans application, but these rules are decision based types rules (if then else). For assessing loan amounts for our student loan application, we have over 400+ calculation formulas plus decision logic. These formulas are mostly simple: TotalEligilbleLoanAmount = Min(TotalNeed - TotalResource, MaxAllowedAmount) TotalNeed = Tuition + LivingAllowance + ChildCareExpenses ChildCareExpenses = NumberOfChildren * PerChildAmount TotalResource = EmploymentEarnings + Scholarships + Assets (however there are 400+ formulas and the hierarchy gets up to 20 deep) Is it possible to implement something like this in Drools? Will it be maintainable and performant? Thanks Don This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
