pub:projects:samurai:cases:lp
Table of Contents
Loan Processor
Model in CLIPS
- Model 1: lp-clips.clp
- Rules: 8
- Uwagi:
- The datalog example uses backward chaining
- The forward chaining version of the case must provide more data types of which facts are generated by rules in order to activate another rules.
- It is necessary to set fact duplication to false (set-fact-duplication FALSE) in order to avoid rematching rules
riskBrancher1
andriskBrancher2
Model in Jess
- Model 1: lp-jess.clp
- Rules: 8
- Uwagi:
- Jess does not allow for using '(range)' construct within
slot
definition - the domain of slots can be set by using(allowed-values)
. However listing of all values from range e.g. [18, 120] is inefficient. - Jess does not allow for fact duplication - such behavior is necessary for this model.
Model in Drools
- Model 1: lp-drools.drl
- Rules: 9 (including initial rules that asserts facts)
- Uwagi:
- Drools allows for fact duplication default. Thus rules
riskBrancher1
andriskBrancher2
requires additional condition that checks if a givenRating/MatchingAssessor
already exists:rule "riskBrancher1" when RiskBrancher($clientname : Client, $risklevel : RiskLevel) LoanRequest(Client == $clientname, $amountask : AmountAsk, AmountAsk < $risklevel) not(MatchingAssessor(Client == $clientname, AmountAsk == $amountask)) then insert(new MatchingAssessor($clientname, $amountask)); //System.out.println("For client " + $clientname + ": The asked amount is less than risk level: asked = " + $amountask + ", risk = " + $risklevel); end rule "riskBrancher2" when RiskBrancher($clientname : Client, $risklevel : RiskLevel, $ratingmin : RatingMin) LoanRequest(Client == $clientname, $amountask : AmountAsk, AmountAsk >= $risklevel) not(RatingAssessor(Client == $clientname, AmountAsk == $amountask, RatingMin == $ratingmin)) then insert(new RatingAssessor($clientname, $amountask, $ratingmin)); //System.out.println("For client " + $clientname + ": The asked amount is greater or equal than/to risk level: asked = " + $amountask + ", risk = " + $risklevel); end
Model in XTT2
- Model 1: lp-xtt.hml lp-hmr.pl
- Rules: 9
- Uwagi:
pub/projects/samurai/cases/lp.txt · Last modified: 2016/01/05 22:33 by 127.0.0.1