@frontlinesystems/rason-mcp-server 2026.5.0 → 2026.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +35 -35
- package/README.md +1 -1
- package/examples/EXAMPLES_REFERENCE.md +128 -128
- package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +53 -53
- package/examples/calculation/DMNExamples/DMN Context example.json +69 -69
- package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -43
- package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -28
- package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -66
- package/examples/calculation/DMNExamples/FEEL For with two indices.json +15 -15
- package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -88
- package/examples/calculation/DMNExamples/FEEL If Then Else example.json +25 -25
- package/examples/calculation/DMNExamples/FEEL List example.json +37 -37
- package/examples/calculation/DMNExamples/FEEL List operator.json +17 -17
- package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +36 -36
- package/examples/calculation/DMNExamples/FEEL Some or Every example.json +65 -65
- package/examples/calculation/DecisionTables/DT Datasource example.json +52 -52
- package/examples/calculation/DecisionTables/DT Date and Time examples.json +91 -91
- package/examples/calculation/DecisionTables/DT Expression example.json +32 -32
- package/examples/calculation/DecisionTables/DT Hit Policy examples.json +136 -136
- package/examples/calculation/DecisionTables/DT Loan Recommend model.json +81 -81
- package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +218 -218
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -286
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +203 -203
- package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -214
- package/examples/calculation/DecisionTables/DT Output Order example.json +39 -39
- package/examples/calculation/DecisionTables/DT Unique example.json +38 -38
- package/examples/calculation/TypeDefinitions/TypeDefCF.json +64 -64
- package/examples/calculation/TypeDefinitions/TypeDefDT.json +57 -57
- package/examples/datamining/AffinityAnalysis/AssociationRules.json +51 -51
- package/examples/datamining/Classification/DecisionTree.json +90 -90
- package/examples/datamining/Classification/DiscriminantAnalysis.json +81 -81
- package/examples/datamining/Classification/Ensembles/Bagging.json +66 -66
- package/examples/datamining/Classification/Ensembles/Boosting.json +67 -67
- package/examples/datamining/Classification/Ensembles/RandomTrees.json +91 -91
- package/examples/datamining/Classification/FindBestModel.json +86 -86
- package/examples/datamining/Classification/LogisticRegression.json +82 -82
- package/examples/datamining/Classification/NaiveBayes.json +78 -78
- package/examples/datamining/Classification/NearestNeighbors.json +84 -84
- package/examples/datamining/Classification/NeuralNetwork.json +92 -92
- package/examples/datamining/Clustering/Hierarchical.json +54 -54
- package/examples/datamining/Clustering/KMeans.json +71 -71
- package/examples/datamining/DataSources/DelimitedFile.json +49 -49
- package/examples/datamining/DataSources/JSONFile.json +49 -49
- package/examples/datamining/DataSources/MSAccessDatabase.json +49 -49
- package/examples/datamining/DataSources/MSExcelTable.json +50 -50
- package/examples/datamining/DataSources/MSSQLDatabase.json +49 -49
- package/examples/datamining/DataSources/ODATATable.json +49 -49
- package/examples/datamining/DataSources/ODBCDatabase.json +49 -49
- package/examples/datamining/FeatureSelection/LinearWrapping.json +53 -53
- package/examples/datamining/FeatureSelection/LogisticWrapping.json +56 -56
- package/examples/datamining/FeatureSelection/Univariate.json +78 -78
- package/examples/datamining/Regression/DecisionTree.json +82 -82
- package/examples/datamining/Regression/Ensembles/Bagging.json +62 -62
- package/examples/datamining/Regression/Ensembles/Boosting.json +62 -62
- package/examples/datamining/Regression/Ensembles/RandomTrees.json +78 -78
- package/examples/datamining/Regression/FindBestModel.json +86 -86
- package/examples/datamining/Regression/LinearRegression.json +124 -124
- package/examples/datamining/Regression/NearestNeighbors.json +77 -77
- package/examples/datamining/Regression/NeuralNetwork.json +82 -82
- package/examples/datamining/Scoring/JSONClassifier.json +62 -62
- package/examples/datamining/Scoring/JSONClassifierNN.json +62 -62
- package/examples/datamining/Scoring/JSONClusterizer.json +37 -37
- package/examples/datamining/Scoring/JSONForecaster.json +49 -49
- package/examples/datamining/Scoring/JSONLinearRegression.json +56 -56
- package/examples/datamining/Scoring/JSONPCA.json +41 -41
- package/examples/datamining/Scoring/JSONRegressor.json +56 -56
- package/examples/datamining/Scoring/JSONTransformer.json +38 -38
- package/examples/datamining/Scoring/PMMLClassifier.json +42 -42
- package/examples/datamining/Scoring/PMMLForecaster.json +43 -43
- package/examples/datamining/Scoring/PMMLRegressor.json +38 -38
- package/examples/datamining/Scoring/PMMLTransformer.json +38 -38
- package/examples/datamining/Simulation/LinearRegressionSimulation.json +117 -117
- package/examples/datamining/Simulation/SyntheticDataGeneration.json +108 -108
- package/examples/datamining/Simulation/pmml-risk-scoring.json +62 -62
- package/examples/datamining/Summarizer/Summarization.json +54 -54
- package/examples/datamining/TextMining/LatentSemanticAnalysis.json +51 -51
- package/examples/datamining/TextMining/TfIdf-FileData.json +65 -65
- package/examples/datamining/TextMining/TfIdf-InlineData.json +55 -55
- package/examples/datamining/TimeSeries/AddHoltWinters.json +79 -79
- package/examples/datamining/TimeSeries/Arima.json +74 -74
- package/examples/datamining/TimeSeries/DoubleExponential.json +65 -65
- package/examples/datamining/TimeSeries/Exponential.json +64 -64
- package/examples/datamining/TimeSeries/LagAnalysis.json +48 -48
- package/examples/datamining/TimeSeries/MovingAverage.json +65 -65
- package/examples/datamining/TimeSeries/MulHoltWinters.json +65 -65
- package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +65 -65
- package/examples/datamining/Transformation/Binning.json +69 -69
- package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +47 -47
- package/examples/datamining/Transformation/CategoryReduction.json +51 -51
- package/examples/datamining/Transformation/Factorization.json +50 -50
- package/examples/datamining/Transformation/MissingDataHandling.json +83 -83
- package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +54 -54
- package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +48 -48
- package/examples/datamining/Transformation/PartitionTimeSeries.json +48 -48
- package/examples/datamining/Transformation/Partitioning-DF.json +72 -72
- package/examples/datamining/Transformation/Partitioning.json +46 -46
- package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +65 -65
- package/examples/datamining/Transformation/PartitioningWithOversampling.json +44 -44
- package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +52 -52
- package/examples/datamining/Transformation/Rescaling.json +67 -67
- package/examples/datamining/Transformation/Sampling.json +43 -43
- package/examples/datamining/Transformation/StratifiedSampling.json +46 -46
- package/examples/flow/SQLServerTransform.json +260 -260
- package/examples/flow/dm-calc-pipeline.json +277 -277
- package/examples/flow/dm-pipeline-simulation.json +113 -113
- package/examples/flow/opt-sim-pipeline.json +159 -159
- package/examples/flow/sim-dm-pipeline.json +106 -106
- package/examples/flow/sim-sim-pipeline.json +136 -136
- package/examples/index.json +4678 -4678
- package/examples/{Optimization → optimization}/Conic/AirlineHubConic.json +111 -111
- package/examples/{Optimization → optimization}/Conic/AirlineHubConic2.json +108 -108
- package/examples/{Optimization → optimization}/Conic/AirlineHubConic3.json +111 -111
- package/examples/{Optimization → optimization}/Conic/AirlineHubConic4.json +99 -99
- package/examples/{Optimization → optimization}/Conic/AirlineHubConic5.json +101 -101
- package/examples/{Optimization → optimization}/DataBinding/ProductMixCsv.json +81 -81
- package/examples/{Optimization → optimization}/DataBinding/ProductMixCsv4.json +96 -96
- package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel.json +73 -73
- package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel1.json +86 -86
- package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel11.json +108 -108
- package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel2.json +77 -77
- package/examples/{Optimization → optimization}/DataBinding/ProductMixTab.json +89 -89
- package/examples/{Optimization → optimization}/DataBinding/ProductMixTab1.json +73 -73
- package/examples/{Optimization → optimization}/DataBinding/ProductMixTab2.json +77 -77
- package/examples/{Optimization → optimization}/Linear/Inventory.json +199 -199
- package/examples/{Optimization → optimization}/Linear/Matop.json +119 -119
- package/examples/{Optimization → optimization}/Linear/ProductMix.json +97 -97
- package/examples/{Optimization → optimization}/Linear/ProductMix2.json +72 -72
- package/examples/{Optimization → optimization}/Linear/ProductMix3.json +49 -49
- package/examples/{Optimization → optimization}/Linear/ProductMix4.json +56 -56
- package/examples/{Optimization → optimization}/Linear/ProductMixCsv1.json +106 -106
- package/examples/{Optimization → optimization}/Linear/ProductMixCsv2.json +106 -106
- package/examples/{Optimization → optimization}/Linear/ProductMixSQL11.json +82 -82
- package/examples/{Optimization → optimization}/Linear/Rowop.json +126 -126
- package/examples/{Optimization → optimization}/NonLinear/AirlineHub.json +63 -63
- package/examples/{Optimization → optimization}/NonLinear/AirlineHub2.json +47 -47
- package/examples/{Optimization → optimization}/NonLinear/AirlineHub3.json +47 -47
- package/examples/{Optimization → optimization}/NonSmooth/Inventory2.json +159 -159
- package/examples/{Optimization → optimization}/Quadratic/PortfolioOpt.json +55 -55
- package/examples/{Optimization → optimization}/Quadratic/PortfolioOpt2.json +65 -65
- package/examples/{Optimization → optimization}/WithUncertainty/GasCompanyChance.json +78 -78
- package/examples/{Optimization → optimization}/WithUncertainty/GasCompanyRecourse.json +78 -78
- package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect.json +77 -77
- package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect2.json +81 -81
- package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect3.json +84 -84
- package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect4.json +74 -74
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +52 -52
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +57 -57
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +35 -35
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +33 -33
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +25 -25
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +47 -47
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +69 -69
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +49 -49
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +337 -337
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +61 -61
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +190 -190
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +75 -75
- package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +108 -108
- package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +68 -68
- package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -183
- package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -79
- package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +154 -154
- package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +118 -118
- package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +142 -142
- package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +81 -81
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -69
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +113 -113
- package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +107 -107
- package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -117
- package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -108
- package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -67
- package/examples/rason-features/UserGuide/UGForecast.json +50 -50
- package/examples/rason-features/UserGuide/UGProductMix1.json +48 -48
- package/examples/rason-features/UserGuide/UGProductMix2.json +48 -48
- package/examples/rason-features/UserGuide/UGProductMixTab1.json +67 -67
- package/examples/rason-features/UserGuide/UGProductMixTab2.json +76 -76
- package/examples/rason-features/UserGuide/UGProductMixTab3.json +66 -66
- package/examples/rason-features/UserGuide/UGProductMixTab4.json +70 -70
- package/examples/rason-features/UserGuide/UGProductMixTab5.json +67 -67
- package/examples/rason-features/UserGuide/UGProjectSelect0.json +91 -91
- package/examples/rason-features/UserGuide/UGProjectSelect1.json +74 -74
- package/examples/rason-features/UserGuide/UGProjectSelect2.json +74 -74
- package/examples/rason-features/UserGuide/UGYieldManagement1.json +61 -61
- package/examples/rason-features/UserGuide/UGYieldManagement2.json +61 -61
- package/examples/rason-features/UserGuide/UGYieldManagement3.json +63 -63
- package/examples/{Simulation → simulation}/CandyStoreSalesUsingSIP.json +147 -147
- package/examples/{Simulation → simulation}/CollegeFundGrowth1.json +423 -423
- package/examples/{Simulation → simulation}/CollegeFundGrowth1SIPModel.json +27 -27
- package/examples/{Simulation → simulation}/CollegeFundGrowth2.json +415 -415
- package/examples/{Simulation → simulation}/CollegeFundGrowthSIP.json +401 -401
- package/examples/{Simulation → simulation}/GBMSimulationModel.json +236 -236
- package/examples/{Simulation → simulation}/YieldManagement(Sim).json +69 -69
- package/examples/{Simulation → simulation}/YieldManagement2(Sim).json +72 -72
- package/out/index.cjs +38 -38
- package/package.json +2 -2
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modelName": "DTDateTimeExample",
|
|
3
|
-
"modelType": "calculation",
|
|
4
|
-
"modelDescription": "RASON Date and Time Decision Table Examples: Decision Tables contain a set of rules which specify actions to perform based on specific conditions. Decision tables are a good tool to use when there is a consistent number of rules, or conditions, to be evaluated followed by a specific set of actions to be perfrmed once a rule, or condition, is met. This example contains 3 decision tables, tblRiskRating, tblTollTax and tblParkingFee.",
|
|
5
|
-
"decisionTables": {
|
|
6
|
-
"comment": "Decision tables are created within the decisionTable section in a RASON model. In this example, there are 3 decision tables, tblRiskRating, tblTollTax and tblParkingFee",
|
|
7
|
-
"tblRiskRating": {
|
|
8
|
-
"comment": "This decision table generates a predicted medical rating based on the age of a patient and his/her's medical history. This decision table accepts two inputs, birthDate of type date, and medHistory of type text, and returns a RiskRating of type text. The hit policy for this table is 'U' for unique. Unique (U): A unique rule must 'hit' evaluating to a unique result. If multiple rules are valid, an error will be returned.",
|
|
9
|
-
"inputs": [ "birthDate", "medHistory" ],
|
|
10
|
-
"outputs": [ "riskRating" ],
|
|
11
|
-
"inputTypes": [ "date", "text" ],
|
|
12
|
-
"outputTypes": [ "text" ],
|
|
13
|
-
"rules": [
|
|
14
|
-
[ ">'1970-05-05'", "good", "medium" ],
|
|
15
|
-
[ ">'1970-05-05'", "bad", "high" ],
|
|
16
|
-
[ "['1935-05-05'..'1970-05-05']", "-", "medium" ],
|
|
17
|
-
[ "<'1935-05-05'", "good", "low" ],
|
|
18
|
-
[ "<'1935-05-05'", "bad", "medium" ]
|
|
19
|
-
],
|
|
20
|
-
"hitPolicy": "U"
|
|
21
|
-
},
|
|
22
|
-
"tblTollTax": {
|
|
23
|
-
"comment": "This decision table generates a toll amount based the time a car enters the toll road. This decision table accepts one input, operTime of type time, and returns two outputs: traffic of type text and toll of type number. The hit policy for this table is 'U' for unique.",
|
|
24
|
-
"inputs": [ "operTime" ],
|
|
25
|
-
"outputs": [ "traffic", "toll" ],
|
|
26
|
-
"refTypes": [ "time", "text", "number" ],
|
|
27
|
-
"rules": [
|
|
28
|
-
[ ">'19:00:00'", "low", 5 ],
|
|
29
|
-
[ "['15:00:00'..'19:00:00']", "high", 7 ],
|
|
30
|
-
[ "['09:00:00'..'15:00:00')", "medium", 6 ],
|
|
31
|
-
[ "['06:00:00'..'09:00:00')", "high", 7 ],
|
|
32
|
-
[ "<'06:00:00'", "low", 5 ]
|
|
33
|
-
],
|
|
34
|
-
"hitPolicy": "U"
|
|
35
|
-
},
|
|
36
|
-
"tblParkingFee": {
|
|
37
|
-
"comment": "This decision table generates a parking fee based on the time a car spends in a parking garage. This decision table accepts one input, dtDuration of type duration, and returns one outputs, parkingFee of type number. The hit policy for this table is 'U' for unique.",
|
|
38
|
-
"inputs": [ "dtDuration" ],
|
|
39
|
-
"outputs": [ "parkingFee" ],
|
|
40
|
-
"refTypes": [ "duration", "number" ],
|
|
41
|
-
"rules": [
|
|
42
|
-
[ "<'PT20M'", 0 ],
|
|
43
|
-
[ "['PT20M'..'PT1H')", "2 *ceiling(duration(dtDuration)/duration('PT20M'))" ],
|
|
44
|
-
[ "['PT1H'..'PT4H')", "6 *ceiling(duration(dtDuration)/duration('PT1H'))" ],
|
|
45
|
-
[ ">='PT4H'", "30*ceiling(duration(dtDuration)/duration('P1D'))" ]
|
|
46
|
-
],
|
|
47
|
-
"hitPolicy": "U"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"data": {
|
|
51
|
-
"comment": "The data section holds the input parameters for each decision table.",
|
|
52
|
-
"Date1": {
|
|
53
|
-
"comment": "This is a patient's date of birth.",
|
|
54
|
-
"value": "'1964-05-05'"
|
|
55
|
-
},
|
|
56
|
-
"Date2": {
|
|
57
|
-
"comment": "This is a patient's medical history rating.",
|
|
58
|
-
"value": "good"
|
|
59
|
-
},
|
|
60
|
-
"actualTimeEntered": {
|
|
61
|
-
"comment": "This is the time that a car enters the toll road.",
|
|
62
|
-
"value": "'18:50:05'"
|
|
63
|
-
},
|
|
64
|
-
"durationParked": {
|
|
65
|
-
"comment": "This is that a car spent in the parking garage.",
|
|
66
|
-
"value": "PT25M"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"formulas": {
|
|
70
|
-
"comment": "Call each decision table from the 'formulas section'.",
|
|
71
|
-
"dateResult": {
|
|
72
|
-
"comment": "This formula calls the tblRiskRating decision table passing two input parameters Date1 and Date 2",
|
|
73
|
-
"formula": "tblRiskRating(,,Date1, Date2)",
|
|
74
|
-
"finalValue": []
|
|
75
|
-
},
|
|
76
|
-
"tollResult": {
|
|
77
|
-
"comment": "This formula calls the tblTollTax decision table passing one input parameter, actualTimeEntered, and asks for the toll amount in the result.",
|
|
78
|
-
"formula": "tblTollTax('toll',,actualTimeEntered)",
|
|
79
|
-
"finalValue": []
|
|
80
|
-
},
|
|
81
|
-
"trafficResult": {
|
|
82
|
-
"comment": "This formula calls the tblTollTax decision table passing one input parameter, actualTimeEntered, and asks for the traffic category in the result.",
|
|
83
|
-
"formula": "tblTollTax('traffic',,actualTimeEntered)",
|
|
84
|
-
"finalValue": []
|
|
85
|
-
},
|
|
86
|
-
"durationResult": {
|
|
87
|
-
"comment": "This formula calls the tblParkingFee decision table passing one input parameter, durationParked.",
|
|
88
|
-
"formula": "tblParkingFee(,,durationParked)",
|
|
89
|
-
"finalValue": []
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modelName": "DTDateTimeExample",
|
|
3
|
+
"modelType": "calculation",
|
|
4
|
+
"modelDescription": "RASON Date and Time Decision Table Examples: Decision Tables contain a set of rules which specify actions to perform based on specific conditions. Decision tables are a good tool to use when there is a consistent number of rules, or conditions, to be evaluated followed by a specific set of actions to be perfrmed once a rule, or condition, is met. This example contains 3 decision tables, tblRiskRating, tblTollTax and tblParkingFee.",
|
|
5
|
+
"decisionTables": {
|
|
6
|
+
"comment": "Decision tables are created within the decisionTable section in a RASON model. In this example, there are 3 decision tables, tblRiskRating, tblTollTax and tblParkingFee",
|
|
7
|
+
"tblRiskRating": {
|
|
8
|
+
"comment": "This decision table generates a predicted medical rating based on the age of a patient and his/her's medical history. This decision table accepts two inputs, birthDate of type date, and medHistory of type text, and returns a RiskRating of type text. The hit policy for this table is 'U' for unique. Unique (U): A unique rule must 'hit' evaluating to a unique result. If multiple rules are valid, an error will be returned.",
|
|
9
|
+
"inputs": [ "birthDate", "medHistory" ],
|
|
10
|
+
"outputs": [ "riskRating" ],
|
|
11
|
+
"inputTypes": [ "date", "text" ],
|
|
12
|
+
"outputTypes": [ "text" ],
|
|
13
|
+
"rules": [
|
|
14
|
+
[ ">'1970-05-05'", "good", "medium" ],
|
|
15
|
+
[ ">'1970-05-05'", "bad", "high" ],
|
|
16
|
+
[ "['1935-05-05'..'1970-05-05']", "-", "medium" ],
|
|
17
|
+
[ "<'1935-05-05'", "good", "low" ],
|
|
18
|
+
[ "<'1935-05-05'", "bad", "medium" ]
|
|
19
|
+
],
|
|
20
|
+
"hitPolicy": "U"
|
|
21
|
+
},
|
|
22
|
+
"tblTollTax": {
|
|
23
|
+
"comment": "This decision table generates a toll amount based the time a car enters the toll road. This decision table accepts one input, operTime of type time, and returns two outputs: traffic of type text and toll of type number. The hit policy for this table is 'U' for unique.",
|
|
24
|
+
"inputs": [ "operTime" ],
|
|
25
|
+
"outputs": [ "traffic", "toll" ],
|
|
26
|
+
"refTypes": [ "time", "text", "number" ],
|
|
27
|
+
"rules": [
|
|
28
|
+
[ ">'19:00:00'", "low", 5 ],
|
|
29
|
+
[ "['15:00:00'..'19:00:00']", "high", 7 ],
|
|
30
|
+
[ "['09:00:00'..'15:00:00')", "medium", 6 ],
|
|
31
|
+
[ "['06:00:00'..'09:00:00')", "high", 7 ],
|
|
32
|
+
[ "<'06:00:00'", "low", 5 ]
|
|
33
|
+
],
|
|
34
|
+
"hitPolicy": "U"
|
|
35
|
+
},
|
|
36
|
+
"tblParkingFee": {
|
|
37
|
+
"comment": "This decision table generates a parking fee based on the time a car spends in a parking garage. This decision table accepts one input, dtDuration of type duration, and returns one outputs, parkingFee of type number. The hit policy for this table is 'U' for unique.",
|
|
38
|
+
"inputs": [ "dtDuration" ],
|
|
39
|
+
"outputs": [ "parkingFee" ],
|
|
40
|
+
"refTypes": [ "duration", "number" ],
|
|
41
|
+
"rules": [
|
|
42
|
+
[ "<'PT20M'", 0 ],
|
|
43
|
+
[ "['PT20M'..'PT1H')", "2 *ceiling(duration(dtDuration)/duration('PT20M'))" ],
|
|
44
|
+
[ "['PT1H'..'PT4H')", "6 *ceiling(duration(dtDuration)/duration('PT1H'))" ],
|
|
45
|
+
[ ">='PT4H'", "30*ceiling(duration(dtDuration)/duration('P1D'))" ]
|
|
46
|
+
],
|
|
47
|
+
"hitPolicy": "U"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"data": {
|
|
51
|
+
"comment": "The data section holds the input parameters for each decision table.",
|
|
52
|
+
"Date1": {
|
|
53
|
+
"comment": "This is a patient's date of birth.",
|
|
54
|
+
"value": "'1964-05-05'"
|
|
55
|
+
},
|
|
56
|
+
"Date2": {
|
|
57
|
+
"comment": "This is a patient's medical history rating.",
|
|
58
|
+
"value": "good"
|
|
59
|
+
},
|
|
60
|
+
"actualTimeEntered": {
|
|
61
|
+
"comment": "This is the time that a car enters the toll road.",
|
|
62
|
+
"value": "'18:50:05'"
|
|
63
|
+
},
|
|
64
|
+
"durationParked": {
|
|
65
|
+
"comment": "This is that a car spent in the parking garage.",
|
|
66
|
+
"value": "PT25M"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"formulas": {
|
|
70
|
+
"comment": "Call each decision table from the 'formulas section'.",
|
|
71
|
+
"dateResult": {
|
|
72
|
+
"comment": "This formula calls the tblRiskRating decision table passing two input parameters Date1 and Date 2",
|
|
73
|
+
"formula": "tblRiskRating(,,Date1, Date2)",
|
|
74
|
+
"finalValue": []
|
|
75
|
+
},
|
|
76
|
+
"tollResult": {
|
|
77
|
+
"comment": "This formula calls the tblTollTax decision table passing one input parameter, actualTimeEntered, and asks for the toll amount in the result.",
|
|
78
|
+
"formula": "tblTollTax('toll',,actualTimeEntered)",
|
|
79
|
+
"finalValue": []
|
|
80
|
+
},
|
|
81
|
+
"trafficResult": {
|
|
82
|
+
"comment": "This formula calls the tblTollTax decision table passing one input parameter, actualTimeEntered, and asks for the traffic category in the result.",
|
|
83
|
+
"formula": "tblTollTax('traffic',,actualTimeEntered)",
|
|
84
|
+
"finalValue": []
|
|
85
|
+
},
|
|
86
|
+
"durationResult": {
|
|
87
|
+
"comment": "This formula calls the tblParkingFee decision table passing one input parameter, durationParked.",
|
|
88
|
+
"formula": "tblParkingFee(,,durationParked)",
|
|
89
|
+
"finalValue": []
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
92
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modelName": "DTExpressionExample",
|
|
3
|
-
"modelDescription": "RASON Decision Table Example using an Expression: This example illustrates how to utilize duration in an expression in the body of a decision table. The tblParkingFee decision table calculates a fee based on the time spent in a parking garage.",
|
|
4
|
-
"modelType": "calculation",
|
|
5
|
-
"data": {
|
|
6
|
-
"comment": "The input parameter period, use binding to feed dif. values",
|
|
7
|
-
"period": {
|
|
8
|
-
"value": "PT25M"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"decisionTables": {
|
|
12
|
-
"tblParkingFee": {
|
|
13
|
-
"comment": "This decision table calculates a parking fee based on the amount of time spent in a parking garage. The input parameter is the time spent, or the duration. There are two formats for duration, one measuring periods in months and another measuring periods in seconds. For example, P1DT1H2M3S denotes: P for 'period', 1D for 1 day, T for 'time', 1H for 1 hour, 2M for 2 minutes and 3S for 3 seconds. The output is the parking fee. The fee is generated in the rules portion of the table. For example, if your car is parked in the garage for 90 minutes (PT1H30M), then the parking fee will be 6 * ceiling(duration(PT1H30M)/duration(PT1H)) or 12. The Hit policy is Unique which means that if more than one rule is successful, an error will be returned.",
|
|
14
|
-
"inputs": [ "dtDuration" ],
|
|
15
|
-
"outputs": [ "parkingFee" ],
|
|
16
|
-
"rules": [
|
|
17
|
-
[ "<'PT20M'", 0 ],
|
|
18
|
-
[ "['PT20M'..'PT1H')", "2 *ceiling(duration(dtDuration)/duration('PT20M'))" ],
|
|
19
|
-
[ "['PT1H'..'PT4H')", "6 *ceiling(duration(dtDuration)/duration('PT1H'))" ],
|
|
20
|
-
[ ">='PT4H'", "30*ceiling(duration(dtDuration)/duration('P1D'))" ]
|
|
21
|
-
],
|
|
22
|
-
"hitPolicy": "Unique"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"formulas": {
|
|
26
|
-
"comment": "The res formula computes a parking fee by calling the tblParkingFee decision table while passing the input parameter, period or PT25M (25 minutes).",
|
|
27
|
-
"res": {
|
|
28
|
-
"formula": "tblParkingFee(,,period)",
|
|
29
|
-
"finalValue": []
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modelName": "DTExpressionExample",
|
|
3
|
+
"modelDescription": "RASON Decision Table Example using an Expression: This example illustrates how to utilize duration in an expression in the body of a decision table. The tblParkingFee decision table calculates a fee based on the time spent in a parking garage.",
|
|
4
|
+
"modelType": "calculation",
|
|
5
|
+
"data": {
|
|
6
|
+
"comment": "The input parameter period, use binding to feed dif. values",
|
|
7
|
+
"period": {
|
|
8
|
+
"value": "PT25M"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"decisionTables": {
|
|
12
|
+
"tblParkingFee": {
|
|
13
|
+
"comment": "This decision table calculates a parking fee based on the amount of time spent in a parking garage. The input parameter is the time spent, or the duration. There are two formats for duration, one measuring periods in months and another measuring periods in seconds. For example, P1DT1H2M3S denotes: P for 'period', 1D for 1 day, T for 'time', 1H for 1 hour, 2M for 2 minutes and 3S for 3 seconds. The output is the parking fee. The fee is generated in the rules portion of the table. For example, if your car is parked in the garage for 90 minutes (PT1H30M), then the parking fee will be 6 * ceiling(duration(PT1H30M)/duration(PT1H)) or 12. The Hit policy is Unique which means that if more than one rule is successful, an error will be returned.",
|
|
14
|
+
"inputs": [ "dtDuration" ],
|
|
15
|
+
"outputs": [ "parkingFee" ],
|
|
16
|
+
"rules": [
|
|
17
|
+
[ "<'PT20M'", 0 ],
|
|
18
|
+
[ "['PT20M'..'PT1H')", "2 *ceiling(duration(dtDuration)/duration('PT20M'))" ],
|
|
19
|
+
[ "['PT1H'..'PT4H')", "6 *ceiling(duration(dtDuration)/duration('PT1H'))" ],
|
|
20
|
+
[ ">='PT4H'", "30*ceiling(duration(dtDuration)/duration('P1D'))" ]
|
|
21
|
+
],
|
|
22
|
+
"hitPolicy": "Unique"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"formulas": {
|
|
26
|
+
"comment": "The res formula computes a parking fee by calling the tblParkingFee decision table while passing the input parameter, period or PT25M (25 minutes).",
|
|
27
|
+
"res": {
|
|
28
|
+
"formula": "tblParkingFee(,,period)",
|
|
29
|
+
"finalValue": []
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modelName": "DTHitPolicyExample",
|
|
3
|
-
"modelDescription": "RASON Decision Table Hit Policy Example: This example illustrates the use of all 7 Hit Policies supported by RASON Decision Services: Unique, Any, Priority, First, Rule Order, Output Order, & Collect. See each table descriptions for more information.",
|
|
4
|
-
"modelType": "calculation",
|
|
5
|
-
"decisionTables": {
|
|
6
|
-
"comment": "There are 7 decision tables each illustrating a different hit policy.",
|
|
7
|
-
"tblPolicyAny": {
|
|
8
|
-
"comment": "The tblPolicyAny decision table showcases the Any hit policy: If rules overlap, but point to the sae result, that uniqe result is returned. This table takes three input parameters, creditRating, creditCardBalance and studentLoanBalance and returns a loanCompliance rating of 'compliant' or 'not compl'. For example, if a person with a B credit rating and a loan of 15,000 would trigger the 2nd and 3rd rules. However, since both rules return 'not compl', no error is reported.",
|
|
9
|
-
"inputs": [ "creditRating", "creditCardBalance", "studentLoanBalance" ],
|
|
10
|
-
"outputs": [ "loanCompliance" ],
|
|
11
|
-
"rules": [
|
|
12
|
-
[ "A", "<10000", "<50000", "compliant" ],
|
|
13
|
-
[ "Not(A)", "-", "-", "not compl" ],
|
|
14
|
-
[ "-", ">=10000", "-", "not compl" ],
|
|
15
|
-
[ "-", "-", ">=50000", "not compl" ]
|
|
16
|
-
],
|
|
17
|
-
"hitPolicy": "A"
|
|
18
|
-
},
|
|
19
|
-
"tblPolicyCollect": {
|
|
20
|
-
"comment": "The tblPolicyCollect decision table exhibits the C+ hit policy: If multiple rules are hit, return the collection of total of the results, in the rule order. This table accepts two input parameters of type number, age and service, and returns the number of vacation days that an employee is eligible to use. For example, a 58 year old employee with 31 years of service would qualify for 30 vacation days, or 22 (from rule 1) + 3 (from rule 3) + 5 (from rule 6).",
|
|
21
|
-
"inputs": [ "age", "service" ],
|
|
22
|
-
"outputs": [ "holidays" ],
|
|
23
|
-
"inputTypes": [ "number", "number" ],
|
|
24
|
-
"outputTypes": [ "number" ],
|
|
25
|
-
"rules": [
|
|
26
|
-
[ "-", "-", 22 ],
|
|
27
|
-
[ ">=60", "-", 3 ],
|
|
28
|
-
[ "-", ">=30", 3 ],
|
|
29
|
-
[ "<18", "-", 5 ],
|
|
30
|
-
[ ">=65", "-", 5 ],
|
|
31
|
-
[ "-", ">=30", 5 ],
|
|
32
|
-
[ "[18..60]", "[15..30]", 2 ],
|
|
33
|
-
[ "[45..60]", "<30", 2 ]
|
|
34
|
-
],
|
|
35
|
-
"hitPolicy": "C+"
|
|
36
|
-
},
|
|
37
|
-
"tblPolicyUnique": {
|
|
38
|
-
"comment": "The tblPolicyUnique decision table exhibits the Unique hit policy: A unique rule must be triggered evaluating to a unique result. If multiple rules are triggered, an error will be returned. This table accepts two input parameters, age and medHistory, and a patient's health risk rating and the rule that was triggered. For example, a 54 year old employee with good health rating would be labeled as medium health risk by triggering Rule 3.",
|
|
39
|
-
"inputs": [ "age", "medHistory" ],
|
|
40
|
-
"outputs": [ "riskRating", "rule" ],
|
|
41
|
-
"rules": [
|
|
42
|
-
[ ">60,<25", "good", "medium", "r1" ],
|
|
43
|
-
[ ">60", "bad", "high", "r2" ],
|
|
44
|
-
[ "[25..60]", "-", "medium", "r3" ],
|
|
45
|
-
[ "<25", "good", "low", "r4" ],
|
|
46
|
-
[ "<25", "bad", "medium", "r5" ]
|
|
47
|
-
],
|
|
48
|
-
"hitPolicy": "U"
|
|
49
|
-
},
|
|
50
|
-
"tblPolicyFirst": {
|
|
51
|
-
"comment": "The tblPolicyFirst decision table employes the First hit policy: Only 1 result is returned for this policy. Once a rule is evaluated successfully, or a rule is triggered, the search stops. This table accepts three input parameters: order, location and customer, and a discount percentage is returned. For example, a web order from Germany would result in a 0% discount, triggered by rule 3. Once a rule is triggered, the search is stopped even though Rule 4 would also apply.",
|
|
52
|
-
"inputs": [ "order", "location", "customer" ],
|
|
53
|
-
"outputs": [ "discount" ],
|
|
54
|
-
"rules": [
|
|
55
|
-
[ "web", "US", "wholesaler", 10 ],
|
|
56
|
-
[ "phone", "-", "-", 2 ],
|
|
57
|
-
[ "-", "non_US", "-", 0 ],
|
|
58
|
-
[ "-", "-", "retailer", 5 ]
|
|
59
|
-
],
|
|
60
|
-
"hitPolicy": "F"
|
|
61
|
-
},
|
|
62
|
-
"tblPolicyRuleOrder": {
|
|
63
|
-
"comment": "The tblPolicyRuleOrder decision table employes the Rule Order hit policy: If multiple rules are hit, return the collection of results as created in the rule order. This table accepts three input parameters: gpa, act_count and honor_member, and two outputs will be returned, eligibility and the rule number(s) triggered. For example, a child with a 3.6 GPA, an ACT_count = 4 and an honor student will return the result 20% scholar from r1 and 30% work from r2.",
|
|
64
|
-
"inputs": [ "gpa", "act_count", "honor_member" ],
|
|
65
|
-
"outputs": [ "eligibility", "rule" ],
|
|
66
|
-
"refTypes": [ "number", "number", "boolean", "text", "text" ],
|
|
67
|
-
"rules": [
|
|
68
|
-
[ ">3.5", ">=4", true, "20% scholar", "r1" ],
|
|
69
|
-
[ ">3.0", "-", true, "30% loan", "r2" ],
|
|
70
|
-
[ ">3.0", ">=2", false, "20% work", "r3" ],
|
|
71
|
-
[ "<=3.0", "-", "-", "20% work", "r4" ]
|
|
72
|
-
],
|
|
73
|
-
"hitPolicy": "R"
|
|
74
|
-
},
|
|
75
|
-
"tblPolicyOutputOrder": {
|
|
76
|
-
"comment": "The tblPolicyRuleOrder decision table employes the Output Order hit policy: If multiple rules are hit, return the collection of results in the priority order of the listed output values. This table accepts two input parameters: age and service, and returns the number of vacation days that an employee is eligle to receive. For example, a 59 year old employee with 31 years of service is entitled to 29 vacation days or 27 (rule 1) + 5 (rule 6) + 3 (rule 3). Notice that the vacation days are not listed in rule order but priority value as given by the order of the outputValues.",
|
|
77
|
-
"inputs": [ "age", "service" ],
|
|
78
|
-
"outputs": [ "holidays" ],
|
|
79
|
-
"outputValues": [ "27", "5", "3", "2" ],
|
|
80
|
-
"rules": [
|
|
81
|
-
[ "-", "-", "age - service" ],
|
|
82
|
-
[ ">=60", "-", 3 ],
|
|
83
|
-
[ "-", ">=30", 3 ],
|
|
84
|
-
[ "<18", "-", 5 ],
|
|
85
|
-
[ ">=60", "-", 5 ],
|
|
86
|
-
[ "-", ">=30", 5 ],
|
|
87
|
-
[ "[18..60]", "[15..30]", 2 ],
|
|
88
|
-
[ "[45..60]", "<30", 2 ]
|
|
89
|
-
],
|
|
90
|
-
"hitPolicy": "O"
|
|
91
|
-
},
|
|
92
|
-
"tblPolicyPriorityOrder": {
|
|
93
|
-
"comment": "The tblPolicyRuleOrder decision table employs the Priority Order hit policy: If multiple rules are triggered and multiple results collected, return only one result with the highest priority; the priorities are defined by the order of the output values. This table accepts two input parameters: age and medHistory (medical history), and returns a patient's medical risk rating. For example, a 61 year old employee with a bad medical history would receive a risk rating of medium. Note that two rules are triggered, the 2nd and third. The 2nd has a risk rating of high but the 3rd has a risk rating of medium. Medium is returned because it is given higher priority in the outputValues.",
|
|
94
|
-
"inputs": [ "age", "medHistory" ],
|
|
95
|
-
"outputs": [ "riskRating" ],
|
|
96
|
-
"refTypes": [ "", "", "" ],
|
|
97
|
-
"outputValues": [ "low", "medium", "high" ],
|
|
98
|
-
"rules": [
|
|
99
|
-
[ ">=25", "good", "medium" ],
|
|
100
|
-
[ ">60", "bad", "high" ],
|
|
101
|
-
[ "-", "bad", "medium" ],
|
|
102
|
-
[ "<25", "good", "low" ]
|
|
103
|
-
],
|
|
104
|
-
"hitPolicy": "P"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"formulas": {
|
|
108
|
-
"Any": {
|
|
109
|
-
"formula": "tblPolicyAny(,,'B', 12000, 75000)",
|
|
110
|
-
"finalValue": []
|
|
111
|
-
},
|
|
112
|
-
"Collect": {
|
|
113
|
-
"formula": "tblPolicyCollect(,,58, 31)",
|
|
114
|
-
"finalValue": []
|
|
115
|
-
},
|
|
116
|
-
"Unique": {
|
|
117
|
-
"formula": "tblPolicyUnique(,,54, 'good')",
|
|
118
|
-
"finalValue": []
|
|
119
|
-
},
|
|
120
|
-
"First": {
|
|
121
|
-
"formula": "tblPolicyFirst(,,'web', 'non_US', 'retailer')",
|
|
122
|
-
"finalValue": []
|
|
123
|
-
},
|
|
124
|
-
"Rule_Order": {
|
|
125
|
-
"formula": "tblPolicyRuleOrder('eligibility',,3.6, 4, TRUE)",
|
|
126
|
-
"finalValue": []
|
|
127
|
-
},
|
|
128
|
-
"Output_Order": {
|
|
129
|
-
"formula": "tblPolicyOutputOrder(,,58, 31)",
|
|
130
|
-
"finalValue": []
|
|
131
|
-
},
|
|
132
|
-
"Priority_Order": {
|
|
133
|
-
"formula": "tblPolicyPriorityOrder(,,61, 'bad')",
|
|
134
|
-
"finalValue": []
|
|
135
|
-
}
|
|
136
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modelName": "DTHitPolicyExample",
|
|
3
|
+
"modelDescription": "RASON Decision Table Hit Policy Example: This example illustrates the use of all 7 Hit Policies supported by RASON Decision Services: Unique, Any, Priority, First, Rule Order, Output Order, & Collect. See each table descriptions for more information.",
|
|
4
|
+
"modelType": "calculation",
|
|
5
|
+
"decisionTables": {
|
|
6
|
+
"comment": "There are 7 decision tables each illustrating a different hit policy.",
|
|
7
|
+
"tblPolicyAny": {
|
|
8
|
+
"comment": "The tblPolicyAny decision table showcases the Any hit policy: If rules overlap, but point to the sae result, that uniqe result is returned. This table takes three input parameters, creditRating, creditCardBalance and studentLoanBalance and returns a loanCompliance rating of 'compliant' or 'not compl'. For example, if a person with a B credit rating and a loan of 15,000 would trigger the 2nd and 3rd rules. However, since both rules return 'not compl', no error is reported.",
|
|
9
|
+
"inputs": [ "creditRating", "creditCardBalance", "studentLoanBalance" ],
|
|
10
|
+
"outputs": [ "loanCompliance" ],
|
|
11
|
+
"rules": [
|
|
12
|
+
[ "A", "<10000", "<50000", "compliant" ],
|
|
13
|
+
[ "Not(A)", "-", "-", "not compl" ],
|
|
14
|
+
[ "-", ">=10000", "-", "not compl" ],
|
|
15
|
+
[ "-", "-", ">=50000", "not compl" ]
|
|
16
|
+
],
|
|
17
|
+
"hitPolicy": "A"
|
|
18
|
+
},
|
|
19
|
+
"tblPolicyCollect": {
|
|
20
|
+
"comment": "The tblPolicyCollect decision table exhibits the C+ hit policy: If multiple rules are hit, return the collection of total of the results, in the rule order. This table accepts two input parameters of type number, age and service, and returns the number of vacation days that an employee is eligible to use. For example, a 58 year old employee with 31 years of service would qualify for 30 vacation days, or 22 (from rule 1) + 3 (from rule 3) + 5 (from rule 6).",
|
|
21
|
+
"inputs": [ "age", "service" ],
|
|
22
|
+
"outputs": [ "holidays" ],
|
|
23
|
+
"inputTypes": [ "number", "number" ],
|
|
24
|
+
"outputTypes": [ "number" ],
|
|
25
|
+
"rules": [
|
|
26
|
+
[ "-", "-", 22 ],
|
|
27
|
+
[ ">=60", "-", 3 ],
|
|
28
|
+
[ "-", ">=30", 3 ],
|
|
29
|
+
[ "<18", "-", 5 ],
|
|
30
|
+
[ ">=65", "-", 5 ],
|
|
31
|
+
[ "-", ">=30", 5 ],
|
|
32
|
+
[ "[18..60]", "[15..30]", 2 ],
|
|
33
|
+
[ "[45..60]", "<30", 2 ]
|
|
34
|
+
],
|
|
35
|
+
"hitPolicy": "C+"
|
|
36
|
+
},
|
|
37
|
+
"tblPolicyUnique": {
|
|
38
|
+
"comment": "The tblPolicyUnique decision table exhibits the Unique hit policy: A unique rule must be triggered evaluating to a unique result. If multiple rules are triggered, an error will be returned. This table accepts two input parameters, age and medHistory, and a patient's health risk rating and the rule that was triggered. For example, a 54 year old employee with good health rating would be labeled as medium health risk by triggering Rule 3.",
|
|
39
|
+
"inputs": [ "age", "medHistory" ],
|
|
40
|
+
"outputs": [ "riskRating", "rule" ],
|
|
41
|
+
"rules": [
|
|
42
|
+
[ ">60,<25", "good", "medium", "r1" ],
|
|
43
|
+
[ ">60", "bad", "high", "r2" ],
|
|
44
|
+
[ "[25..60]", "-", "medium", "r3" ],
|
|
45
|
+
[ "<25", "good", "low", "r4" ],
|
|
46
|
+
[ "<25", "bad", "medium", "r5" ]
|
|
47
|
+
],
|
|
48
|
+
"hitPolicy": "U"
|
|
49
|
+
},
|
|
50
|
+
"tblPolicyFirst": {
|
|
51
|
+
"comment": "The tblPolicyFirst decision table employes the First hit policy: Only 1 result is returned for this policy. Once a rule is evaluated successfully, or a rule is triggered, the search stops. This table accepts three input parameters: order, location and customer, and a discount percentage is returned. For example, a web order from Germany would result in a 0% discount, triggered by rule 3. Once a rule is triggered, the search is stopped even though Rule 4 would also apply.",
|
|
52
|
+
"inputs": [ "order", "location", "customer" ],
|
|
53
|
+
"outputs": [ "discount" ],
|
|
54
|
+
"rules": [
|
|
55
|
+
[ "web", "US", "wholesaler", 10 ],
|
|
56
|
+
[ "phone", "-", "-", 2 ],
|
|
57
|
+
[ "-", "non_US", "-", 0 ],
|
|
58
|
+
[ "-", "-", "retailer", 5 ]
|
|
59
|
+
],
|
|
60
|
+
"hitPolicy": "F"
|
|
61
|
+
},
|
|
62
|
+
"tblPolicyRuleOrder": {
|
|
63
|
+
"comment": "The tblPolicyRuleOrder decision table employes the Rule Order hit policy: If multiple rules are hit, return the collection of results as created in the rule order. This table accepts three input parameters: gpa, act_count and honor_member, and two outputs will be returned, eligibility and the rule number(s) triggered. For example, a child with a 3.6 GPA, an ACT_count = 4 and an honor student will return the result 20% scholar from r1 and 30% work from r2.",
|
|
64
|
+
"inputs": [ "gpa", "act_count", "honor_member" ],
|
|
65
|
+
"outputs": [ "eligibility", "rule" ],
|
|
66
|
+
"refTypes": [ "number", "number", "boolean", "text", "text" ],
|
|
67
|
+
"rules": [
|
|
68
|
+
[ ">3.5", ">=4", true, "20% scholar", "r1" ],
|
|
69
|
+
[ ">3.0", "-", true, "30% loan", "r2" ],
|
|
70
|
+
[ ">3.0", ">=2", false, "20% work", "r3" ],
|
|
71
|
+
[ "<=3.0", "-", "-", "20% work", "r4" ]
|
|
72
|
+
],
|
|
73
|
+
"hitPolicy": "R"
|
|
74
|
+
},
|
|
75
|
+
"tblPolicyOutputOrder": {
|
|
76
|
+
"comment": "The tblPolicyRuleOrder decision table employes the Output Order hit policy: If multiple rules are hit, return the collection of results in the priority order of the listed output values. This table accepts two input parameters: age and service, and returns the number of vacation days that an employee is eligle to receive. For example, a 59 year old employee with 31 years of service is entitled to 29 vacation days or 27 (rule 1) + 5 (rule 6) + 3 (rule 3). Notice that the vacation days are not listed in rule order but priority value as given by the order of the outputValues.",
|
|
77
|
+
"inputs": [ "age", "service" ],
|
|
78
|
+
"outputs": [ "holidays" ],
|
|
79
|
+
"outputValues": [ "27", "5", "3", "2" ],
|
|
80
|
+
"rules": [
|
|
81
|
+
[ "-", "-", "age - service" ],
|
|
82
|
+
[ ">=60", "-", 3 ],
|
|
83
|
+
[ "-", ">=30", 3 ],
|
|
84
|
+
[ "<18", "-", 5 ],
|
|
85
|
+
[ ">=60", "-", 5 ],
|
|
86
|
+
[ "-", ">=30", 5 ],
|
|
87
|
+
[ "[18..60]", "[15..30]", 2 ],
|
|
88
|
+
[ "[45..60]", "<30", 2 ]
|
|
89
|
+
],
|
|
90
|
+
"hitPolicy": "O"
|
|
91
|
+
},
|
|
92
|
+
"tblPolicyPriorityOrder": {
|
|
93
|
+
"comment": "The tblPolicyRuleOrder decision table employs the Priority Order hit policy: If multiple rules are triggered and multiple results collected, return only one result with the highest priority; the priorities are defined by the order of the output values. This table accepts two input parameters: age and medHistory (medical history), and returns a patient's medical risk rating. For example, a 61 year old employee with a bad medical history would receive a risk rating of medium. Note that two rules are triggered, the 2nd and third. The 2nd has a risk rating of high but the 3rd has a risk rating of medium. Medium is returned because it is given higher priority in the outputValues.",
|
|
94
|
+
"inputs": [ "age", "medHistory" ],
|
|
95
|
+
"outputs": [ "riskRating" ],
|
|
96
|
+
"refTypes": [ "", "", "" ],
|
|
97
|
+
"outputValues": [ "low", "medium", "high" ],
|
|
98
|
+
"rules": [
|
|
99
|
+
[ ">=25", "good", "medium" ],
|
|
100
|
+
[ ">60", "bad", "high" ],
|
|
101
|
+
[ "-", "bad", "medium" ],
|
|
102
|
+
[ "<25", "good", "low" ]
|
|
103
|
+
],
|
|
104
|
+
"hitPolicy": "P"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"formulas": {
|
|
108
|
+
"Any": {
|
|
109
|
+
"formula": "tblPolicyAny(,,'B', 12000, 75000)",
|
|
110
|
+
"finalValue": []
|
|
111
|
+
},
|
|
112
|
+
"Collect": {
|
|
113
|
+
"formula": "tblPolicyCollect(,,58, 31)",
|
|
114
|
+
"finalValue": []
|
|
115
|
+
},
|
|
116
|
+
"Unique": {
|
|
117
|
+
"formula": "tblPolicyUnique(,,54, 'good')",
|
|
118
|
+
"finalValue": []
|
|
119
|
+
},
|
|
120
|
+
"First": {
|
|
121
|
+
"formula": "tblPolicyFirst(,,'web', 'non_US', 'retailer')",
|
|
122
|
+
"finalValue": []
|
|
123
|
+
},
|
|
124
|
+
"Rule_Order": {
|
|
125
|
+
"formula": "tblPolicyRuleOrder('eligibility',,3.6, 4, TRUE)",
|
|
126
|
+
"finalValue": []
|
|
127
|
+
},
|
|
128
|
+
"Output_Order": {
|
|
129
|
+
"formula": "tblPolicyOutputOrder(,,58, 31)",
|
|
130
|
+
"finalValue": []
|
|
131
|
+
},
|
|
132
|
+
"Priority_Order": {
|
|
133
|
+
"formula": "tblPolicyPriorityOrder(,,61, 'bad')",
|
|
134
|
+
"finalValue": []
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
137
|
}
|