<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>Are the parameters for the calculations hierarchical in
your model or are there just many components to each equation? For
example:-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>Rule "Total Resource"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>$s : Student( $e : employmentEarnings, $ss : scholarships,
$a : assets)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>insert(new TotalResource($s, $e + $ss +
$a);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>Rule "Child Care Expenses"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>$s : Student( $nc : numberOfChildren, $pca :
perChildAmount)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>insert(new ChildCareExpenses($s, $nc *
$pca);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>end</FONT></SPAN></DIV></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>Rule "Total Need"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>$s : Student( $t : tuition, $la : LivingAllowance, $cce :
childCareExpenses)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT
face="Courier New">ChildCareExpenses(student == $s, $cce :
amount)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>insert(new TotalNeed($s, $t + $la +
$cce);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>Rule "Total Eligible Loan Amount"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT color=#0000ff
size=2>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT
face="Courier New">$s : Student($maa : maxAllowedAmount)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>TotalNeed( student == $s, $n :
amount)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT
face="Courier New">TotalResource( student == $s, $r :
amount)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>insert(new TotalEligibleLoanAmount(Math.min($n - $r,
$maa));</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face="Courier New"
color=#0000ff size=2>end</FONT></SPAN></DIV></FONT></SPAN></DIV></SPAN></DIV>
<DIV dir=ltr align=left><SPAN
class=499465908-09112007></SPAN> </DIV></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>Possible? Yes. </FONT></SPAN><SPAN
class=499465908-09112007><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007></SPAN><SPAN
class=499465908-09112007><FONT face=Arial color=#0000ff size=2><SPAN
class=499465908-09112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>There are plenty of ways to skin an
apple.</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>With kind regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=499465908-09112007><FONT face=Arial
color=#0000ff size=2>Mike</FONT></SPAN></DIV><FONT face=Arial color=#0000ff
size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Don
Cameron<BR><B>Sent:</B> 08 November 2007 23:28<BR><B>To:</B>
rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] Rules for
Hierarchical Type Calculation Formulas<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">We have been using a
custom rules engine successfully for our 1000+<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">rules for our student
loans application, but these rules are decision<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">based types rules (if then
else).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">For assessing loan amounts
for our student loan application, we have<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">over 400+ calculation
formulas plus decision logic. These formulas
are<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">mostly
simple:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">TotalEligilbleLoanAmount =
Min(TotalNeed - TotalResource,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">MaxAllowedAmount)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
TotalNeed = Tuition + LivingAllowance +
ChildCareExpenses<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
ChildCareExpenses = NumberOfChildren *
PerChildAmount<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
TotalResource = EmploymentEarnings + Scholarships +
Assets<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(however there are 400+
formulas and the hierarchy gets up to 20 deep)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Is it possible to
implement something like this in Drools? Will it
be<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">maintainable and
performant?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Thanks<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Don<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P></DIV><BR>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. </BLOCKQUOTE></BODY></HTML>