You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,72 +5,40 @@ type CommercialPropertyInsurance {
5
5
@(defaultValue = "ABCD1234")
6
6
string SIC_Code;
7
7
8
-
// @(defaultValue = "10000")
9
-
// For large range value, don’t set defaultValue(@defaultValue= xxx) in model, and use configurable=false IF the attribute isn't being set in a constraint
string msgg4 = strformat("ROOT LEVEL: locationTxStateCount is %d", commerciallocationclass.locationTxStateCount);
53
-
message(true, msgg4);
54
-
string msgg3 = strformat("ROOT LEVEL: childWarehouseBuildCovLimit is %d", childWarehouseBuildCovLimit);
55
-
@(nullAssignable=true)
56
-
int test = (commerciallocationclass.locationMaxWarehouseCovLimit != null) ? commerciallocationclass.locationMaxWarehouseCovLimit : 0;
57
-
message(1==1, "var =: {}", test);
58
-
message(true, msgg3);
59
-
string msgg2 = strformat("ROOT LEVEL: childCommBuildCovLimit is %d", childCommBuildCovLimit);
60
-
message(true, msgg2);
61
-
string msgg5 = strformat("ROOT LEVEL: childCommercialEquipmentValueSum is %d", childCommercialEquipmentValueSum);
62
-
message(true, msgg5);
63
-
64
-
65
-
/* Top-down rule: Set default product rule - currently enforces the rule, known gap in 256 */
66
-
preference((Cause_Of_Loss == "Basic" && commerciallocationclass.locationCaStateCount > 0) -> generalliabilitycoverage[GeneralLiabilityCoverage], "General Liability coverage is default selected when cause of loss is basic and domestic location state is CA");
67
-
/* Top-down rule: Auto-add general liability coverage if building age is 6 and equipment condition is good */
68
-
32
+
33
+
int childCommBuildCovLimit = commerciallocationclass.locationMaxBuildingCovLimit;
34
+
int childWarehouseBuildCovLimit = commerciallocationclass.locationMaxWarehouseCovLimit;
35
+
int childLocBuildAge6Count = commerciallocationclass.commLocBuildAge6Count;
36
+
int childLocBuildEquipGoodCount = commerciallocationclass.commLocBuildEquipGoodCount;
37
+
int childCommercialEquipmentValueSum = commerciallocationclass.locationSumBuildingEquipVal;
38
+
69
39
require(childLocBuildAge6Count > 0 && childLocBuildEquipGoodCount > 0, generalliabilitycoverage[GeneralLiabilityCoverage] {General_Liability_Limit = 50000}, "General Liability coverage is required when Building age is 6 and Equipment condition is Good");
70
-
/* Top-down rule - general liability coverage should be 50k if all location not TX, max building cov < 50k, max warehouse cov < 20k, and equipment val min > 100k */
constraint(commercialbuildingclass.maxWarehouseCovLimit > 0 -> City == "Palo Alto", "if this location has ware house with coverage limit, default city to Palo Alto");
108
-
109
76
int genLimit = parent(generalLiabilityLimit);
110
77
111
78
string locationProdState = State;
112
79
113
-
@(nullAssignable=true)
114
80
int locBuildAge6Count = (commercialbuildingclass[CommercialBuildingClass] > 0) ? commercialbuildingclass.buildingAge6Count : 0;
115
-
@(nullAssignable=true)
116
81
int locBuildEquipGoodCountInt = (commercialbuildingclass[CommercialBuildingClass] > 0) ? commercialbuildingclass.locBuildEquipGoodCount : 0;
117
-
@(nullAssignable=true)
118
82
int commercialBuildingCovLimit = (commercialbuildingclass[Building] > 0) ? commercialbuildingclass.maxBuildCovLimit : 0;
119
-
120
-
// int warehouseBuildingCovLimit = 0; // setting hardcoded value avoids unbound message
121
-
// int buildCard = cardinality(Building);
122
-
// int wareCard = cardinality(Warehouse);
123
-
// string msggloc3 = strformat("buildCard is %d", buildCard);
124
-
// message(true, msggloc3);
125
-
// string msggloc4 = strformat("wareCard is %d", wareCard);
// int maxWare = max(commercialbuildingclass[Warehouse].warehouseBurglaryCovLimit, 0);
129
-
@(nullAssignable=true)
130
-
int warehouseBuildingCovLimit = (commercialbuildingclass[Warehouse] > 0) ? commercialbuildingclass.maxWarehouseCovLimit : 0; // leads to unbound when warehouse instance is empty, needs to default to 0
// string msgg1 = strformat("parentLocationProdState is %s", parentLocationProdState);
175
-
// message(true, msgg1);
176
-
// string msgg2 = strformat("parentLocationState is %s", parentLocationState);
177
-
// message(true, msgg2);
178
-
179
-
// REVISIT - CML EDITOR suddenly not liking burglarycoverage[BurglaryCoverage].Burglary_Limit notation
180
-
@(nullAssignable=true)
119
+
181
120
int commercialBurglaryCovLimit = (burglarycoverage[BurglaryCoverage] > 0) ? burglarycoverage.Burglary_Limit : 0;
182
-
// REVISIT - CML EDITOR suddenly not liking commercialequipmentclass[Equipment].equipValueSum notation, is accepting either commercialequipmentclass[CommercialEquipmentClass].equipValueSum or commercialequipmentclass.equipValueSum
183
-
@(nullAssignable=true)
184
121
int buildingEquipValSum = (commercialequipmentclass[Equipment] > 0) ? commercialequipmentclass.equipValueSum : 0;
message(equipmentGoodBuildingAgeCondition == true, "Hide sprinklers when equipment condition is good and building age is 6");
197
-
198
-
constraint((UserProfile == "Standard User" && parentLocationProdState != "FL" && commercialequipmentclass.equipMakeLawnMowerCount > 0) -> Sprinklers == "No", "Building should have no sprinkler if Standard User, Location State is not FL, and an Equipment is Lawnmower");
199
-
200
-
constraint((UserProfile == "Custom Partner Community User" && parentLocationState != "CA" && commercialequipmentclass.equipMakeFridgeCount > 0) -> Sprinklers == "Yes", "Building should have sprinklers if Partner Community User, Location State is not CA, and Equipment Class Make is Refrigerator");
// string msgg4 = strformat("parentLocationStateEquip is %s", parentLocationStateEquip);
257
-
// message(true, msgg4);
258
-
// string msgg3 = strformat("rootCovLimit is %d", rootCovLimit);
259
-
// message(true, msgg3);
260
-
// string msgg2 = strformat("parentCommBuildCovLimit is %d", parentCommBuildCovLimit);
261
-
// message(true, msgg2);
262
-
// string msgg5 = strformat("parentBuildingAge is %d", parentBuildingAge);
263
-
// message(true, msgg5);
264
-
265
-
/* Rule: Add Equipment Coverage and set Limit to 50000 if root coverage limit is less than 2,000,000, parent location State is not NY, parent building Burglary coverage limit is less than 50,000, and equipment value is greater than 100,000 */
, equipmentcoverage[EquipmentCoverage]{Equipment_Limit = 50000}, "Add EquipmentCoverage when location is not NY, commercial building cov limit is lt 50000, equipment value > 100,000");
//message(ruleCondition == true, "Equipment coverage is added");
285
-
//message(ruleCondition == true && equipmentcoverage[EquipmentCoverage] > 0, "Equipment coverage is set to 50000");
286
-
287
-
message(true, "EQUIPMENT LEVEL: UserProfile is %s", UserProfile);
288
-
message(true, "EQUIPMENT LEVEL: parentLocationStateEquip is %s", parentLocationStateEquip);
289
-
message(true, "EQUIPMENT LEVEL: Equipment_Condition is %s", Equipment_Condition);
290
-
message(true, "EQUIPMENT LEVEL: parentBuildingAge is %s", parentBuildingAge);
186
+
, equipmentcoverage[EquipmentCoverage], "Add EquipmentCoverage when location is not NY, commercial building cov limit is lt 50000, equipment value > 100,000");
exclude(UserProfile == "System Administrator" && parentLocationStateEquip == "NY" && Equipment_Condition == "Good" && parentBuildingAge == 6, equipmentcoverage[EquipmentCoverage], "Please remove the Equipment Coverage due to Equipment Condition = Good and Building Age = 6 when profile is community user");
293
-
message(Equipment_Condition == "Good" && parentBuildingAge == 6, "Removed Equipment Coverage due to Equipment Condition = Good and Building Age = 6 when profile is community user");
0 commit comments