User Tools

Site Tools


docs:xttviewer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:xttviewer [2017/09/20 02:55] (current)
kkutt created
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://​ai.ia.agh.edu.pl/​wiki/​hekate:​xtt2]]. \\
 +To present XTT2 trees on the wiki pages, simply put the HMR file inside the ''<​hmr></​hmr>''​ tags ([[http://​loki.ia.agh.edu.pl/​wiki/​docs:​xttviewer?​do=edit|observe the source of this page]]).
 +
 +
 +===== XTT2 model =====
 +
 +<hmr>
 +
 +%
 +% $Id: vasProlog.cpp,​v 1.7.8.4 2011-09-29 09:18:04 kkr Exp $
 +%
 +% File generated by HeKatE Qt Editor ver. M6_10_1
 +%
 +% HeaRT case
 +%
 +%
 +%     ​Copyright (C) 2006-9 by the HeKatE Project
 +%
 +%     HeaRT has been develped by the HeKatE Project, ​
 +%     see http://​hekate.ia.agh.edu.pl
 +%
 +%     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
 +%     ​MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ​ See the
 +%     GNU General Public License for more details.
 +%
 +%     You should have received a copy of the GNU General Public License
 +%     along with HeaRT. ​ If not, see <​http://​www.gnu.org/​licenses/>​.
 +%
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +:- ensure_loaded('​heart.pl'​).
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TYPES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +xtype [name: boolean,
 +       base: numeric,
 +       ​length:​ 1,
 +       ​scale:​ 0,
 +       desc: boolean,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: integer,
 +       base: numeric,
 +       ​length:​ 10,
 +       ​scale:​ 0,
 +       desc: integer,
 +       ​domain:​ [-2147483648 to 2147483647]
 +      ].
 +
 +
 +xtype [name: ard_default_type,​
 +       base: symbolic,
 +       ​domain:​ [none/1],
 +       ​ordered:​ yes
 +      ].
 +xtype [name: carConvertible,​
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: carPrice,
 +       base: numeric,
 +       ​domain:​ [0 to 1000000]
 +      ].
 +xtype [name: carType,
 +       base: symbolic,
 +       ​domain:​ ['​Luxury','​Sedan','​Compact'​]
 +      ].
 +xtype [name: carOnList,
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: potentialTheftRating,​
 +       base: symbolic,
 +       ​domain:​ ['​Low','​Moderate','​High'​]
 +      ].
 +xtype [name: carAirbags,
 +       base: numeric,
 +       ​domain:​ [0 to 4]
 +      ].
 +xtype [name: carRollBar,
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: potentialOccupantInjuryRating,​
 +       base: symbolic,
 +       ​domain:​ ['​Low','​Moderate','​High','​ExtremelyHigh'​]
 +      ].
 +xtype [name: driverSex,
 +       base: symbolic,
 +       ​domain:​ ['​Male','​Female'​]
 +      ].
 +xtype [name: driverAge,
 +       base: numeric,
 +       ​domain:​ [16 to 99]
 +      ].
 +xtype [name: trainingCertificate,​
 +       base: symbolic,
 +       ​domain:​ ['​None','​RefresherCourse','​School'​]
 +      ].
 +xtype [name: driverAgeRating,​
 +       base: symbolic,
 +       ​domain:​ ['​Eligible','​Senior','​Young'​]
 +      ].
 +xtype [name: accidentsNumber,​
 +       base: numeric,
 +       ​domain:​ [0 to 100]
 +      ].
 +xtype [name: violationsNumber,​
 +       base: numeric,
 +       ​domain:​ [0 to 100]
 +      ].
 +xtype [name: convictedDUI,​
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: driverQualification,​
 +       base: symbolic,
 +       ​domain:​ ['​HighRiskDriver','​NoRiskDriver'​]
 +      ].
 +xtype [name: theAutoEligibilityScore,​
 +       base: symbolic,
 +       ​domain:​ ['​Eligible','​NotEligible','​Provisional'​]
 +      ].
 +xtype [name: theDriverEligibilityScore,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: thePremium,
 +       base: numeric,
 +       ​length:​ 7,
 +       ​scale:​ 2,
 +       ​domain:​ [0 to 10000]
 +      ].
 +xtype [name: theEligibilityScore,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: carAge,
 +       base: numeric,
 +       ​domain:​ [0 to 10]
 +      ].
 +xtype [name: carModelYear,​
 +       base: numeric,
 +       ​domain:​ [2004 to 2015]
 +      ].
 +xtype [name: carHasAlarm,​
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: driverMaritalStatus,​
 +       base: symbolic,
 +       ​domain:​ ['​Married','​Single'​]
 +      ].
 +xtype [name: driverLocation,​
 +       base: symbolic,
 +       ​domain:​ ['​NY','​CA','​VA','​WA'​]
 +      ].
 +xtype [name: driverCoverage,​
 +       base: numeric,
 +       ​domain:​ [0,1]
 +      ].
 +xtype [name: clientClass,​
 +       base: symbolic,
 +       ​domain:​ ['​EliteClient','​PrefferedClient','​Client'​]
 +      ].
 +xtype [name: clientRevenue,​
 +       base: symbolic,
 +       ​domain:​ ['​Top','​NoTop'​]
 +      ].
 +xtype [name: clientPortfolio,​
 +       base: numeric,
 +       ​domain:​ [0 to 100]
 +      ].
 +xtype [name: theAutoPremiums,​
 +       base: numeric,
 +       ​domain:​ [0 to 10000]
 +      ].
 +xtype [name: theDriverPremiums,​
 +       base: numeric,
 +       ​domain:​ [0 to 10000]
 +      ].
 +xtype [name: theAutoDiscounts,​
 +       base: numeric,
 +       ​length:​ 7,
 +       ​scale:​ 2,
 +       ​domain:​ [0 to 10000]
 +      ].
 +xtype [name: theMarketSegmentDiscounts,​
 +       base: numeric,
 +       ​domain:​ [500,250,0]
 +      ].
 +xtype [name: thePolicy,
 +       base: numeric,
 +       ​length:​ 7,
 +       ​scale:​ 2,
 +       ​domain:​ [0 to 10000]
 +      ].
 +xtype [name: theEligibilityDecision,​
 +       base: symbolic,
 +       ​domain:​ ['​Eligible','​NotEligible','​ManualDecision'​]
 +      ].
 +xtype [name: carTypePremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 500]
 +      ].
 +xtype [name: carAgePremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 500]
 +      ].
 +xtype [name: driverCoveragePremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: potentialTheftRatingPremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: potentialOccupantInjuryRatingPremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: medicalCoverage,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +xtype [name: medicalCoveragePremium,​
 +       base: numeric,
 +       ​domain:​ [0 to 1000]
 +      ].
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%% ATTRIBUTES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +xattr [name: accidentsNumber,​
 +       ​abbrev:​ acci,
 +       ​class:​ simple,
 +       type: accidentsNumber,​
 +       comm: in
 +      ].
 +xattr [name: carAge,
 +       ​abbrev:​ carA1,
 +       ​class:​ simple,
 +       type: carAge,
 +       comm: inter
 +      ].
 +xattr [name: carAgePremium,​
 +       ​abbrev:​ carA3,
 +       ​class:​ simple,
 +       type: carAgePremium,​
 +       comm: inter
 +      ].
 +xattr [name: carAirbags,
 +       ​abbrev:​ carA2,
 +       ​class:​ simple,
 +       type: carAirbags,
 +       comm: in
 +      ].
 +xattr [name: carConvertible,​
 +       ​abbrev:​ carC1,
 +       ​class:​ simple,
 +       type: carConvertible,​
 +       comm: in
 +      ].
 +xattr [name: carHasAlarm,​
 +       ​abbrev:​ carH1,
 +       ​class:​ simple,
 +       type: carHasAlarm,​
 +       comm: in
 +      ].
 +xattr [name: carModelYear,​
 +       ​abbrev:​ carM1,
 +       ​class:​ simple,
 +       type: carModelYear,​
 +       comm: in
 +      ].
 +xattr [name: carOnList,
 +       ​abbrev:​ carO1,
 +       ​class:​ simple,
 +       type: carOnList,
 +       comm: in
 +      ].
 +xattr [name: carPrice,
 +       ​abbrev:​ carP1,
 +       ​class:​ simple,
 +       type: carPrice,
 +       comm: in
 +      ].
 +xattr [name: carRollBar,
 +       ​abbrev:​ carR1,
 +       ​class:​ simple,
 +       type: carRollBar,
 +       comm: in
 +      ].
 +xattr [name: carType,
 +       ​abbrev:​ carT1,
 +       ​class:​ simple,
 +       type: carType,
 +       comm: in
 +      ].
 +xattr [name: carTypePremium,​
 +       ​abbrev:​ carT2,
 +       ​class:​ simple,
 +       type: carTypePremium,​
 +       comm: inter
 +      ].
 +xattr [name: clientClass,​
 +       ​abbrev:​ clie1,
 +       ​class:​ simple,
 +       type: clientClass,​
 +       comm: inter
 +      ].
 +xattr [name: clientPortfolio,​
 +       ​abbrev:​ clie2,
 +       ​class:​ simple,
 +       type: clientPortfolio,​
 +       comm: in
 +      ].
 +xattr [name: clientRevenue,​
 +       ​abbrev:​ clie3,
 +       ​class:​ simple,
 +       type: clientRevenue,​
 +       comm: in
 +      ].
 +xattr [name: convictedDUI,​
 +       ​abbrev:​ conv1,
 +       ​class:​ simple,
 +       type: convictedDUI,​
 +       comm: in
 +      ].
 +xattr [name: driverAge,
 +       ​abbrev:​ driv1,
 +       ​class:​ simple,
 +       type: driverAge,
 +       comm: in
 +      ].
 +xattr [name: driverAgeRating,​
 +       ​abbrev:​ driv2,
 +       ​class:​ simple,
 +       type: driverAgeRating,​
 +       comm: inter
 +      ].
 +xattr [name: driverCoverage,​
 +       ​abbrev:​ driv3,
 +       ​class:​ simple,
 +       type: driverCoverage,​
 +       comm: in
 +      ].
 +xattr [name: driverCoveragePremium,​
 +       ​abbrev:​ driv8,
 +       ​class:​ simple,
 +       type: driverCoveragePremium,​
 +       comm: inter
 +      ].
 +xattr [name: driverLocation,​
 +       ​abbrev:​ driv4,
 +       ​class:​ simple,
 +       type: driverLocation,​
 +       comm: in
 +      ].
 +xattr [name: driverMaritalStatus,​
 +       ​abbrev:​ driv5,
 +       ​class:​ simple,
 +       type: driverMaritalStatus,​
 +       comm: in
 +      ].
 +xattr [name: driverQualification,​
 +       ​abbrev:​ driv6,
 +       ​class:​ simple,
 +       type: driverQualification,​
 +       comm: inter
 +      ].
 +xattr [name: driverSex,
 +       ​abbrev:​ driv7,
 +       ​class:​ simple,
 +       type: driverSex,
 +       comm: in
 +      ].
 +xattr [name: medicalCoverage,​
 +       ​abbrev:​ medi1,
 +       ​class:​ simple,
 +       type: medicalCoverage,​
 +       comm: in
 +      ].
 +xattr [name: medicalCoveragePremium,​
 +       ​abbrev:​ medi2,
 +       ​class:​ simple,
 +       type: medicalCoveragePremium,​
 +       comm: inter
 +      ].
 +xattr [name: potentialOccupantInjuryRating,​
 +       ​abbrev:​ pote1,
 +       ​class:​ simple,
 +       type: potentialOccupantInjuryRating,​
 +       comm: inter
 +      ].
 +xattr [name: potentialOccupantInjuryRatingPremium,​
 +       ​abbrev:​ pote4,
 +       ​class:​ simple,
 +       type: potentialOccupantInjuryRatingPremium,​
 +       comm: inter
 +      ].
 +xattr [name: potentialTheftRating,​
 +       ​abbrev:​ pote2,
 +       ​class:​ simple,
 +       type: potentialTheftRating,​
 +       comm: inter
 +      ].
 +xattr [name: potentialTheftRatingPremium,​
 +       ​abbrev:​ pote3,
 +       ​class:​ simple,
 +       type: potentialTheftRatingPremium,​
 +       comm: inter
 +      ].
 +xattr [name: theAutoDiscounts,​
 +       ​abbrev:​ theA1,
 +       ​class:​ simple,
 +       type: theAutoDiscounts,​
 +       comm: inter
 +      ].
 +xattr [name: theAutoEligibilityScore,​
 +       ​abbrev:​ theA2,
 +       ​class:​ simple,
 +       type: theAutoEligibilityScore,​
 +       comm: inter
 +      ].
 +xattr [name: theAutoPremiums,​
 +       ​abbrev:​ theA3,
 +       ​class:​ simple,
 +       type: theAutoPremiums,​
 +       comm: inter
 +      ].
 +xattr [name: theDriverEligibilityScore,​
 +       ​abbrev:​ theD1,
 +       ​class:​ simple,
 +       type: theDriverEligibilityScore,​
 +       comm: inter
 +      ].
 +xattr [name: theDriverPremiums,​
 +       ​abbrev:​ theD2,
 +       ​class:​ simple,
 +       type: theDriverPremiums,​
 +       comm: inter
 +      ].
 +xattr [name: theEgibilityDecision,​
 +       ​abbrev:​ ted1,
 +       ​class:​ simple,
 +       type: theEligibilityDecision,​
 +       comm: inter
 +      ].
 +xattr [name: theEligibilityScore,​
 +       ​abbrev:​ theE1,
 +       ​class:​ simple,
 +       type: theEligibilityScore,​
 +       comm: inter
 +      ].
 +xattr [name: theMarketSegmentDiscounts,​
 +       ​abbrev:​ theM1,
 +       ​class:​ simple,
 +       type: theMarketSegmentDiscounts,​
 +       comm: inter
 +      ].
 +xattr [name: thePolicy,
 +       ​abbrev:​ theP1,
 +       ​class:​ simple,
 +       type: thePolicy,
 +       comm: out
 +      ].
 +xattr [name: thePremium,
 +       ​abbrev:​ theP2,
 +       ​class:​ simple,
 +       type: thePremium,
 +       comm: inter
 +      ].
 +xattr [name: trainingCertificate,​
 +       ​abbrev:​ trai1,
 +       ​class:​ simple,
 +       type: trainingCertificate,​
 +       comm: in
 +      ].
 +xattr [name: violationsNumber,​
 +       ​abbrev:​ viol1,
 +       ​class:​ simple,
 +       type: violationsNumber,​
 +       comm: in
 +      ].
 +
 +%%%%%%%%%%%%%%%%%%%%%%%% TABLE SCHEMAS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%
 +
 +xschm 1: [potentialTheftRating,​potentialOccupantInjuryRating] ==> [theAutoEligibilityScore].
 +xschm 2: [driverAgeRating,​driverQualification] ==> [theDriverEligibilityScore].
 +xschm 3: [carConvertible,​carPrice,​carType,​carOnList] ==> [potentialTheftRating].
 +xschm 4: [carAirbags,​carRollBar,​carConvertible] ==> [potentialOccupantInjuryRating].
 +xschm 5: [driverSex,​driverAge,​trainingCertificate] ==> [driverAgeRating].
 +xschm 6: [accidentsNumber,​violationsNumber,​convictedDUI] ==> [driverQualification].
 +xschm 7: [theAutoEligibilityScore,​theDriverEligibilityScore] ==> [theEligibilityScore].
 +xschm 8: [clientRevenue,​clientPortfolio] ==> [clientClass].
 +xschm 10: [driverQualification,​driverAgeRating,​driverMaritalStatus,​driverLocation,​accidentsNumber] ==> [theDriverPremiums].
 +xschm 11: [theDriverPremiums,​theAutoDiscounts,​theMarketSegmentDiscounts] ==> [thePremium].
 +xschm 12: [carAirbags,​potentialTheftRating,​carHasAlarm,​theAutoPremiums] ==> [theAutoDiscounts].
 +xschm 13: [clientClass] ==> [theMarketSegmentDiscounts].
 +xschm 14: [theEligibilityScore,​thePremium] ==> [thePolicy].
 +xschm '​Table1':​ [theEligibilityScore] ==> [theEgibilityDecision].
 +xschm '​Table2':​ [carType] ==> [carTypePremium].
 +xschm '​Table3':​ [carModelYear,​carAge] ==> [carAgePremium].
 +xschm '​Table4':​ [driverCoverage] ==> [driverCoveragePremium].
 +xschm '​Table5':​ [medicalCoverage] ==> [medicalCoveragePremium].
 +xschm '​Table6':​ [potentialTheftRating] ==> [potentialTheftRatingPremium].
 +xschm '​Table7':​ [potentialOccupantInjuryRating] ==> [potentialOccupantInjuryRatingPremium].
 +xschm '​Table8':​ [carTypePremium,​carAgePremium,​driverCoveragePremium,​medicalCoveragePremium,​potentialTheftRatingPremium,​potentialOccupantInjuryRatingPremium] ==> [theAutoPremiums].
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%% RULES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +xrule 1/1:
 +      [potentialTheftRating neq '​High',​
 +       ​potentialOccupantInjuryRating notin ['​ExtremelyHigh','​High'​]]
 +    ==>
 +      [theAutoEligibilityScore set '​Eligible'​]
 +    :7.
 +xrule 1/2:
 +      [potentialTheftRating eq any,
 +       ​potentialOccupantInjuryRating eq '​ExtremelyHigh'​]
 +    ==>
 +      [theAutoEligibilityScore set '​NotEligible'​]
 +    :7.
 +xrule 1/3:
 +      [potentialTheftRating eq any,
 +       ​potentialOccupantInjuryRating eq '​High'​]
 +    ==>
 +      [theAutoEligibilityScore set '​Provisional'​]
 +    :7.
 +xrule 1/4:
 +      [potentialTheftRating eq '​High',​
 +       ​potentialOccupantInjuryRating neq '​ExtremelyHigh'​]
 +    ==>
 +      [theAutoEligibilityScore set '​Provisional'​]
 +    :7.
 +
 +xrule 2/1:
 +      [driverAgeRating eq '​Eligible',​
 +       ​driverQualification neq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 0]
 +    :3.
 +xrule 2/2:
 +      [driverAgeRating eq '​Eligible',​
 +       ​driverQualification eq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 100]
 +    :3.
 +xrule 2/3:
 +      [driverAgeRating eq '​Senior',​
 +       ​driverQualification eq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 120]
 +    :3.
 +xrule 2/4:
 +      [driverAgeRating eq '​Young',​
 +       ​driverQualification eq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 130]
 +    :3.
 +xrule 2/5:
 +      [driverAgeRating eq '​Senior',​
 +       ​driverQualification neq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 20]
 +    :3.
 +xrule 2/6:
 +      [driverAgeRating eq '​Young',​
 +       ​driverQualification neq '​HighRiskDriver'​]
 +    ==>
 +      [theDriverEligibilityScore set 30]
 +    :3.
 +
 +xrule 3/1:
 +      [carConvertible eq 1,
 +       ​carPrice eq any,
 +       ​carType eq any,
 +       ​carOnList eq any]
 +    ==>
 +      [potentialTheftRating set '​High'​]
 +    :4.
 +xrule 3/2:
 +      [carConvertible eq any,
 +       ​carPrice gt 45000,
 +       ​carType eq any,
 +       ​carOnList eq any]
 +    ==>
 +      [potentialTheftRating set '​High'​]
 +    :4.
 +xrule 3/3:
 +      [carConvertible eq any,
 +       ​carPrice eq any,
 +       ​carType eq any,
 +       ​carOnList eq 1]
 +    ==>
 +      [potentialTheftRating set '​High'​]
 +    :4.
 +xrule 3/4:
 +      [carConvertible eq 0,
 +       ​carPrice in [20000 to 45000],
 +       ​carType eq any,
 +       ​carOnList eq 0]
 +    ==>
 +      [potentialTheftRating set '​Moderate'​]
 +    :4.
 +xrule 3/5:
 +      [carConvertible eq 0,
 +       ​carPrice lt 20000,
 +       ​carType eq any,
 +       ​carOnList eq 0]
 +    ==>
 +      [potentialTheftRating set '​Low'​]
 +    :4.
 +
 +xrule 4/1:
 +      [carAirbags eq any,
 +       ​carRollBar eq 0,
 +       ​carConvertible eq 1]
 +    ==>
 +      [potentialOccupantInjuryRating set '​ExtremelyHigh'​]
 +    :1.
 +xrule 4/2:
 +      [carAirbags eq 0,
 +       ​carRollBar eq any,
 +       ​carConvertible eq any]
 +    ==>
 +      [potentialOccupantInjuryRating set '​ExtremelyHigh'​]
 +    :1.
 +xrule 4/3:
 +      [carAirbags eq 1,
 +       ​carRollBar eq any,
 +       ​carConvertible eq any]
 +    ==>
 +      [potentialOccupantInjuryRating set '​High'​]
 +    :1.
 +xrule 4/4:
 +      [carAirbags eq 2,
 +       ​carRollBar eq any,
 +       ​carConvertible eq any]
 +    ==>
 +      [potentialOccupantInjuryRating set '​Moderate'​]
 +    :1.
 +xrule 4/5:
 +      [carAirbags eq 3,
 +       ​carRollBar eq any,
 +       ​carConvertible eq any]
 +    ==>
 +      [potentialOccupantInjuryRating set '​Low'​]
 +    :1.
 +
 +xrule 5/1:
 +      [driverSex eq '​Male',​
 +       ​driverAge lt 25,
 +       ​trainingCertificate eq '​None'​]
 +    ==>
 +      [driverAgeRating set '​Young'​]
 +    :6.
 +xrule 5/2:
 +      [driverSex eq '​Female',​
 +       ​driverAge lt 20,
 +       ​trainingCertificate eq '​None'​]
 +    ==>
 +      [driverAgeRating set '​Young'​]
 +    :6.
 +xrule 5/3:
 +      [driverSex eq any,
 +       ​driverAge gt 70,
 +       ​trainingCertificate neq '​RefresherCourse'​]
 +    ==>
 +      [driverAgeRating set '​Senior'​]
 +    :6.
 +xrule 5/4:
 +      [driverSex eq '​Male',​
 +       ​driverAge lt 25,
 +       ​trainingCertificate eq '​School'​]
 +    ==>
 +      [driverAgeRating set '​Eligible'​]
 +    :6.
 +xrule 5/5:
 +      [driverSex eq '​Female',​
 +       ​driverAge lt 20,
 +       ​trainingCertificate eq '​School'​]
 +    ==>
 +      [driverAgeRating set '​Eligible'​]
 +    :6.
 +xrule 5/6:
 +      [driverSex eq any,
 +       ​driverAge gt 70,
 +       ​trainingCertificate eq '​RefresherCourse'​]
 +    ==>
 +      [driverAgeRating set '​Eligible'​]
 +    :6.
 +xrule 5/7:
 +      [driverSex eq any,
 +       ​driverAge eq any,
 +       ​trainingCertificate neq '​None'​]
 +    ==>
 +      [driverAgeRating set '​Eligible'​]
 +    :6.
 +xrule 5/8:
 +      [driverSex eq any,
 +       ​driverAge eq any,
 +       ​trainingCertificate eq '​None'​]
 +    ==>
 +      [driverAgeRating set '​Eligible'​]
 +    :6.
 +
 +xrule 6/1:
 +      [accidentsNumber eq any,
 +       ​violationsNumber eq any,
 +       ​convictedDUI eq 1]
 +    ==>
 +      [driverQualification set '​HighRiskDriver'​]
 +    :2.
 +xrule 6/2:
 +      [accidentsNumber gt 2,
 +       ​violationsNumber eq any,
 +       ​convictedDUI eq any]
 +    ==>
 +      [driverQualification set '​HighRiskDriver'​]
 +    :2.
 +xrule 6/3:
 +      [accidentsNumber eq any,
 +       ​violationsNumber gt 3,
 +       ​convictedDUI eq any]
 +    ==>
 +      [driverQualification set '​HighRiskDriver'​]
 +    :2.
 +xrule 6/4:
 +      [accidentsNumber lte 2,
 +       ​violationsNumber lte 3,
 +       ​convictedDUI eq 0]
 +    ==>
 +      [driverQualification set '​NoRiskDriver'​]
 +    :2.
 +
 +xrule 7/1:
 +      [theAutoEligibilityScore eq '​NotEligible',​
 +       ​theDriverEligibilityScore eq any]
 +    ==>
 +      [theEligibilityScore set (theDriverEligibilityScore+100)]
 +    :'​Table1'​.
 +xrule 7/2:
 +      [theAutoEligibilityScore eq '​Provisional',​
 +       ​theDriverEligibilityScore eq any]
 +    ==>
 +      [theEligibilityScore set (theDriverEligibilityScore+50)]
 +    :'​Table1'​.
 +xrule 7/3:
 +      [theAutoEligibilityScore eq '​Eligible',​
 +       ​theDriverEligibilityScore eq any]
 +    ==>
 +      [theEligibilityScore set theDriverEligibilityScore]
 +    :'​Table1'​.
 +
 +xrule 8/1:
 +      [clientRevenue eq '​Top',​
 +       ​clientPortfolio eq any]
 +    ==>
 +      [clientClass set '​EliteClient'​]
 +    :13.
 +xrule 8/2:
 +      [clientRevenue neq '​Top',​
 +       ​clientPortfolio gte 3]
 +    ==>
 +      [clientClass set '​PrefferedClient'​]
 +    :13.
 +xrule 8/3:
 +      [clientRevenue neq '​Top',​
 +       ​clientPortfolio lt 3]
 +    ==>
 +      [clientClass set '​Client'​]
 +    :13.
 +
 +xrule 10/1:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Married',​
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1700+(150*accidentsNumber))]
 +    :11.
 +xrule 10/2:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Single',​
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1720+(150*accidentsNumber))]
 +    :11.
 +xrule 10/3:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Married',​
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (700+(150*accidentsNumber))]
 +    :11.
 +xrule 10/4:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Single',​
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (720+(150*accidentsNumber))]
 +    :11.
 +xrule 10/5:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Senior',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1500+(150*accidentsNumber))]
 +    :11.
 +xrule 10/6:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Senior',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation in ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (500+(150*accidentsNumber))]
 +    :11.
 +xrule 10/7:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Married',​
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1300+(150*accidentsNumber))]
 +    :11.
 +xrule 10/8:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Single',​
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1320+(150*accidentsNumber))]
 +    :11.
 +xrule 10/9:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Married',​
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (300+(150*accidentsNumber))]
 +    :11.
 +xrule 10/10:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Young',​
 +       ​driverMaritalStatus eq '​Single',​
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (320+(150*accidentsNumber))]
 +    :11.
 +xrule 10/11:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Senior',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1200+(150*accidentsNumber))]
 +    :11.
 +xrule 10/12:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Senior',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation notin ['​CA','​NY','​VA'​],​
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (200+(150*accidentsNumber))]
 +    :11.
 +xrule 10/13:
 +      [driverQualification eq '​HighRiskDriver',​
 +       ​driverAgeRating eq '​Eligible',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation eq any,
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (1000+(150*accidentsNumber))]
 +    :11.
 +xrule 10/14:
 +      [driverQualification eq '​NoRiskDriver',​
 +       ​driverAgeRating eq '​Eligible',​
 +       ​driverMaritalStatus eq any,
 +       ​driverLocation eq any,
 +       ​accidentsNumber eq any]
 +    ==>
 +      [theDriverPremiums set (0+(150*accidentsNumber))]
 +    :11.
 +
 +xrule 11/1:
 +      [theDriverPremiums eq any,
 +       ​theAutoDiscounts eq any,
 +       ​theMarketSegmentDiscounts eq any]
 +    ==>
 +      [thePremium set ((theDriverPremiums+theAutoDiscounts)-theMarketSegmentDiscounts)]
 +    :14.
 +
 +xrule 12/1:
 +      [carAirbags eq 3,
 +       ​potentialTheftRating eq any,
 +       ​carHasAlarm eq 0,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.18)*theAutoPremiums)]
 +    :8.
 +xrule 12/2:
 +      [carAirbags eq 2,
 +       ​potentialTheftRating eq any,
 +       ​carHasAlarm eq 0,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.15)*theAutoPremiums)]
 +    :8.
 +xrule 12/3:
 +      [carAirbags eq 1,
 +       ​potentialTheftRating eq any,
 +       ​carHasAlarm eq 0,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.12)*theAutoPremiums)]
 +    :8.
 +xrule 12/4:
 +      [carAirbags eq 0,
 +       ​potentialTheftRating eq any,
 +       ​carHasAlarm eq 0,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0)*theAutoPremiums)]
 +    :8.
 +xrule 12/5:
 +      [carAirbags eq 3,
 +       ​potentialTheftRating eq '​High',​
 +       ​carHasAlarm eq 1,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.28)*theAutoPremiums)]
 +    :8.
 +xrule 12/6:
 +      [carAirbags eq 2,
 +       ​potentialTheftRating eq '​High',​
 +       ​carHasAlarm eq 1,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.25)*theAutoPremiums)]
 +    :8.
 +xrule 12/7:
 +      [carAirbags eq 1,
 +       ​potentialTheftRating eq '​High',​
 +       ​carHasAlarm eq 1,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.22)*theAutoPremiums)]
 +    :8.
 +xrule 12/8:
 +      [carAirbags eq 0,
 +       ​potentialTheftRating eq '​High',​
 +       ​carHasAlarm eq 1,
 +       ​theAutoPremiums eq any]
 +    ==>
 +      [theAutoDiscounts set ((1-0.1)*theAutoPremiums)]
 +    :8.
 +
 +xrule 13/1:
 +      [clientClass eq '​EliteClient'​]
 +    ==>
 +      [theMarketSegmentDiscounts set 500]
 +    :10.
 +xrule 13/2:
 +      [clientClass eq '​PrefferedClient'​]
 +    ==>
 +      [theMarketSegmentDiscounts set 250]
 +    :10.
 +xrule 13/3:
 +      [clientClass eq '​Client'​]
 +    ==>
 +      [theMarketSegmentDiscounts set 0]
 +    :10.
 +
 +xrule 14/1:
 +      [theEligibilityScore eq any,
 +       ​thePremium eq any]
 +    ==>
 +      [thePolicy set thePremium].
 +
 +xrule '​Table1'/​1:​
 +      [theEligibilityScore lt 100]
 +    ==>
 +      [theEgibilityDecision set '​Eligible'​]
 +    :'​Table2'​.
 +xrule '​Table1'/​2:​
 +      [theEligibilityScore in [100 to 250]]
 +    ==>
 +      [theEgibilityDecision set '​ManualDecision'​].
 +xrule '​Table1'/​3:​
 +      [theEligibilityScore gt 250]
 +    ==>
 +      [theEgibilityDecision set '​NotEligible'​].
 +
 +xrule '​Table2'/​1:​
 +      [carType eq '​Luxury'​]
 +    ==>
 +      [carTypePremium set 500]
 +    :'​Table3'​.
 +xrule '​Table2'/​2:​
 +      [carType eq '​Sedan'​]
 +    ==>
 +      [carTypePremium set 400]
 +    :'​Table3'​.
 +xrule '​Table2'/​3:​
 +      [carType eq '​Compact'​]
 +    ==>
 +      [carTypePremium set 250]
 +    :'​Table3'​.
 +
 +xrule '​Table3'/​1:​
 +      [carModelYear in [2014 to 2015],
 +       ​carAge eq 0]
 +    ==>
 +      [carAgePremium set 400]
 +    :'​Table4'​.
 +xrule '​Table3'/​2:​
 +      [carModelYear in [2009 to 2013],
 +       ​carAge lte 5]
 +    ==>
 +      [carAgePremium set 300]
 +    :'​Table4'​.
 +xrule '​Table3'/​3:​
 +      [carModelYear in [2004 to 2008],
 +       ​carAge lte 10]
 +    ==>
 +      [carAgePremium set 250]
 +    :'​Table4'​.
 +
 +xrule '​Table4'/​1:​
 +      [driverCoverage eq 1]
 +    ==>
 +      [driverCoveragePremium set 300]
 +    :'​Table5'​.
 +xrule '​Table4'/​2:​
 +      [driverCoverage eq 0]
 +    ==>
 +      [driverCoveragePremium set 0]
 +    :'​Table5'​.
 +
 +xrule '​Table5'/​1:​
 +      [medicalCoverage eq 1]
 +    ==>
 +      [medicalCoveragePremium set 600]
 +    :'​Table6'​.
 +xrule '​Table5'/​2:​
 +      [medicalCoverage eq 0]
 +    ==>
 +      [medicalCoveragePremium set 0]
 +    :'​Table6'​.
 +
 +xrule '​Table6'/​1:​
 +      [potentialTheftRating eq '​High'​]
 +    ==>
 +      [potentialTheftRatingPremium set 500]
 +    :'​Table7'​.
 +xrule '​Table6'/​2:​
 +      [potentialTheftRating neq '​High'​]
 +    ==>
 +      [potentialTheftRatingPremium set 0]
 +    :'​Table7'​.
 +
 +xrule '​Table7'/​1:​
 +      [potentialOccupantInjuryRating eq '​ExtremelyHigh'​]
 +    ==>
 +      [potentialOccupantInjuryRatingPremium set 1000]
 +    :'​Table8'​.
 +xrule '​Table7'/​2:​
 +      [potentialOccupantInjuryRating eq '​High'​]
 +    ==>
 +      [potentialOccupantInjuryRatingPremium set 500]
 +    :'​Table8'​.
 +xrule '​Table7'/​3:​
 +      [potentialOccupantInjuryRating in ['​Moderate','​Low'​]]
 +    ==>
 +      [potentialOccupantInjuryRatingPremium set 0]
 +    :'​Table8'​.
 +
 +xrule '​Table8'/​1:​
 +      [carTypePremium eq any,
 +       ​carAgePremium eq any,
 +       ​driverCoveragePremium eq any,
 +       ​medicalCoveragePremium eq any,
 +       ​potentialTheftRatingPremium eq any,
 +       ​potentialOccupantInjuryRatingPremium eq any]
 +    ==>
 +      [theAutoPremiums set (((((carTypePremium+carAgePremium)+driverCoveragePremium)+medicalCoveragePremium)+potentialTheftRatingPremium)+potentialOccupantInjuryRatingPremium)]
 +    :12.
 +
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%% STATES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +xstat init/1: [carAirbags,​2].
 +xstat init/1: [carPrice,​30000].
 +xstat init/1: [driverAge,​19].
 +xstat init/1: [carOnList,​1].
 +xstat init/1: [carRollBar,​0].
 +xstat init/1: [carAge,3].
 +xstat init/1: [carHasAlarm,​1].
 +xstat init/1: [carConvertible,​0].
 +xstat init/1: [driverSex,'​Male'​].
 +xstat init/1: [convictedDUI,​0].
 +xstat init/1: [accidentsNumber,​2].
 +xstat init/1: [clientRevenue,'​NoTop'​].
 +xstat init/1: [driverLocation,'​NY'​].
 +xstat init/1: [medicalCoverage,​0].
 +xstat init/1: [clientPortfolio,​3].
 +xstat init/1: [violationsNumber,​2].
 +xstat init/1: [carType,'​Compact'​].
 +xstat init/1: [trainingCertificate,'​None'​].
 +xstat init/1: [carModelYear,​2011].
 +xstat init/1: [driverMaritalStatus,'​Married'​].
 +xstat init/1: [driverCoverage,​0].
 +xstat init/2: [carAirbags,​2].
 +xstat init/2: [carPrice,​30000].
 +xstat init/2: [driverAge,​29].
 +xstat init/2: [carOnList,​1].
 +xstat init/2: [carRollBar,​0].
 +xstat init/2: [carAge,3].
 +xstat init/2: [carHasAlarm,​1].
 +xstat init/2: [carConvertible,​0].
 +xstat init/2: [driverSex,'​Male'​].
 +xstat init/2: [convictedDUI,​0].
 +xstat init/2: [accidentsNumber,​0].
 +xstat init/2: [clientRevenue,'​Top'​].
 +xstat init/2: [driverLocation,'​NY'​].
 +xstat init/2: [medicalCoverage,​0].
 +xstat init/2: [clientPortfolio,​1].
 +xstat init/2: [violationsNumber,​2].
 +xstat init/2: [carType,'​Compact'​].
 +xstat init/2: [trainingCertificate,'​None'​].
 +xstat init/2: [carModelYear,​2011].
 +xstat init/2: [driverMaritalStatus,'​Married'​].
 +xstat init/2: [driverCoverage,​0].
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%% CALLBACKS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +% File generated by HeKatE Qt Editor ver. M6_10_1
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +
 +</​hmr>​
docs/xttviewer.txt ยท Last modified: 2017/09/20 02:55 by kkutt