All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openl.rules.examples.insurance.rules.Insurance.xls Maven / Gradle / Ivy

??ࡱ?>??	????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????M????N	

???? !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Root Entry???????? ?F?0W?g	?Х?k4i?@Workbook?????|Ole
????????OlePres000????????????????????	
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Oh??+'??0?HPdp??
???Stan Shor.Microsoft Excel@?48???@??p??@u?k4i?????՜.??+,??0P	PXlt|??
??OpenRules?????????T??	e		x!4	???
'??'?????	'?????	 3'?????	 3'?????	 3?-
@	!?????-?	???@	!?????Arial-	??????o2
EMethod void validatePolicy(Policy policy, PolicyPremiumCalculator pc)e						????Arial-???? Arial------????-??"System????x8-'??--???	------------------------------------------------
T2
"3// set global variables for US and different statesc		-"2
2setGlobalVariables
	-s2
2{H(policy, pc); // execute rules defined in the table "setGlobalVariables"
	2
C2
Cu2
TI// validate drivers executing rules defined in the table "validateDriver"	L2
e.for(int i = 0; i < policy.drivers.length; ++i)
2
v  -2
vvalidateDriver	-72
vd (policy.drivers[i], policy, pc);2
?2
?x2
?K// validate vehicles executing rules defined in the table "validateVehicle"	H2
?+for(i = 0; i < policy.vehicles.length; ++i)+
2
?  -2
?validateVehicle	-:2
?n"(policy.vehicles[i], policy, pc); 2
?2
?32
?if (pc.rejections.size() > 0)c2
?	  return;e2
?2
?----'??--???	 3--'??--???	 3????-?	??????
????-???-@	!????-	???@	!???-?	??????-??-@	!????-	???@	!?@	!?!????@	!?@	!?
-?	??????- !-@	!? - !-@	!? -*!*-@	!?!*-M!M-@	!?!M-r!r-@	!?!r-?!?-@	!?!?-?!?-@	!?!?-2!2-@	!?!2-4-@	!?"-4-@	!?"-4-@	!?"?--'??-???	??? 3'??NANI	???????\p.                                                                                                            B?a?=?ThisWorkbook???=?????35%8i@?"??1???Arial1???Arial1???Arial1???Arial1???Arial10???Arial Unicode MS1???Arial1?$??Arial1?	??Arial10???Arial Unicode MS10??Arial Unicode MS1??Arial1.???Times New Roman1????Arial1????Calibri1?	???Calibri1?>???Calibri1?????Calibri1?4???Calibri1,8???Calibri18???Calibri1?8???Calibri1????Calibri1?	???Calibri1h8???Cambria1?<???Calibri1????Calibri1????Calibri1?4???Calibri1?
???Calibri1????Calibri"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)/?#,##0"@.";\-#,##0"@."9?#,##0"@.";[Red]\-#,##0"@.";?#,##0.00"@.";\-#,##0.00"@."E? #,##0.00"@.";[Red]\-#,##0.00"@."k?3_-* #,##0"@."_-;\-* #,##0"@."_-;_-* "-""@."_-;_-@_-k?3_-* #,##0_@_._-;\-* #,##0_@_._-;_-* "-"_@_._-;_-@_-{?;_-* #,##0.00"@."_-;\-* #,##0.00"@."_-;_-* "-"??"@."_-;_-@_-{?;_-* #,##0.00_@_._-;\-* #,##0.00_@_._-;_-* "-"??_@_._-;_-@_-?"Yes";"Yes";"No"?"True";"True";"False"?"On";"On";"Off"]?,[$? -2]\ #,##0.00_);[Red]\([$? -2]\ #,##0.00\)??? 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?p@ @  ?p@ @  ?p!@ @  ?x"@ @ 
 ?x"!@ @ 
 ?	!x@ @  ?
x@@ , ?   @ ? ?	8@ @ ? ?	8@ @ ? ?	8!@ @ ? ?	8!@ @ ? ?x"@@ , ?x " @ , ?8@? ?8? ?8 @ ? ?8  ? ?x"@ @ , ?x"@ @ , ?? ||??@{?}A}
00_)ef[$? -}A}
00_)ef[$? -}A}
00_)ef[$? -}A}
00_)ef[$? -}A}
00_)ef[$? -}A}
00_)ef	[$? -}A}
00_)?L[$? -}A}
00_)?L[$? -}A}
00_)?L[$? -}A}
00_)?L[$? -}A}
00_)?L[$? -}A}
00_)?L	[$? -}A}
00_)23[$? -}A}
00_)23[$? -}A}
00_)23[$? -}A}
00_)23[$? -}A} 
00_)23[$? -}A}!
00_)23	[$? -}A}"
00_)[$? -}A}#
00_)[$? -}A}$
00_)[$? -}A}%
00_)[$? -}A}&
00_)[$? -}A}'
00_)	[$? -}?}7
??v?00_)?̙?[$? -?##0.??_@_	?@_-
?}?};
????00_)????[$? -????##0.?????_@_	????@_-
????}?})
?}?00_)????[$? -?##0.??_@_	?@_-
?}A}2
00_)[$? -}A}3
00_)??[$? -}A}4
00_)23[$? -}-}5
00_)}U}>
00_)[$? -##0.}?}*
00_)????[$? -????##0.?????_@_	????@_-
????}-}=
00_)}A}9
?e?00_)???[$? -}A}(
??00_)????[$? -}-}/
?00_)}x}:????00_)????????[$????????##	?????????_
????????@_}A}8
?}?00_)???[$}-}?
??00_)}A}1
a?00_)????[$?
20% - Accent1?M??
20% - Accent1ef?????%?
20% - Accent2?M?"?
20% - Accent2ef?????%?
20% - Accent3?M?&?
20% - Accent3ef?????%?
20% - Accent4?M?*?
20% - Accent4ef?????%?
20% - Accent5?M?.?
20% - Accent5ef?????%?
20% - Accent6?M?2?
20% - Accent6	ef?????%?
40% - Accent1?M??
40% - Accent1?L?????%?
40% - Accent2?M?#?
40% - Accent2?L湸??%?
40% - Accent3?M?'?
40% - Accent3?L????%?
40% - Accent4?M?+?
40% - Accent4?L?????%?
40% - Accent5?M?/?
40% - Accent5?L?????%?
40% - Accent6?M?3?
40% - Accent6	?L?մ??%?
60% - Accent1?M? ?
60% - Accent123????????%?
60% - Accent2?M?$?
60% - Accent223ٗ??????%?
60% - Accent3?M?(?
60% - Accent323?֚?????%?
60% - Accent4?M?,?
60% - Accent423????????%? 
60% - Accent5?M?0?
60% - Accent523????????%?!
60% - Accent6?M?4?
60% - Accent6	23????????%?"Accent1?A??Accent1O???????%?#Accent2?A?!?Accent2?PM?????%?$Accent3?A?%?Accent3??Y?????%?%Accent4?A?)?Accent4?d??????%?&Accent5?A?-?Accent5K???????%?'Accent6?A?1?Accent6	??F?????%?(Bad?9??Bad????????%?)Calculation????Calculation???????}?%??????	???*
Check Cell???
Check Cell?????????%???????????????	??????+??? ??Comma?,???(??	Comma [0]?-???&??Currency?.???.??Currency [0]?/Explanatory Text?G?5?Explanatory Text??%?0?	??:?	?Followed Hyperlink?	1Good?;??Good??????a?%?2	Heading 1?G??	Heading 1I}?%O????3	Heading 2?G??	Heading 2I}?%???????4	Heading 3?G??	Heading 3I}?%23?????5	Heading 4?9??	Heading 4I}?%?6???(??	Hyperlink?
7Input?u??Input??̙????v?%??????	???8Linked Cell?K??Linked Cell??}?%?????9Neutral?A??Neutral??????e?%????"??Normal?	:Note?b?
?Note????????????????????	??????;Output?w??Output??????????%???????????????	??????Total?M??Total?%O???O?????Warning Text????Warning Text???%?X??TableStyleMedium9PivotStyleLight16`??KValidation Rules?BTDiscount Rules??fEnvironment???????#AutoInsuranceData
Properties#	us_states??dEclipseNewcom.openrules.examplesworkspaceopenrules.examples.insuranceincludeInsuranceData.xls	DatatypesData PolicyData RatingMain MethodsUtil MethodsYYYYY????????#	BI_limits=)2)2#	coverages;!drivers; gender;	
$link_us_states9(marital_status;#	MP_limits=)1)1#	PD_limits=)5)5#	us_states;?"vehicles;??g????C1String[] statesC2String maritalStatusC3C4
String genderGenderdriver.gender.equals(gender)MaleFemaleMarital
StatusMarriedSingleState/PossessionAbbreviationALABAMAALALASKAAKAMERICAN SAMOAASARIZONA AZARKANSASARCALIFORNIA CA	COLORADO COCONNECTICUTCTDELAWAREDEDISTRICT OF COLUMBIADCFEDERATED STATES OF MICRONESIAFMFLORIDAFLGEORGIAGAGUAM GUHAWAIIHIIDAHOIDILLINOISILINDIANAINIOWAIAKANSASKSKENTUCKYKY	LOUISIANALAMAINEMEMARSHALL ISLANDSMHMARYLANDMD
MASSACHUSETTSMAMICHIGANMI	MINNESOTAMNMISSISSIPPIMSMISSOURIMOMONTANAMTNEBRASKANENEVADANV
NEW HAMPSHIRENH
NEW JERSEYNJ
NEW MEXICONMNEW YORKNYNORTH CAROLINANCNORTH DAKOTANDNORTHERN MARIANA ISLANDSMPOHIOOHOKLAHOMAOKOREGONORPALAUPWPENNSYLVANIAPAPUERTO RICOPRRHODE ISLANDRISOUTH CAROLINASCSOUTH DAKOTASD	TENNESSEETNTEXASTXUTAHUTVERMONTVTVIRGIN ISLANDSVI	VIRGINIA VA
WASHINGTONWA
WEST VIRGINIAWV	WISCONSINWIWYOMINGWYMilitary "State"Armed Forces Africa AEAAArmed Forces CanadaArmed Forces EuropeArmed Forces Middle EastArmed Forces PacificAPA1demographicC5String  reasonDriver is too youngDriver is too oldDriver has too many violationsVehicle is too oldif Driver Lives InIf Driver is Too YoungIf Driver is Too OldReject with ReasonIf Vehicle is Too OldIf Driver Lives InIf Driver's Gender IsIf Driver's Marital Status Is,If Number of DMV Points is more or equals toand less or equals topointsSet Discount TypeSet Discount ValueShow Discount In PolicyAbbre-
viation%Armed Forces Americas (except Canada)&contains(states, policy.address.state)If Driver is older than andDriver is younger thanBIBodily Injury liability Property Damage liabilityMedical Payments PDUMBI Uninsured Motorist Bodily InjuryUMPD"Uninsured Motorist Property DamageCOLL	CollisionCOMP
ComprehensiveCoverage ID
int minAge
int maxAge,minAge <= driver.age && driver.age <= maxAge
int maxPointsint minYear.pc.rejections.add(reason + ": " + driver.name)-pc.rejections.add(reason + ": " + vehicle.id)If number of DMV points exceedsdriver.dmvPoints > maxPointsdriver.age < minAgedriver.age > maxAgevehicle.year < minYearString discountTypedouble discountValueboolean showInPolicy+driver.maritalStatus.equals( maritalStatus)If Vehicle registered InJminMileage <= vehicle.yearlyMileage && vehicle.yearlyMileage <= maxMileageint minMileageint maxMileage
and less thanIf yearly mileage is more thanmileagePaddDiscount(calc.discountsForVehicle, discountType, discountValue, showInPolicy)boolean absvehicle.hasAbs == absIf Vehicle has ABShas ABSvehicle.hasAlarm == alarm
boolean alarmIf Vehicle has alarm	has Alarm
int minPoints>minPoints <= driver.dmvPoints && driver.dmvPoints <= maxPoints[This worksheet contains examples of the validation/rejection rules for drivers and vehiclesYThis worksheet contains examples of the discount/surcharge rules for drivers and vehiclesEnvironmentlanguageincludeorg.openl.rules.javafRules void validateDriver(InsurableDriver driver, InsurancePolicy policy, PolicyPremiumCalculator pc) pRules void defineDriverDiscounts(InsurableDriver driver, InsurancePolicy policy, VehiclePremiumCalculator calc) sRules void defineVehicleDiscounts(InsurableVehicle vehicle, InsurancePolicy policy, VehiclePremiumCalculator calc) OaddDiscount(calc.discountsForDriver, discountType, discountValue, showInPolicy)iRules void validateVehicle(InsurableVehicle vehicle, InsurancePolicy policy, PolicyPremiumCalculator pc) ??
;c;b?;?<b<a?<??<?3=2y=x?=?>H>G?>??>?*?)h?g???@?@?A?A??B?LCK?C??D?	?E?
?F??G>?H?
cc???B?????
	???M?R
d????MbP?_*+??%?????&??'??(??)???"?B??????&?U}?I}I}?I}mI}$I}mI}I}?I}	$	I? ??@h@?@?@??@ ?
??+@
??
{??{{{{{	?
|??}}}}}}}}	?
z?
z??
z?
y?F?
F'?
FF?
	F?

?zzzyFFFF?
	Fo?

?
h?
h??
h??
i??F1@F0@?FFF	?
h?
h??
h??
i??
FF~
F?V@?
FF	?
h?
h??
h??
i??FFF?F @F$@	?
f??
f??
f??
g??
F??
F??
F??
F??
	F??
|??}}}}}}}}	?

z?

z??

z?

y?
F?

F'?
FFF	?zzzyF?
F?FFF	?
h?
h??
h??
i??FȞ@F??@?FFF	?
f??
f??
f??
g??
F??
F??FFF	?">"(z6^b^~(`2^>?@	??
?Z



			?7??????C#				
	?	Sheet1gg????D
	????Y?d
d????MbP?_*+??%?????&??'??(??)??M?\\GATEKEEPER\HP LaserJet 4050 S????dXXLetter?.HP LaserJet 4050 Series PCL 62??x?e??.DA???>3?2?0Dq?`?,??x;A?N̆??,Y??0??????O??Z|??%?????????#?DB-?^?
?E?Ea???G/??h???	????ml?8rJK?E9???g?zoq????ϣh??,?)Go??3؋ػ???BDZYl?dWt???k\6,8?#ܧN&N%>Id?N~?f??uV?ۿ?V?J??^eT?:??oD䛔?CSlD1QF????ߕ?9??"dXX?????&?U}$	I}$I}I}?I}?^}?I}?I}I
I}	$	I?  ?@h@ w@ ?@ ?@@ 	?@
J@ ?@h@
Y@   ?   ? ?? ?
{??{{{{{	?
~???
?
??
???
??
??C?
JU?DKDL
?????G?
MC?HNHO
?
l?
m?
n?
s??
Y	?
Z
?[\[]
?
l?
m??
n?
r??
G
?
M?HNHO
?
??
???
j??
s??Y4@Z<@?[\[]
?
???
k??
r??G9@M?F@?HNHO
?
	???
	???
	j??
	s??
	YZ?	[@\@?
		[]
?

???

k??

r??

GM?
H@N @?

	HO
?
???
???
o??
t??
Y??
Z??
[??
\??
	[]
?
???
p??
u??E^@P?X@F@Z@Q^@?
	FR
?

???

q??

v?
G
M
H
N?

	HO
?
~???
?
??
???
??
???CJDK?
	DU
L?????GMHN?
	HY
O?
l?
m??
n??
s??YZ[\?
	[]
?
l?
m??
n??
s??YZ[\	[
]?
??
???
j??
s??YZr?@[A?@?\[]
?
???
k??
r??Gp?@M@?@Hp?@?NHO
?
???
???
o??
t??
Y??
Z??
[??
\??
	[?
]?
???
p??
u??$EX@P@X@F?X@Q?X@F?X@	
R?
???
q??
v?GMHN	H
O?6?	?"*b4ff`Rj\~Zh*b2b`dV?\>?@??
??

	

	
	
?7??????3#	
?+#
?7?marital_statuss?+#ta?	Sheet3gg????D
	???H?g?qyz
d????MbP?_*+??%?????&??'??(??)???"??????a?&?U}$}m}m}$}?}?H??? ?@,@; ; ,	,
; ,,
,; ; ;;;?@?@;J ; g ,,,,,; ,?
????
w??
w??
w??
w??
???
V??
S?
???
A?
T?
???
A?
U
?
???
A?
???
A?
S?
	?	??
	A?
	T	?

?
??

A?

U
?
???
A?
???
A?

? 
??

A!?
?"??
A#?
?$??
A%?
????
?&??
A'?
_??
`??
?(??
A)?
a??
b??
?*??
A+?
a_?
b??
?,??
A-?
a??
b??
?.??
A/?
a??
b??
?0??
A1?
a??
c??
?2??
A3?
d??
e??
?4??
A5?
?6??
A7?
????
x?
?8??
A9?
????
W??
?:??
A;?
????
W??
?<??
A=?
????
W??
?>??
A??
????
W??
?@??
AA?
????
W??
?B??
AC?
????
X??
?D??
AE?D2	l444&444&&&&>BBBBBBB&LLLLLLL ,!,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?; ?
 ?F ??
 AG?
!?H!??
!AI?
"?J"??
"AK?
#?L#??
#AM?
$?N$??
$AO?
%?P%??
%AQ?
&?R&??
&AS?
'?T'??
'AU?
(?V(??
(AW?
)?X)??
)AY?
*?Z*??
*A[?
+?\+??
+A]?
,?^,??
,A_?
-?`-??
-Aa?
.?b.??
.Ac?
/?d/??
/Ae?
0?f0??
0Ag?
1?h1??
1Ai?
2?j2??
2Ak?
3?l3??
3Am?
4?n4??
4Ao?
5?p5??
5Aq?
6?r6??
6As?
7?t7??
7Au?
8?v8??
8Aw?
9?x9??
9Ay?
:?z:??
:A{?
;?|;??
;A}?
<?~<??
<A?
=??=??
=A??
>??>??
>A??
??????
?B??D@l&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@?A??IB??IC??ID??IE??IF??IG??I?@@@@???>?@???*E88//44556677<<==33''(())>>??99::;;--..001122**++,,!!""##$$%%&&  		



?7?	Sheet5gg????D
SummaryInformation(?????DocumentSummaryInformation8?????????????CompObj????????????r????????????Validation RulesDiscount RulesEnvironment
coveragesgendermarital_status
us_statesWorksheets
Named Ranges??
???? ?F&Microsoft Office Excel 2003 WorksheetBiff8Excel.Sheet.8?9?q




© 2015 - 2024 Weber Informatics LLC | Privacy Policy