@frontlinesystems/rason-mcp-server 2026.5.1 → 2026.5.2

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.
Files changed (194) hide show
  1. package/LICENSE +35 -35
  2. package/examples/EXAMPLES_REFERENCE.md +128 -128
  3. package/examples/{optimization → Optimization}/Conic/AirlineHubConic.json +111 -111
  4. package/examples/{optimization → Optimization}/Conic/AirlineHubConic2.json +108 -108
  5. package/examples/{optimization → Optimization}/Conic/AirlineHubConic3.json +111 -111
  6. package/examples/{optimization → Optimization}/Conic/AirlineHubConic4.json +99 -99
  7. package/examples/{optimization → Optimization}/Conic/AirlineHubConic5.json +101 -101
  8. package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv.json +81 -81
  9. package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv4.json +96 -96
  10. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel.json +73 -73
  11. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel1.json +86 -86
  12. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel11.json +108 -108
  13. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel2.json +77 -77
  14. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab.json +89 -89
  15. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab1.json +73 -73
  16. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab2.json +77 -77
  17. package/examples/{optimization → Optimization}/Linear/Inventory.json +199 -199
  18. package/examples/{optimization → Optimization}/Linear/Matop.json +119 -119
  19. package/examples/{optimization → Optimization}/Linear/ProductMix.json +97 -97
  20. package/examples/{optimization → Optimization}/Linear/ProductMix2.json +72 -72
  21. package/examples/{optimization → Optimization}/Linear/ProductMix3.json +49 -49
  22. package/examples/{optimization → Optimization}/Linear/ProductMix4.json +56 -56
  23. package/examples/{optimization → Optimization}/Linear/ProductMixCsv1.json +106 -106
  24. package/examples/{optimization → Optimization}/Linear/ProductMixCsv2.json +106 -106
  25. package/examples/{optimization → Optimization}/Linear/ProductMixSQL11.json +82 -82
  26. package/examples/{optimization → Optimization}/Linear/Rowop.json +126 -126
  27. package/examples/{optimization → Optimization}/NonLinear/AirlineHub.json +63 -63
  28. package/examples/{optimization → Optimization}/NonLinear/AirlineHub2.json +47 -47
  29. package/examples/{optimization → Optimization}/NonLinear/AirlineHub3.json +47 -47
  30. package/examples/{optimization → Optimization}/NonSmooth/Inventory2.json +159 -159
  31. package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt.json +55 -55
  32. package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt2.json +65 -65
  33. package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyChance.json +78 -78
  34. package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyRecourse.json +78 -78
  35. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect.json +77 -77
  36. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect2.json +81 -81
  37. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect3.json +84 -84
  38. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect4.json +74 -74
  39. package/examples/{simulation → Simulation}/CandyStoreSalesUsingSIP.json +147 -147
  40. package/examples/{simulation → Simulation}/CollegeFundGrowth1.json +423 -423
  41. package/examples/{simulation → Simulation}/CollegeFundGrowth1SIPModel.json +27 -27
  42. package/examples/{simulation → Simulation}/CollegeFundGrowth2.json +415 -415
  43. package/examples/{simulation → Simulation}/CollegeFundGrowthSIP.json +401 -401
  44. package/examples/{simulation → Simulation}/GBMSimulationModel.json +236 -236
  45. package/examples/{simulation → Simulation}/YieldManagement(Sim).json +69 -69
  46. package/examples/{simulation → Simulation}/YieldManagement2(Sim).json +72 -72
  47. package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +53 -53
  48. package/examples/calculation/DMNExamples/DMN Context example.json +69 -69
  49. package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -43
  50. package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -28
  51. package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -66
  52. package/examples/calculation/DMNExamples/FEEL For with two indices.json +15 -15
  53. package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -88
  54. package/examples/calculation/DMNExamples/FEEL If Then Else example.json +25 -25
  55. package/examples/calculation/DMNExamples/FEEL List example.json +37 -37
  56. package/examples/calculation/DMNExamples/FEEL List operator.json +17 -17
  57. package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +36 -36
  58. package/examples/calculation/DMNExamples/FEEL Some or Every example.json +65 -65
  59. package/examples/calculation/DecisionTables/DT Datasource example.json +52 -52
  60. package/examples/calculation/DecisionTables/DT Date and Time examples.json +91 -91
  61. package/examples/calculation/DecisionTables/DT Expression example.json +32 -32
  62. package/examples/calculation/DecisionTables/DT Hit Policy examples.json +136 -136
  63. package/examples/calculation/DecisionTables/DT Loan Recommend model.json +81 -81
  64. package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +218 -218
  65. package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -286
  66. package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +203 -203
  67. package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -214
  68. package/examples/calculation/DecisionTables/DT Output Order example.json +39 -39
  69. package/examples/calculation/DecisionTables/DT Unique example.json +38 -38
  70. package/examples/calculation/TypeDefinitions/TypeDefCF.json +64 -64
  71. package/examples/calculation/TypeDefinitions/TypeDefDT.json +57 -57
  72. package/examples/datamining/AffinityAnalysis/AssociationRules.json +51 -51
  73. package/examples/datamining/Classification/DecisionTree.json +90 -90
  74. package/examples/datamining/Classification/DiscriminantAnalysis.json +81 -81
  75. package/examples/datamining/Classification/Ensembles/Bagging.json +66 -66
  76. package/examples/datamining/Classification/Ensembles/Boosting.json +67 -67
  77. package/examples/datamining/Classification/Ensembles/RandomTrees.json +91 -91
  78. package/examples/datamining/Classification/FindBestModel.json +86 -86
  79. package/examples/datamining/Classification/LogisticRegression.json +82 -82
  80. package/examples/datamining/Classification/NaiveBayes.json +78 -78
  81. package/examples/datamining/Classification/NearestNeighbors.json +84 -84
  82. package/examples/datamining/Classification/NeuralNetwork.json +92 -92
  83. package/examples/datamining/Clustering/Hierarchical.json +54 -54
  84. package/examples/datamining/Clustering/KMeans.json +71 -71
  85. package/examples/datamining/DataSources/DelimitedFile.json +49 -49
  86. package/examples/datamining/DataSources/JSONFile.json +49 -49
  87. package/examples/datamining/DataSources/MSAccessDatabase.json +49 -49
  88. package/examples/datamining/DataSources/MSExcelTable.json +50 -50
  89. package/examples/datamining/DataSources/MSSQLDatabase.json +49 -49
  90. package/examples/datamining/DataSources/ODATATable.json +49 -49
  91. package/examples/datamining/DataSources/ODBCDatabase.json +49 -49
  92. package/examples/datamining/FeatureSelection/LinearWrapping.json +53 -53
  93. package/examples/datamining/FeatureSelection/LogisticWrapping.json +56 -56
  94. package/examples/datamining/FeatureSelection/Univariate.json +78 -78
  95. package/examples/datamining/Regression/DecisionTree.json +82 -82
  96. package/examples/datamining/Regression/Ensembles/Bagging.json +62 -62
  97. package/examples/datamining/Regression/Ensembles/Boosting.json +62 -62
  98. package/examples/datamining/Regression/Ensembles/RandomTrees.json +78 -78
  99. package/examples/datamining/Regression/FindBestModel.json +86 -86
  100. package/examples/datamining/Regression/LinearRegression.json +124 -124
  101. package/examples/datamining/Regression/NearestNeighbors.json +77 -77
  102. package/examples/datamining/Regression/NeuralNetwork.json +82 -82
  103. package/examples/datamining/Scoring/JSONClassifier.json +62 -62
  104. package/examples/datamining/Scoring/JSONClassifierNN.json +62 -62
  105. package/examples/datamining/Scoring/JSONClusterizer.json +37 -37
  106. package/examples/datamining/Scoring/JSONForecaster.json +49 -49
  107. package/examples/datamining/Scoring/JSONLinearRegression.json +56 -56
  108. package/examples/datamining/Scoring/JSONPCA.json +41 -41
  109. package/examples/datamining/Scoring/JSONRegressor.json +56 -56
  110. package/examples/datamining/Scoring/JSONTransformer.json +38 -38
  111. package/examples/datamining/Scoring/PMMLClassifier.json +42 -42
  112. package/examples/datamining/Scoring/PMMLForecaster.json +43 -43
  113. package/examples/datamining/Scoring/PMMLRegressor.json +38 -38
  114. package/examples/datamining/Scoring/PMMLTransformer.json +38 -38
  115. package/examples/datamining/Simulation/LinearRegressionSimulation.json +117 -117
  116. package/examples/datamining/Simulation/SyntheticDataGeneration.json +108 -108
  117. package/examples/datamining/Simulation/pmml-risk-scoring.json +62 -62
  118. package/examples/datamining/Summarizer/Summarization.json +54 -54
  119. package/examples/datamining/TextMining/LatentSemanticAnalysis.json +51 -51
  120. package/examples/datamining/TextMining/TfIdf-FileData.json +65 -65
  121. package/examples/datamining/TextMining/TfIdf-InlineData.json +55 -55
  122. package/examples/datamining/TimeSeries/AddHoltWinters.json +79 -79
  123. package/examples/datamining/TimeSeries/Arima.json +74 -74
  124. package/examples/datamining/TimeSeries/DoubleExponential.json +65 -65
  125. package/examples/datamining/TimeSeries/Exponential.json +64 -64
  126. package/examples/datamining/TimeSeries/LagAnalysis.json +48 -48
  127. package/examples/datamining/TimeSeries/MovingAverage.json +65 -65
  128. package/examples/datamining/TimeSeries/MulHoltWinters.json +65 -65
  129. package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +65 -65
  130. package/examples/datamining/Transformation/Binning.json +69 -69
  131. package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +47 -47
  132. package/examples/datamining/Transformation/CategoryReduction.json +51 -51
  133. package/examples/datamining/Transformation/Factorization.json +50 -50
  134. package/examples/datamining/Transformation/MissingDataHandling.json +83 -83
  135. package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +54 -54
  136. package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +48 -48
  137. package/examples/datamining/Transformation/PartitionTimeSeries.json +48 -48
  138. package/examples/datamining/Transformation/Partitioning-DF.json +72 -72
  139. package/examples/datamining/Transformation/Partitioning.json +46 -46
  140. package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +65 -65
  141. package/examples/datamining/Transformation/PartitioningWithOversampling.json +44 -44
  142. package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +52 -52
  143. package/examples/datamining/Transformation/Rescaling.json +67 -67
  144. package/examples/datamining/Transformation/Sampling.json +43 -43
  145. package/examples/datamining/Transformation/StratifiedSampling.json +46 -46
  146. package/examples/flow/SQLServerTransform.json +260 -260
  147. package/examples/flow/dm-calc-pipeline.json +277 -277
  148. package/examples/flow/dm-pipeline-simulation.json +113 -113
  149. package/examples/flow/opt-sim-pipeline.json +159 -159
  150. package/examples/flow/sim-dm-pipeline.json +106 -106
  151. package/examples/flow/sim-sim-pipeline.json +136 -136
  152. package/examples/index.json +4678 -4678
  153. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +52 -52
  154. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +57 -57
  155. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +35 -35
  156. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +33 -33
  157. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +25 -25
  158. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +47 -47
  159. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +69 -69
  160. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +49 -49
  161. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +337 -337
  162. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +61 -61
  163. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +190 -190
  164. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +75 -75
  165. package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +108 -108
  166. package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +68 -68
  167. package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -183
  168. package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -79
  169. package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +154 -154
  170. package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +118 -118
  171. package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +142 -142
  172. package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +81 -81
  173. package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -69
  174. package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +113 -113
  175. package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +107 -107
  176. package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -117
  177. package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -108
  178. package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -67
  179. package/examples/rason-features/UserGuide/UGForecast.json +50 -50
  180. package/examples/rason-features/UserGuide/UGProductMix1.json +48 -48
  181. package/examples/rason-features/UserGuide/UGProductMix2.json +48 -48
  182. package/examples/rason-features/UserGuide/UGProductMixTab1.json +67 -67
  183. package/examples/rason-features/UserGuide/UGProductMixTab2.json +76 -76
  184. package/examples/rason-features/UserGuide/UGProductMixTab3.json +66 -66
  185. package/examples/rason-features/UserGuide/UGProductMixTab4.json +70 -70
  186. package/examples/rason-features/UserGuide/UGProductMixTab5.json +67 -67
  187. package/examples/rason-features/UserGuide/UGProjectSelect0.json +91 -91
  188. package/examples/rason-features/UserGuide/UGProjectSelect1.json +74 -74
  189. package/examples/rason-features/UserGuide/UGProjectSelect2.json +74 -74
  190. package/examples/rason-features/UserGuide/UGYieldManagement1.json +61 -61
  191. package/examples/rason-features/UserGuide/UGYieldManagement2.json +61 -61
  192. package/examples/rason-features/UserGuide/UGYieldManagement3.json +63 -63
  193. package/out/index.cjs +1 -1
  194. package/package.json +3 -2
@@ -1,66 +1,66 @@
1
- {
2
- "modelName": "FEEL_Some_or_Every_example",
3
- "comment": "Example of 'Some/Every' iteration in FEEL",
4
- "modelType": "calculation",
5
- "typeDefs": {
6
- "tLoan": {
7
- "components": {
8
- "principal": {
9
- "type": "number",
10
- "allowedValues": [ ">0" ]
11
- },
12
- "rate": {
13
- "type": "number",
14
- "allowedValues": [ "[0..1]" ]
15
- },
16
- "termMonths": {
17
- "type": "number",
18
- "allowedValues": [ ">0" ]
19
- }
20
- },
21
- "language": "Feel"
22
- },
23
- "tLoanList": {
24
- "language": "Feel",
25
- "typeRef": "tLoan",
26
- "isCollection": true
27
- }
28
- },
29
- "boxFunctions": {
30
- "funPMT": {
31
- "inputs": [ "loan" ],
32
- "inputTypes": [ "tLoan" ],
33
- "language": "Feel",
34
- "resultType": "number",
35
- "body": {
36
- "payment": {
37
- "formula": "(loan.principal*loan.rate/12) / (1 - (1 + loan.rate/12)**-loan.termMonths)"
38
- },
39
- "fee": {
40
- "formula": "0.01 * payment"
41
- }
42
- },
43
- "result": "payment + fee"
44
- }
45
- },
46
- "data": {
47
- "loans": {
48
- "type": "tLoanList",
49
- "value": [
50
- [ 600000, 0.0375, 360 ],
51
- [ 100000, 0.0375, 360 ]
52
- ],
53
- "binding": "get"
54
- }
55
- },
56
- "formulas": {
57
- "MonthlyPayment": {
58
- "feelFormula": "for i in loans return funPMT(i)",
59
- "finalValue": []
60
- },
61
- "LoanAcceptable": {
62
- "feelFormula": "if (every i in MonthlyPayment satisfies i < 2000) then 'accept' else 'reject'",
63
- "finalValue": []
64
- }
65
- }
1
+ {
2
+ "modelName": "FEEL_Some_or_Every_example",
3
+ "comment": "Example of 'Some/Every' iteration in FEEL",
4
+ "modelType": "calculation",
5
+ "typeDefs": {
6
+ "tLoan": {
7
+ "components": {
8
+ "principal": {
9
+ "type": "number",
10
+ "allowedValues": [ ">0" ]
11
+ },
12
+ "rate": {
13
+ "type": "number",
14
+ "allowedValues": [ "[0..1]" ]
15
+ },
16
+ "termMonths": {
17
+ "type": "number",
18
+ "allowedValues": [ ">0" ]
19
+ }
20
+ },
21
+ "language": "Feel"
22
+ },
23
+ "tLoanList": {
24
+ "language": "Feel",
25
+ "typeRef": "tLoan",
26
+ "isCollection": true
27
+ }
28
+ },
29
+ "boxFunctions": {
30
+ "funPMT": {
31
+ "inputs": [ "loan" ],
32
+ "inputTypes": [ "tLoan" ],
33
+ "language": "Feel",
34
+ "resultType": "number",
35
+ "body": {
36
+ "payment": {
37
+ "formula": "(loan.principal*loan.rate/12) / (1 - (1 + loan.rate/12)**-loan.termMonths)"
38
+ },
39
+ "fee": {
40
+ "formula": "0.01 * payment"
41
+ }
42
+ },
43
+ "result": "payment + fee"
44
+ }
45
+ },
46
+ "data": {
47
+ "loans": {
48
+ "type": "tLoanList",
49
+ "value": [
50
+ [ 600000, 0.0375, 360 ],
51
+ [ 100000, 0.0375, 360 ]
52
+ ],
53
+ "binding": "get"
54
+ }
55
+ },
56
+ "formulas": {
57
+ "MonthlyPayment": {
58
+ "feelFormula": "for i in loans return funPMT(i)",
59
+ "finalValue": []
60
+ },
61
+ "LoanAcceptable": {
62
+ "feelFormula": "if (every i in MonthlyPayment satisfies i < 2000) then 'accept' else 'reject'",
63
+ "finalValue": []
64
+ }
65
+ }
66
66
  }
@@ -1,53 +1,53 @@
1
- {
2
- "modelName": "DTDatasourceExample",
3
- "comment": "Decision table inputs from a datasource: This RASON decision table example illustrates how to provide an outside data source. 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 performed once a rule, or condition, is met. In this example, the customer data is supplied in the DT Customers.txt CSV file. The decisiont table in this example generates a medical rating for a patient based on the age of the patient and his/her medical history.",
4
- "modelType": "calculation",
5
- "datasources": {
6
- "comment": "Specify outside data sources within the 'datasources' section of a RASON model.",
7
- "cust_data": {
8
- "comment": "The CSV file, DT Customers.txt contains the input parameters for the decision table, PolicyUnique.",
9
- "type": "csv",
10
- "connection": "DT Customers.txt",
11
- "selection": "",
12
- "indexCols": [ "custID" ],
13
- "valueCols": [ "custAge", "medHistory" ],
14
- "direction": "import"
15
- }
16
- },
17
- "data": {
18
- "comment": "The input parameters, custAge and medHistory, are bound to the age and med variables within the data section.",
19
- "age": {
20
- "comment": "The input parameter custAge from the DT Customers.txt CSV file is bound to the age variable.",
21
- "binding": "cust_data",
22
- "valueCol": "custAge"
23
- },
24
- "med": {
25
- "comment": "The input parameter medHistory from the DT Customers.txt CSV file is bound to the med variable.",
26
- "binding": "cust_data",
27
- "valueCol": "medHistory"
28
- }
29
- },
30
- "decisionTables": {
31
- "comment": "Decision tables are created within the decisionTable section in a RASON model. In this example, there is 1 decision table, the PolicyUnique decision table.",
32
- "PolicyUnique": {
33
- "comment": "In this decision table, the input and output parameters are passed using the 'inputs' and 'outputs' properties, respectively. It's possible to provide types for the inputs and outputs, see the DTDateTimeExample. The decision table rules appear under 'rules'. The hit policy must be specified using 'hitPolicy'.",
34
- "inputs": [ "age", "medHistory" ],
35
- "outputs": [ "riskRating", "rule" ],
36
- "rules": [
37
- [ ">60,<25", "good", "medium", "r1" ],
38
- [ ">60", "bad", "high", "r2" ],
39
- [ "[25..60]", "-", "medium", "r3" ],
40
- [ "<25", "good", "low", "r4" ],
41
- [ "<25", "bad", "medium", "r5" ]
42
- ],
43
- "hitPolicy": "U"
44
- }
45
- },
46
- "formulas": {
47
- "comment": "The decision table is called and calculated within the formulas section. The res function calls the PolicyUnique decision table with two inputs, age, and med. Both input parameters are supplied through the DT Customers.txt CSV file. The result of the decision table will be returned in the result. ",
48
- "res": {
49
- "formula": "PolicyUnique(,,age[1], med[1])",
50
- "finalValue": []
51
- }
52
- }
1
+ {
2
+ "modelName": "DTDatasourceExample",
3
+ "comment": "Decision table inputs from a datasource: This RASON decision table example illustrates how to provide an outside data source. 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 performed once a rule, or condition, is met. In this example, the customer data is supplied in the DT Customers.txt CSV file. The decisiont table in this example generates a medical rating for a patient based on the age of the patient and his/her medical history.",
4
+ "modelType": "calculation",
5
+ "datasources": {
6
+ "comment": "Specify outside data sources within the 'datasources' section of a RASON model.",
7
+ "cust_data": {
8
+ "comment": "The CSV file, DT Customers.txt contains the input parameters for the decision table, PolicyUnique.",
9
+ "type": "csv",
10
+ "connection": "DT Customers.txt",
11
+ "selection": "",
12
+ "indexCols": [ "custID" ],
13
+ "valueCols": [ "custAge", "medHistory" ],
14
+ "direction": "import"
15
+ }
16
+ },
17
+ "data": {
18
+ "comment": "The input parameters, custAge and medHistory, are bound to the age and med variables within the data section.",
19
+ "age": {
20
+ "comment": "The input parameter custAge from the DT Customers.txt CSV file is bound to the age variable.",
21
+ "binding": "cust_data",
22
+ "valueCol": "custAge"
23
+ },
24
+ "med": {
25
+ "comment": "The input parameter medHistory from the DT Customers.txt CSV file is bound to the med variable.",
26
+ "binding": "cust_data",
27
+ "valueCol": "medHistory"
28
+ }
29
+ },
30
+ "decisionTables": {
31
+ "comment": "Decision tables are created within the decisionTable section in a RASON model. In this example, there is 1 decision table, the PolicyUnique decision table.",
32
+ "PolicyUnique": {
33
+ "comment": "In this decision table, the input and output parameters are passed using the 'inputs' and 'outputs' properties, respectively. It's possible to provide types for the inputs and outputs, see the DTDateTimeExample. The decision table rules appear under 'rules'. The hit policy must be specified using 'hitPolicy'.",
34
+ "inputs": [ "age", "medHistory" ],
35
+ "outputs": [ "riskRating", "rule" ],
36
+ "rules": [
37
+ [ ">60,<25", "good", "medium", "r1" ],
38
+ [ ">60", "bad", "high", "r2" ],
39
+ [ "[25..60]", "-", "medium", "r3" ],
40
+ [ "<25", "good", "low", "r4" ],
41
+ [ "<25", "bad", "medium", "r5" ]
42
+ ],
43
+ "hitPolicy": "U"
44
+ }
45
+ },
46
+ "formulas": {
47
+ "comment": "The decision table is called and calculated within the formulas section. The res function calls the PolicyUnique decision table with two inputs, age, and med. Both input parameters are supplied through the DT Customers.txt CSV file. The result of the decision table will be returned in the result. ",
48
+ "res": {
49
+ "formula": "PolicyUnique(,,age[1], med[1])",
50
+ "finalValue": []
51
+ }
52
+ }
53
53
  }
@@ -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
+ }