GEIST Research Group

We are GEIST. We dream big and work hard.

User Tools

Site Tools


mbstring extension must be loaded in order to run mPDF
pub:projects:samurai:cases:lp

Powrót do samurai:start

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 and riskBrancher2

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 and riskBrancher2 requires additional condition that checks if a given Rating/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

pub/projects/samurai/cases/lp.txt · Last modified: 2016/01/05 23:33 (external edit)