I'm currently studying uk tax, and I was wondering whether drools would be 
suitable for calculating an individuals tax liability.

There are lots of rules such as:

if age < 65
then 
  allowance = 5225
if age >= 65 and age < 75 
then 
  allowance = 7550 - ((net income - 20,900) * 0.5)
  if allowance < 5225
    then allowance = 5225
if age >= 75 
then 
  allowance =7690  - ((net income - 20,900) * 0.5)
  if allowance < 5225

    then allowance = 5225

if 1=1 (run always)
  // calculate taxableOtherIncome (earnings, trading profits)
  taxableOtherIncome = otherIncome - allowance
  allowanceUsed = taxableOtherIncome - otherIncome
  allowanceRemaining = allowance - allowanceUsed
  allowance = allowanceRemaining

  // calculate taxableSavingsIncome

  taxableSavingsIncome = savingsIncome - allowance

  allowanceUsed = taxableSavingsIncome - savingsIncome

  allowanceRemaining = allowance - allowanceUsed

  allowance = allowanceRemaining

  // calculate taxableDividendIncome
  ...

There seems to be a fairly strict order to some of the calculations.  I.e. 
allowance should be deducted from otherIncome before savingsIncome or dividend 
income.

Is drools suitable for this type of application?

Many thanks,

Chris

_________________________________________________________________
Discover Bird's Eye View now with Multimap from Live Search
http://clk.atdmt.com/UKM/go/111354026/direct/01/
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to