@frontlinesystems/rason-mcp-server 2026.5.0
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 -0
- package/README.md +282 -0
- package/examples/EXAMPLES_REFERENCE.md +128 -0
- package/examples/Optimization/Conic/AirlineHubConic.json +112 -0
- package/examples/Optimization/Conic/AirlineHubConic2.json +109 -0
- package/examples/Optimization/Conic/AirlineHubConic3.json +112 -0
- package/examples/Optimization/Conic/AirlineHubConic4.json +100 -0
- package/examples/Optimization/Conic/AirlineHubConic5.json +102 -0
- package/examples/Optimization/DataBinding/ProductMixCsv.json +82 -0
- package/examples/Optimization/DataBinding/ProductMixCsv4.json +96 -0
- package/examples/Optimization/DataBinding/ProductMixExcel.json +74 -0
- package/examples/Optimization/DataBinding/ProductMixExcel1.json +87 -0
- package/examples/Optimization/DataBinding/ProductMixExcel11.json +109 -0
- package/examples/Optimization/DataBinding/ProductMixExcel2.json +78 -0
- package/examples/Optimization/DataBinding/ProductMixTab.json +90 -0
- package/examples/Optimization/DataBinding/ProductMixTab1.json +74 -0
- package/examples/Optimization/DataBinding/ProductMixTab2.json +78 -0
- package/examples/Optimization/Linear/Inventory.json +200 -0
- package/examples/Optimization/Linear/Matop.json +120 -0
- package/examples/Optimization/Linear/ProductMix.json +98 -0
- package/examples/Optimization/Linear/ProductMix2.json +73 -0
- package/examples/Optimization/Linear/ProductMix3.json +50 -0
- package/examples/Optimization/Linear/ProductMix4.json +57 -0
- package/examples/Optimization/Linear/ProductMixCsv1.json +106 -0
- package/examples/Optimization/Linear/ProductMixCsv2.json +106 -0
- package/examples/Optimization/Linear/ProductMixSQL11.json +82 -0
- package/examples/Optimization/Linear/Rowop.json +127 -0
- package/examples/Optimization/NonLinear/AirlineHub.json +64 -0
- package/examples/Optimization/NonLinear/AirlineHub2.json +48 -0
- package/examples/Optimization/NonLinear/AirlineHub3.json +48 -0
- package/examples/Optimization/NonSmooth/Inventory2.json +160 -0
- package/examples/Optimization/Quadratic/PortfolioOpt.json +56 -0
- package/examples/Optimization/Quadratic/PortfolioOpt2.json +66 -0
- package/examples/Optimization/WithUncertainty/GasCompanyChance.json +79 -0
- package/examples/Optimization/WithUncertainty/GasCompanyRecourse.json +79 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect.json +78 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect2.json +82 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect3.json +85 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect4.json +75 -0
- package/examples/Simulation/CandyStoreSalesUsingSIP.json +148 -0
- package/examples/Simulation/CollegeFundGrowth1.json +424 -0
- package/examples/Simulation/CollegeFundGrowth1SIPModel.json +28 -0
- package/examples/Simulation/CollegeFundGrowth2.json +416 -0
- package/examples/Simulation/CollegeFundGrowthSIP.json +402 -0
- package/examples/Simulation/GBMSimulationModel.json +237 -0
- package/examples/Simulation/YieldManagement(Sim).json +70 -0
- package/examples/Simulation/YieldManagement2(Sim).json +73 -0
- package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +54 -0
- package/examples/calculation/DMNExamples/DMN Context example.json +69 -0
- package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -0
- package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -0
- package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -0
- package/examples/calculation/DMNExamples/FEEL For with two indices.json +16 -0
- package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -0
- package/examples/calculation/DMNExamples/FEEL If Then Else example.json +26 -0
- package/examples/calculation/DMNExamples/FEEL List example.json +38 -0
- package/examples/calculation/DMNExamples/FEEL List operator.json +17 -0
- package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +37 -0
- package/examples/calculation/DMNExamples/FEEL Some or Every example.json +66 -0
- package/examples/calculation/DecisionTables/DT Datasource example.json +53 -0
- package/examples/calculation/DecisionTables/DT Date and Time examples.json +92 -0
- package/examples/calculation/DecisionTables/DT Expression example.json +32 -0
- package/examples/calculation/DecisionTables/DT Hit Policy examples.json +137 -0
- package/examples/calculation/DecisionTables/DT Loan Recommend model.json +82 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +219 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +204 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -0
- package/examples/calculation/DecisionTables/DT Output Order example.json +40 -0
- package/examples/calculation/DecisionTables/DT Unique example.json +39 -0
- package/examples/calculation/TypeDefinitions/TypeDefCF.json +65 -0
- package/examples/calculation/TypeDefinitions/TypeDefDT.json +58 -0
- package/examples/datamining/AffinityAnalysis/AssociationRules.json +52 -0
- package/examples/datamining/Classification/DecisionTree.json +91 -0
- package/examples/datamining/Classification/DiscriminantAnalysis.json +82 -0
- package/examples/datamining/Classification/Ensembles/Bagging.json +67 -0
- package/examples/datamining/Classification/Ensembles/Boosting.json +68 -0
- package/examples/datamining/Classification/Ensembles/RandomTrees.json +92 -0
- package/examples/datamining/Classification/FindBestModel.json +87 -0
- package/examples/datamining/Classification/LogisticRegression.json +83 -0
- package/examples/datamining/Classification/NaiveBayes.json +79 -0
- package/examples/datamining/Classification/NearestNeighbors.json +85 -0
- package/examples/datamining/Classification/NeuralNetwork.json +93 -0
- package/examples/datamining/Clustering/Hierarchical.json +55 -0
- package/examples/datamining/Clustering/KMeans.json +72 -0
- package/examples/datamining/DataSources/DelimitedFile.json +50 -0
- package/examples/datamining/DataSources/JSONFile.json +50 -0
- package/examples/datamining/DataSources/MSAccessDatabase.json +50 -0
- package/examples/datamining/DataSources/MSExcelTable.json +51 -0
- package/examples/datamining/DataSources/MSSQLDatabase.json +50 -0
- package/examples/datamining/DataSources/ODATATable.json +50 -0
- package/examples/datamining/DataSources/ODBCDatabase.json +50 -0
- package/examples/datamining/FeatureSelection/LinearWrapping.json +54 -0
- package/examples/datamining/FeatureSelection/LogisticWrapping.json +57 -0
- package/examples/datamining/FeatureSelection/Univariate.json +79 -0
- package/examples/datamining/Regression/DecisionTree.json +82 -0
- package/examples/datamining/Regression/Ensembles/Bagging.json +63 -0
- package/examples/datamining/Regression/Ensembles/Boosting.json +63 -0
- package/examples/datamining/Regression/Ensembles/RandomTrees.json +79 -0
- package/examples/datamining/Regression/FindBestModel.json +87 -0
- package/examples/datamining/Regression/LinearRegression.json +125 -0
- package/examples/datamining/Regression/NearestNeighbors.json +78 -0
- package/examples/datamining/Regression/NeuralNetwork.json +83 -0
- package/examples/datamining/Scoring/JSONClassifier.json +63 -0
- package/examples/datamining/Scoring/JSONClassifierNN.json +63 -0
- package/examples/datamining/Scoring/JSONClusterizer.json +38 -0
- package/examples/datamining/Scoring/JSONForecaster.json +50 -0
- package/examples/datamining/Scoring/JSONLinearRegression.json +57 -0
- package/examples/datamining/Scoring/JSONPCA.json +42 -0
- package/examples/datamining/Scoring/JSONRegressor.json +57 -0
- package/examples/datamining/Scoring/JSONTransformer.json +39 -0
- package/examples/datamining/Scoring/PMMLClassifier.json +43 -0
- package/examples/datamining/Scoring/PMMLForecaster.json +44 -0
- package/examples/datamining/Scoring/PMMLRegressor.json +39 -0
- package/examples/datamining/Scoring/PMMLTransformer.json +39 -0
- package/examples/datamining/Simulation/LinearRegressionSimulation.json +118 -0
- package/examples/datamining/Simulation/SyntheticDataGeneration.json +109 -0
- package/examples/datamining/Simulation/pmml-risk-scoring.json +63 -0
- package/examples/datamining/Summarizer/Summarization.json +55 -0
- package/examples/datamining/TextMining/LatentSemanticAnalysis.json +52 -0
- package/examples/datamining/TextMining/TfIdf-FileData.json +66 -0
- package/examples/datamining/TextMining/TfIdf-InlineData.json +56 -0
- package/examples/datamining/TimeSeries/AddHoltWinters.json +80 -0
- package/examples/datamining/TimeSeries/Arima.json +75 -0
- package/examples/datamining/TimeSeries/DoubleExponential.json +66 -0
- package/examples/datamining/TimeSeries/Exponential.json +65 -0
- package/examples/datamining/TimeSeries/LagAnalysis.json +49 -0
- package/examples/datamining/TimeSeries/MovingAverage.json +66 -0
- package/examples/datamining/TimeSeries/MulHoltWinters.json +66 -0
- package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +66 -0
- package/examples/datamining/Transformation/Binning.json +70 -0
- package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +48 -0
- package/examples/datamining/Transformation/CategoryReduction.json +52 -0
- package/examples/datamining/Transformation/Factorization.json +51 -0
- package/examples/datamining/Transformation/MissingDataHandling.json +84 -0
- package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +55 -0
- package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +49 -0
- package/examples/datamining/Transformation/PartitionTimeSeries.json +49 -0
- package/examples/datamining/Transformation/Partitioning-DF.json +73 -0
- package/examples/datamining/Transformation/Partitioning.json +47 -0
- package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +66 -0
- package/examples/datamining/Transformation/PartitioningWithOversampling.json +45 -0
- package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +53 -0
- package/examples/datamining/Transformation/Rescaling.json +68 -0
- package/examples/datamining/Transformation/Sampling.json +44 -0
- package/examples/datamining/Transformation/StratifiedSampling.json +47 -0
- package/examples/flow/SQLServerTransform.json +261 -0
- package/examples/flow/dm-calc-pipeline.json +278 -0
- package/examples/flow/dm-pipeline-simulation.json +114 -0
- package/examples/flow/opt-sim-pipeline.json +160 -0
- package/examples/flow/sim-dm-pipeline.json +107 -0
- package/examples/flow/sim-sim-pipeline.json +137 -0
- package/examples/index.json +4679 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +53 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +58 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +36 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +34 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +26 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +48 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +70 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +50 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +338 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +62 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +191 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +76 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +109 -0
- package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +69 -0
- package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -0
- package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -0
- package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +155 -0
- package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +119 -0
- package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +143 -0
- package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +82 -0
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -0
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +114 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +108 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -0
- package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -0
- package/examples/rason-features/UserGuide/UGForecast.json +51 -0
- package/examples/rason-features/UserGuide/UGProductMix1.json +49 -0
- package/examples/rason-features/UserGuide/UGProductMix2.json +49 -0
- package/examples/rason-features/UserGuide/UGProductMixTab1.json +68 -0
- package/examples/rason-features/UserGuide/UGProductMixTab2.json +77 -0
- package/examples/rason-features/UserGuide/UGProductMixTab3.json +67 -0
- package/examples/rason-features/UserGuide/UGProductMixTab4.json +71 -0
- package/examples/rason-features/UserGuide/UGProductMixTab5.json +68 -0
- package/examples/rason-features/UserGuide/UGProjectSelect0.json +92 -0
- package/examples/rason-features/UserGuide/UGProjectSelect1.json +75 -0
- package/examples/rason-features/UserGuide/UGProjectSelect2.json +75 -0
- package/examples/rason-features/UserGuide/UGYieldManagement1.json +62 -0
- package/examples/rason-features/UserGuide/UGYieldManagement2.json +62 -0
- package/examples/rason-features/UserGuide/UGYieldManagement3.json +64 -0
- package/out/index.cjs +361 -0
- package/package.json +76 -0
|
@@ -0,0 +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
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "DTLoanRecommendExample",
|
|
3
|
+
"modelDescription": "RASON Decision Table Example: The decision table tblLoanTypes, returns a loan that meets the criteria passed in the loanTypes formula (within the formula section). A data table, bankRates, has been entered into the data section. This table lists various banks offering the types of loans listed in the rules section of the tblLoanTypes decision table. For example, AimLoan bank offers a conventional ARM 3/1 loan with a term of 360 months, APR of 3.103, requiring a 20% down payment. The loanTypes formula returns the loans meeting the criteria passed. The formula 'recom' (in the formula section), joins the results for 'loanTypes' with the data table, bankRates. The result for loanTypes is a table containing two loans an ARM 3/1 loan and a Fixed 40 loan. The PsiJoin function matches these two loans with the loans from the bankRates table to return several ARM 3/1 loans from various banks. (Since no bank offers the Fixed 40 loan, no results are returned for this loan.) For a complete walkthrough of this example, see the Decision Table chapter within Analytic Solver User Guide.",
|
|
4
|
+
"modelType": "calculation",
|
|
5
|
+
"decisionTables": {
|
|
6
|
+
"comment": "This decision table accepts 4 input parameters: reqObj, reqType, conforming and reqDown. In return, the table returns 3 outputs: loanType, conftype and downPct. The property 'inputTypes' and 'outputTypes' properties specify the types for each input and output parameter. There is only 1 option for the first input, reqObj, 'payment'. If anything other than payment is entered for the first input parameter, an error will be returned. The 2nd input type, reqType, can be anything. The 3rd input type, conforming, must be either 0 or 1, a boolean value. The 4th input parameter reqDown, must be a number, but there are no limitations on the value. The 1st output value can be anything. The 2nd output value must be either 'conventional' or 'jumbo'. The 3rd output value must be a number but no limitation has been placed on the value. The rules section contains a list of loans available in the financial sector. The Hit Policy is Collect + which means that all results from all triggered rules will be returned.",
|
|
7
|
+
"tblLoanTypes": {
|
|
8
|
+
"inputs": [ "reqObj", "reqType", "conforming", "reqDown" ],
|
|
9
|
+
"outputs": [ "loanType", "confType", "downPct" ],
|
|
10
|
+
"inputTypes": [ "", "", "boolean", "number" ],
|
|
11
|
+
"outputTypes": [ "", "", "number" ],
|
|
12
|
+
"inputValues": [
|
|
13
|
+
[ "payment", "", "", "" ]
|
|
14
|
+
],
|
|
15
|
+
"outputValues": [
|
|
16
|
+
[ "", "conventional", "" ],
|
|
17
|
+
[ "", "jumbo", "" ]
|
|
18
|
+
],
|
|
19
|
+
"rules": [
|
|
20
|
+
[ "payment", "Fixed 30, Fixed 20", "-", "<20.0", "'ARM 3/1'", "conventional", 20 ],
|
|
21
|
+
[ "payment", "Fixed 30, Fixed 20", false, ">=20", "'ARM 3/1'", "jumbo", "reqDown" ],
|
|
22
|
+
[ "payment", "Fixed 30, Fixed 20", true, ">=20", "'ARM 3/1'", "conventional", "reqDown" ],
|
|
23
|
+
[ "payment", "Fixed 15", "-", "<20", "Fixed 20", "conventional", 20 ],
|
|
24
|
+
[ "payment", "Fixed 15", false, ">=20", "Fixed 20", "jumbo", "reqDown" ],
|
|
25
|
+
[ "payment", "Fixed 15", true, ">=20", "Fixed 20", "conventional", "reqDown" ],
|
|
26
|
+
[ "payment", "Fixed 20", "-", "<20", "Fixed 30", "conventional", 20 ],
|
|
27
|
+
[ "payment", "Fixed 20", false, ">=20", "Fixed 30", "jumbo", "reqDown" ],
|
|
28
|
+
[ "payment", "Fixed 20", true, ">=20", "Fixed 30", "conventional", "reqDown" ],
|
|
29
|
+
[ "payment", "Fixed 30", "-", "<20", "Fixed 40", "conventional", 20 ],
|
|
30
|
+
[ "payment", "Fixed 30", false, ">=20", "Fixed 40", "jumbo", "reqDown" ],
|
|
31
|
+
[ "payment", "Fixed 30", true, ">=20", "Fixed 40", "conventional", "reqDown" ],
|
|
32
|
+
[ "payment", "'ARM 7/1','ARM 3/1'", "-", "<20", "'ARM 3/1'", "conventional", 20 ],
|
|
33
|
+
[ "payment", "'ARM 7/1','ARM 3/1'", false, ">=20", "'ARM 3/1'", "jumbo", "reqDown" ],
|
|
34
|
+
[ "payment", "'ARM 7/1','ARM 3/1'", true, ">=20", "'ARM 3/1'", "conventional", "reqDown" ]
|
|
35
|
+
],
|
|
36
|
+
"hitPolicy": "C"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"data": {
|
|
40
|
+
"comment": "The data section is used to organize all constant data params in the RASON model.",
|
|
41
|
+
"reqObj": {
|
|
42
|
+
"value": "payment",
|
|
43
|
+
"comment": "reqobj"
|
|
44
|
+
},
|
|
45
|
+
"loanType": {
|
|
46
|
+
"value": "fixed 30",
|
|
47
|
+
"comment": "reqtype"
|
|
48
|
+
},
|
|
49
|
+
"conforming": {
|
|
50
|
+
"value": true,
|
|
51
|
+
"comment": "conforming"
|
|
52
|
+
},
|
|
53
|
+
"dwnPct": {
|
|
54
|
+
"value": 30,
|
|
55
|
+
"comment": "reqdown"
|
|
56
|
+
},
|
|
57
|
+
"bankRates": {
|
|
58
|
+
"value": [
|
|
59
|
+
[ "Lender", "loanType", "confType", "minDown%", "Term", "APR%", "Rate%", "Points", "feesAmt" ],
|
|
60
|
+
[ "MDL", "'ARM 3/1'", "conventional", 20, 360, 3.002, 3, 0, 0 ],
|
|
61
|
+
[ "AL", "'ARM 3/1'", "conventional", 20, 360, 3.103, 2.875, 0, 1995 ],
|
|
62
|
+
[ "AO", "'ARM 3/1'", "conventional", 20, 360, 3.13, 2.875, 1, 899 ],
|
|
63
|
+
[ "MDL", "Fixed 30", "conventional", 20, 360, 3.629, 3.625, 0, 0 ],
|
|
64
|
+
[ "AL", "Fixed 30", "conventional", 20, 360, 3.682, 3.625, 0, 1068 ],
|
|
65
|
+
[ "AO", "Fixed 30", "conventional", 20, 360, 3.79, 3.75, 0, 799 ]
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"formulas": {
|
|
70
|
+
"comment": "Use the formulas section to calculate a decision table.",
|
|
71
|
+
"loanTypes": {
|
|
72
|
+
"comment": "This formula calls the tblLoanTypes decision table. The first argument [string ret_output] is an optional argument that, when passed, returns only the desired columns in the output. In this example, this argument is blank. The second argument [bool ret_header] is an optional argument that, when True, returns the column headings in the output. This is key since the PsiJoin function is used in the next formula. The PsiJoin function relies on the column headings in order to perform the combination of the two tables. The third and remaining arguments pass the input parameters to the decision table: reqObj, loanType, conforming and downPct.",
|
|
73
|
+
"formula": "tblLoanTypes(, true, reqObj, loanType, conforming, dwnPct)",
|
|
74
|
+
"finalValue": []
|
|
75
|
+
},
|
|
76
|
+
"recom": {
|
|
77
|
+
"comment": "The formula uses the PsiJoin() function to join the loanTypes result with the bankRates array. This function takes three arguments, Table1, Table2 and Clause. The Table1 argument passes the first table, tblLoanTypes. The Table2 argument passes the second table or array, bankRates. The third argument, Clause, passes the conditions for joining the two. In this example, loanTypes (the decision table results) and the data table bankRates are joined via three columns: loanType, confType and downPct. The Clause argument must be surround by quotes. ",
|
|
78
|
+
"formula": "PsiJoin(loanTypes, bankRates, 'loanType = loanType, confType = confType, downPct >= minDown%')",
|
|
79
|
+
"finalValue": []
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|