This shows you the differences between two versions of the page.
docs:xttviewer [2017/09/20 00:55] kkutt created |
docs:xttviewer [2022/03/23 16:59] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== XTTviewer ====== | ||
+ | XTTviewer is a simple plugin that allows display of XTT2 rule trees within the wiki pages as presented below. \\ | ||
+ | To know more about XTT2 representation see: [[http:// | ||
+ | To present XTT2 trees on the wiki pages, simply put the HMR file inside the ''< | ||
+ | |||
+ | |||
+ | ===== XTT2 model ===== | ||
+ | |||
+ | <hmr> | ||
+ | |||
+ | % | ||
+ | % $Id: vasProlog.cpp, | ||
+ | % | ||
+ | % File generated by HeKatE Qt Editor ver. M6_10_1 | ||
+ | % | ||
+ | % HeaRT case | ||
+ | % | ||
+ | % | ||
+ | % | ||
+ | % | ||
+ | % HeaRT has been develped by the HeKatE Project, | ||
+ | % see http:// | ||
+ | % | ||
+ | % This file is part of HeaRT. | ||
+ | % | ||
+ | % HeaRT is free software: you can redistribute it and/or modify | ||
+ | % it under the terms of the GNU General Public License as published by | ||
+ | % the Free Software Foundation, either version 3 of the License, or | ||
+ | % (at your option) any later version. | ||
+ | % | ||
+ | % HeaRT is distributed in the hope that it will be useful, | ||
+ | % but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+ | % | ||
+ | % GNU General Public License for more details. | ||
+ | % | ||
+ | % You should have received a copy of the GNU General Public License | ||
+ | % along with HeaRT. | ||
+ | % | ||
+ | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | :- ensure_loaded(' | ||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TYPES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | xtype [name: boolean, | ||
+ | base: numeric, | ||
+ | | ||
+ | | ||
+ | desc: boolean, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: integer, | ||
+ | base: numeric, | ||
+ | | ||
+ | | ||
+ | desc: integer, | ||
+ | | ||
+ | ]. | ||
+ | |||
+ | |||
+ | xtype [name: ard_default_type, | ||
+ | base: symbolic, | ||
+ | | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carConvertible, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carPrice, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carType, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carOnList, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: potentialTheftRating, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carAirbags, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carRollBar, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: potentialOccupantInjuryRating, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverSex, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverAge, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: trainingCertificate, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverAgeRating, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: accidentsNumber, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: violationsNumber, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: convictedDUI, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverQualification, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theAutoEligibilityScore, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theDriverEligibilityScore, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: thePremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theEligibilityScore, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carAge, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carModelYear, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carHasAlarm, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverMaritalStatus, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverLocation, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverCoverage, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: clientClass, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: clientRevenue, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: clientPortfolio, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theAutoPremiums, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theDriverPremiums, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theAutoDiscounts, | ||
+ | base: numeric, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theMarketSegmentDiscounts, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: thePolicy, | ||
+ | base: numeric, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: theEligibilityDecision, | ||
+ | base: symbolic, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carTypePremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: carAgePremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: driverCoveragePremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: potentialTheftRatingPremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: potentialOccupantInjuryRatingPremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: medicalCoverage, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | xtype [name: medicalCoveragePremium, | ||
+ | base: numeric, | ||
+ | | ||
+ | ]. | ||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%% ATTRIBUTES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | xattr [name: accidentsNumber, | ||
+ | | ||
+ | | ||
+ | type: accidentsNumber, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carAge, | ||
+ | | ||
+ | | ||
+ | type: carAge, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: carAgePremium, | ||
+ | | ||
+ | | ||
+ | type: carAgePremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: carAirbags, | ||
+ | | ||
+ | | ||
+ | type: carAirbags, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carConvertible, | ||
+ | | ||
+ | | ||
+ | type: carConvertible, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carHasAlarm, | ||
+ | | ||
+ | | ||
+ | type: carHasAlarm, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carModelYear, | ||
+ | | ||
+ | | ||
+ | type: carModelYear, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carOnList, | ||
+ | | ||
+ | | ||
+ | type: carOnList, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carPrice, | ||
+ | | ||
+ | | ||
+ | type: carPrice, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carRollBar, | ||
+ | | ||
+ | | ||
+ | type: carRollBar, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carType, | ||
+ | | ||
+ | | ||
+ | type: carType, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: carTypePremium, | ||
+ | | ||
+ | | ||
+ | type: carTypePremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: clientClass, | ||
+ | | ||
+ | | ||
+ | type: clientClass, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: clientPortfolio, | ||
+ | | ||
+ | | ||
+ | type: clientPortfolio, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: clientRevenue, | ||
+ | | ||
+ | | ||
+ | type: clientRevenue, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: convictedDUI, | ||
+ | | ||
+ | | ||
+ | type: convictedDUI, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: driverAge, | ||
+ | | ||
+ | | ||
+ | type: driverAge, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: driverAgeRating, | ||
+ | | ||
+ | | ||
+ | type: driverAgeRating, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: driverCoverage, | ||
+ | | ||
+ | | ||
+ | type: driverCoverage, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: driverCoveragePremium, | ||
+ | | ||
+ | | ||
+ | type: driverCoveragePremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: driverLocation, | ||
+ | | ||
+ | | ||
+ | type: driverLocation, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: driverMaritalStatus, | ||
+ | | ||
+ | | ||
+ | type: driverMaritalStatus, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: driverQualification, | ||
+ | | ||
+ | | ||
+ | type: driverQualification, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: driverSex, | ||
+ | | ||
+ | | ||
+ | type: driverSex, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: medicalCoverage, | ||
+ | | ||
+ | | ||
+ | type: medicalCoverage, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: medicalCoveragePremium, | ||
+ | | ||
+ | | ||
+ | type: medicalCoveragePremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: potentialOccupantInjuryRating, | ||
+ | | ||
+ | | ||
+ | type: potentialOccupantInjuryRating, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: potentialOccupantInjuryRatingPremium, | ||
+ | | ||
+ | | ||
+ | type: potentialOccupantInjuryRatingPremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: potentialTheftRating, | ||
+ | | ||
+ | | ||
+ | type: potentialTheftRating, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: potentialTheftRatingPremium, | ||
+ | | ||
+ | | ||
+ | type: potentialTheftRatingPremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theAutoDiscounts, | ||
+ | | ||
+ | | ||
+ | type: theAutoDiscounts, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theAutoEligibilityScore, | ||
+ | | ||
+ | | ||
+ | type: theAutoEligibilityScore, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theAutoPremiums, | ||
+ | | ||
+ | | ||
+ | type: theAutoPremiums, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theDriverEligibilityScore, | ||
+ | | ||
+ | | ||
+ | type: theDriverEligibilityScore, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theDriverPremiums, | ||
+ | | ||
+ | | ||
+ | type: theDriverPremiums, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theEgibilityDecision, | ||
+ | | ||
+ | | ||
+ | type: theEligibilityDecision, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theEligibilityScore, | ||
+ | | ||
+ | | ||
+ | type: theEligibilityScore, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: theMarketSegmentDiscounts, | ||
+ | | ||
+ | | ||
+ | type: theMarketSegmentDiscounts, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: thePolicy, | ||
+ | | ||
+ | | ||
+ | type: thePolicy, | ||
+ | comm: out | ||
+ | ]. | ||
+ | xattr [name: thePremium, | ||
+ | | ||
+ | | ||
+ | type: thePremium, | ||
+ | comm: inter | ||
+ | ]. | ||
+ | xattr [name: trainingCertificate, | ||
+ | | ||
+ | | ||
+ | type: trainingCertificate, | ||
+ | comm: in | ||
+ | ]. | ||
+ | xattr [name: violationsNumber, | ||
+ | | ||
+ | | ||
+ | type: violationsNumber, | ||
+ | comm: in | ||
+ | ]. | ||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%% TABLE SCHEMAS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | xschm 1: [potentialTheftRating, | ||
+ | xschm 2: [driverAgeRating, | ||
+ | xschm 3: [carConvertible, | ||
+ | xschm 4: [carAirbags, | ||
+ | xschm 5: [driverSex, | ||
+ | xschm 6: [accidentsNumber, | ||
+ | xschm 7: [theAutoEligibilityScore, | ||
+ | xschm 8: [clientRevenue, | ||
+ | xschm 10: [driverQualification, | ||
+ | xschm 11: [theDriverPremiums, | ||
+ | xschm 12: [carAirbags, | ||
+ | xschm 13: [clientClass] ==> [theMarketSegmentDiscounts]. | ||
+ | xschm 14: [theEligibilityScore, | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | xschm ' | ||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%%%%% RULES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | xrule 1/1: | ||
+ | [potentialTheftRating neq ' | ||
+ | | ||
+ | ==> | ||
+ | [theAutoEligibilityScore set ' | ||
+ | :7. | ||
+ | xrule 1/2: | ||
+ | [potentialTheftRating eq any, | ||
+ | | ||
+ | ==> | ||
+ | [theAutoEligibilityScore set ' | ||
+ | :7. | ||
+ | xrule 1/3: | ||
+ | [potentialTheftRating eq any, | ||
+ | | ||
+ | ==> | ||
+ | [theAutoEligibilityScore set ' | ||
+ | :7. | ||
+ | xrule 1/4: | ||
+ | [potentialTheftRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theAutoEligibilityScore set ' | ||
+ | :7. | ||
+ | |||
+ | xrule 2/1: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 0] | ||
+ | :3. | ||
+ | xrule 2/2: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 100] | ||
+ | :3. | ||
+ | xrule 2/3: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 120] | ||
+ | :3. | ||
+ | xrule 2/4: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 130] | ||
+ | :3. | ||
+ | xrule 2/5: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 20] | ||
+ | :3. | ||
+ | xrule 2/6: | ||
+ | [driverAgeRating eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theDriverEligibilityScore set 30] | ||
+ | :3. | ||
+ | |||
+ | xrule 3/1: | ||
+ | [carConvertible eq 1, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialTheftRating set ' | ||
+ | :4. | ||
+ | xrule 3/2: | ||
+ | [carConvertible eq any, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialTheftRating set ' | ||
+ | :4. | ||
+ | xrule 3/3: | ||
+ | [carConvertible eq any, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialTheftRating set ' | ||
+ | :4. | ||
+ | xrule 3/4: | ||
+ | [carConvertible eq 0, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialTheftRating set ' | ||
+ | :4. | ||
+ | xrule 3/5: | ||
+ | [carConvertible eq 0, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialTheftRating set ' | ||
+ | :4. | ||
+ | |||
+ | xrule 4/1: | ||
+ | [carAirbags eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRating set ' | ||
+ | :1. | ||
+ | xrule 4/2: | ||
+ | [carAirbags eq 0, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRating set ' | ||
+ | :1. | ||
+ | xrule 4/3: | ||
+ | [carAirbags eq 1, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRating set ' | ||
+ | :1. | ||
+ | xrule 4/4: | ||
+ | [carAirbags eq 2, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRating set ' | ||
+ | :1. | ||
+ | xrule 4/5: | ||
+ | [carAirbags eq 3, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRating set ' | ||
+ | :1. | ||
+ | |||
+ | xrule 5/1: | ||
+ | [driverSex eq ' | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/2: | ||
+ | [driverSex eq ' | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/3: | ||
+ | [driverSex eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/4: | ||
+ | [driverSex eq ' | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/5: | ||
+ | [driverSex eq ' | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/6: | ||
+ | [driverSex eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/7: | ||
+ | [driverSex eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | xrule 5/8: | ||
+ | [driverSex eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverAgeRating set ' | ||
+ | :6. | ||
+ | |||
+ | xrule 6/1: | ||
+ | [accidentsNumber eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverQualification set ' | ||
+ | :2. | ||
+ | xrule 6/2: | ||
+ | [accidentsNumber gt 2, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverQualification set ' | ||
+ | :2. | ||
+ | xrule 6/3: | ||
+ | [accidentsNumber eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverQualification set ' | ||
+ | :2. | ||
+ | xrule 6/4: | ||
+ | [accidentsNumber lte 2, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [driverQualification set ' | ||
+ | :2. | ||
+ | |||
+ | xrule 7/1: | ||
+ | [theAutoEligibilityScore eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theEligibilityScore set (theDriverEligibilityScore+100)] | ||
+ | :' | ||
+ | xrule 7/2: | ||
+ | [theAutoEligibilityScore eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theEligibilityScore set (theDriverEligibilityScore+50)] | ||
+ | :' | ||
+ | xrule 7/3: | ||
+ | [theAutoEligibilityScore eq ' | ||
+ | | ||
+ | ==> | ||
+ | [theEligibilityScore set theDriverEligibilityScore] | ||
+ | :' | ||
+ | |||
+ | xrule 8/1: | ||
+ | [clientRevenue eq ' | ||
+ | | ||
+ | ==> | ||
+ | [clientClass set ' | ||
+ | :13. | ||
+ | xrule 8/2: | ||
+ | [clientRevenue neq ' | ||
+ | | ||
+ | ==> | ||
+ | [clientClass set ' | ||
+ | :13. | ||
+ | xrule 8/3: | ||
+ | [clientRevenue neq ' | ||
+ | | ||
+ | ==> | ||
+ | [clientClass set ' | ||
+ | :13. | ||
+ | |||
+ | xrule 10/1: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1700+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/2: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1720+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/3: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (700+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/4: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (720+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/5: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1500+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/6: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (500+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/7: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1300+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/8: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1320+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/9: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (300+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/10: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (320+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/11: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1200+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/12: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (200+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/13: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (1000+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | xrule 10/14: | ||
+ | [driverQualification eq ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theDriverPremiums set (0+(150*accidentsNumber))] | ||
+ | :11. | ||
+ | |||
+ | xrule 11/1: | ||
+ | [theDriverPremiums eq any, | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [thePremium set ((theDriverPremiums+theAutoDiscounts)-theMarketSegmentDiscounts)] | ||
+ | :14. | ||
+ | |||
+ | xrule 12/1: | ||
+ | [carAirbags eq 3, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.18)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/2: | ||
+ | [carAirbags eq 2, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.15)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/3: | ||
+ | [carAirbags eq 1, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.12)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/4: | ||
+ | [carAirbags eq 0, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/5: | ||
+ | [carAirbags eq 3, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.28)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/6: | ||
+ | [carAirbags eq 2, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.25)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/7: | ||
+ | [carAirbags eq 1, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.22)*theAutoPremiums)] | ||
+ | :8. | ||
+ | xrule 12/8: | ||
+ | [carAirbags eq 0, | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoDiscounts set ((1-0.1)*theAutoPremiums)] | ||
+ | :8. | ||
+ | |||
+ | xrule 13/1: | ||
+ | [clientClass eq ' | ||
+ | ==> | ||
+ | [theMarketSegmentDiscounts set 500] | ||
+ | :10. | ||
+ | xrule 13/2: | ||
+ | [clientClass eq ' | ||
+ | ==> | ||
+ | [theMarketSegmentDiscounts set 250] | ||
+ | :10. | ||
+ | xrule 13/3: | ||
+ | [clientClass eq ' | ||
+ | ==> | ||
+ | [theMarketSegmentDiscounts set 0] | ||
+ | :10. | ||
+ | |||
+ | xrule 14/1: | ||
+ | [theEligibilityScore eq any, | ||
+ | | ||
+ | ==> | ||
+ | [thePolicy set thePremium]. | ||
+ | |||
+ | xrule ' | ||
+ | [theEligibilityScore lt 100] | ||
+ | ==> | ||
+ | [theEgibilityDecision set ' | ||
+ | :' | ||
+ | xrule ' | ||
+ | [theEligibilityScore in [100 to 250]] | ||
+ | ==> | ||
+ | [theEgibilityDecision set ' | ||
+ | xrule ' | ||
+ | [theEligibilityScore gt 250] | ||
+ | ==> | ||
+ | [theEgibilityDecision set ' | ||
+ | |||
+ | xrule ' | ||
+ | [carType eq ' | ||
+ | ==> | ||
+ | [carTypePremium set 500] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [carType eq ' | ||
+ | ==> | ||
+ | [carTypePremium set 400] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [carType eq ' | ||
+ | ==> | ||
+ | [carTypePremium set 250] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [carModelYear in [2014 to 2015], | ||
+ | | ||
+ | ==> | ||
+ | [carAgePremium set 400] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [carModelYear in [2009 to 2013], | ||
+ | | ||
+ | ==> | ||
+ | [carAgePremium set 300] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [carModelYear in [2004 to 2008], | ||
+ | | ||
+ | ==> | ||
+ | [carAgePremium set 250] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [driverCoverage eq 1] | ||
+ | ==> | ||
+ | [driverCoveragePremium set 300] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [driverCoverage eq 0] | ||
+ | ==> | ||
+ | [driverCoveragePremium set 0] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [medicalCoverage eq 1] | ||
+ | ==> | ||
+ | [medicalCoveragePremium set 600] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [medicalCoverage eq 0] | ||
+ | ==> | ||
+ | [medicalCoveragePremium set 0] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [potentialTheftRating eq ' | ||
+ | ==> | ||
+ | [potentialTheftRatingPremium set 500] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [potentialTheftRating neq ' | ||
+ | ==> | ||
+ | [potentialTheftRatingPremium set 0] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [potentialOccupantInjuryRating eq ' | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRatingPremium set 1000] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [potentialOccupantInjuryRating eq ' | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRatingPremium set 500] | ||
+ | :' | ||
+ | xrule ' | ||
+ | [potentialOccupantInjuryRating in [' | ||
+ | ==> | ||
+ | [potentialOccupantInjuryRatingPremium set 0] | ||
+ | :' | ||
+ | |||
+ | xrule ' | ||
+ | [carTypePremium eq any, | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ==> | ||
+ | [theAutoPremiums set (((((carTypePremium+carAgePremium)+driverCoveragePremium)+medicalCoveragePremium)+potentialTheftRatingPremium)+potentialOccupantInjuryRatingPremium)] | ||
+ | :12. | ||
+ | |||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%% STATES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | xstat init/1: [carAirbags, | ||
+ | xstat init/1: [carPrice, | ||
+ | xstat init/1: [driverAge, | ||
+ | xstat init/1: [carOnList, | ||
+ | xstat init/1: [carRollBar, | ||
+ | xstat init/1: [carAge,3]. | ||
+ | xstat init/1: [carHasAlarm, | ||
+ | xstat init/1: [carConvertible, | ||
+ | xstat init/1: [driverSex,' | ||
+ | xstat init/1: [convictedDUI, | ||
+ | xstat init/1: [accidentsNumber, | ||
+ | xstat init/1: [clientRevenue,' | ||
+ | xstat init/1: [driverLocation,' | ||
+ | xstat init/1: [medicalCoverage, | ||
+ | xstat init/1: [clientPortfolio, | ||
+ | xstat init/1: [violationsNumber, | ||
+ | xstat init/1: [carType,' | ||
+ | xstat init/1: [trainingCertificate,' | ||
+ | xstat init/1: [carModelYear, | ||
+ | xstat init/1: [driverMaritalStatus,' | ||
+ | xstat init/1: [driverCoverage, | ||
+ | xstat init/2: [carAirbags, | ||
+ | xstat init/2: [carPrice, | ||
+ | xstat init/2: [driverAge, | ||
+ | xstat init/2: [carOnList, | ||
+ | xstat init/2: [carRollBar, | ||
+ | xstat init/2: [carAge,3]. | ||
+ | xstat init/2: [carHasAlarm, | ||
+ | xstat init/2: [carConvertible, | ||
+ | xstat init/2: [driverSex,' | ||
+ | xstat init/2: [convictedDUI, | ||
+ | xstat init/2: [accidentsNumber, | ||
+ | xstat init/2: [clientRevenue,' | ||
+ | xstat init/2: [driverLocation,' | ||
+ | xstat init/2: [medicalCoverage, | ||
+ | xstat init/2: [clientPortfolio, | ||
+ | xstat init/2: [violationsNumber, | ||
+ | xstat init/2: [carType,' | ||
+ | xstat init/2: [trainingCertificate,' | ||
+ | xstat init/2: [carModelYear, | ||
+ | xstat init/2: [driverMaritalStatus,' | ||
+ | xstat init/2: [driverCoverage, | ||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%% CALLBACKS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | |||
+ | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | % File generated by HeKatE Qt Editor ver. M6_10_1 | ||
+ | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
+ | |||
+ | </ |