@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.
Files changed (195) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +282 -0
  3. package/examples/EXAMPLES_REFERENCE.md +128 -0
  4. package/examples/Optimization/Conic/AirlineHubConic.json +112 -0
  5. package/examples/Optimization/Conic/AirlineHubConic2.json +109 -0
  6. package/examples/Optimization/Conic/AirlineHubConic3.json +112 -0
  7. package/examples/Optimization/Conic/AirlineHubConic4.json +100 -0
  8. package/examples/Optimization/Conic/AirlineHubConic5.json +102 -0
  9. package/examples/Optimization/DataBinding/ProductMixCsv.json +82 -0
  10. package/examples/Optimization/DataBinding/ProductMixCsv4.json +96 -0
  11. package/examples/Optimization/DataBinding/ProductMixExcel.json +74 -0
  12. package/examples/Optimization/DataBinding/ProductMixExcel1.json +87 -0
  13. package/examples/Optimization/DataBinding/ProductMixExcel11.json +109 -0
  14. package/examples/Optimization/DataBinding/ProductMixExcel2.json +78 -0
  15. package/examples/Optimization/DataBinding/ProductMixTab.json +90 -0
  16. package/examples/Optimization/DataBinding/ProductMixTab1.json +74 -0
  17. package/examples/Optimization/DataBinding/ProductMixTab2.json +78 -0
  18. package/examples/Optimization/Linear/Inventory.json +200 -0
  19. package/examples/Optimization/Linear/Matop.json +120 -0
  20. package/examples/Optimization/Linear/ProductMix.json +98 -0
  21. package/examples/Optimization/Linear/ProductMix2.json +73 -0
  22. package/examples/Optimization/Linear/ProductMix3.json +50 -0
  23. package/examples/Optimization/Linear/ProductMix4.json +57 -0
  24. package/examples/Optimization/Linear/ProductMixCsv1.json +106 -0
  25. package/examples/Optimization/Linear/ProductMixCsv2.json +106 -0
  26. package/examples/Optimization/Linear/ProductMixSQL11.json +82 -0
  27. package/examples/Optimization/Linear/Rowop.json +127 -0
  28. package/examples/Optimization/NonLinear/AirlineHub.json +64 -0
  29. package/examples/Optimization/NonLinear/AirlineHub2.json +48 -0
  30. package/examples/Optimization/NonLinear/AirlineHub3.json +48 -0
  31. package/examples/Optimization/NonSmooth/Inventory2.json +160 -0
  32. package/examples/Optimization/Quadratic/PortfolioOpt.json +56 -0
  33. package/examples/Optimization/Quadratic/PortfolioOpt2.json +66 -0
  34. package/examples/Optimization/WithUncertainty/GasCompanyChance.json +79 -0
  35. package/examples/Optimization/WithUncertainty/GasCompanyRecourse.json +79 -0
  36. package/examples/Optimization/WithUncertainty/ProjectSelect.json +78 -0
  37. package/examples/Optimization/WithUncertainty/ProjectSelect2.json +82 -0
  38. package/examples/Optimization/WithUncertainty/ProjectSelect3.json +85 -0
  39. package/examples/Optimization/WithUncertainty/ProjectSelect4.json +75 -0
  40. package/examples/Simulation/CandyStoreSalesUsingSIP.json +148 -0
  41. package/examples/Simulation/CollegeFundGrowth1.json +424 -0
  42. package/examples/Simulation/CollegeFundGrowth1SIPModel.json +28 -0
  43. package/examples/Simulation/CollegeFundGrowth2.json +416 -0
  44. package/examples/Simulation/CollegeFundGrowthSIP.json +402 -0
  45. package/examples/Simulation/GBMSimulationModel.json +237 -0
  46. package/examples/Simulation/YieldManagement(Sim).json +70 -0
  47. package/examples/Simulation/YieldManagement2(Sim).json +73 -0
  48. package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +54 -0
  49. package/examples/calculation/DMNExamples/DMN Context example.json +69 -0
  50. package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -0
  51. package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -0
  52. package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -0
  53. package/examples/calculation/DMNExamples/FEEL For with two indices.json +16 -0
  54. package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -0
  55. package/examples/calculation/DMNExamples/FEEL If Then Else example.json +26 -0
  56. package/examples/calculation/DMNExamples/FEEL List example.json +38 -0
  57. package/examples/calculation/DMNExamples/FEEL List operator.json +17 -0
  58. package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +37 -0
  59. package/examples/calculation/DMNExamples/FEEL Some or Every example.json +66 -0
  60. package/examples/calculation/DecisionTables/DT Datasource example.json +53 -0
  61. package/examples/calculation/DecisionTables/DT Date and Time examples.json +92 -0
  62. package/examples/calculation/DecisionTables/DT Expression example.json +32 -0
  63. package/examples/calculation/DecisionTables/DT Hit Policy examples.json +137 -0
  64. package/examples/calculation/DecisionTables/DT Loan Recommend model.json +82 -0
  65. package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +219 -0
  66. package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -0
  67. package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +204 -0
  68. package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -0
  69. package/examples/calculation/DecisionTables/DT Output Order example.json +40 -0
  70. package/examples/calculation/DecisionTables/DT Unique example.json +39 -0
  71. package/examples/calculation/TypeDefinitions/TypeDefCF.json +65 -0
  72. package/examples/calculation/TypeDefinitions/TypeDefDT.json +58 -0
  73. package/examples/datamining/AffinityAnalysis/AssociationRules.json +52 -0
  74. package/examples/datamining/Classification/DecisionTree.json +91 -0
  75. package/examples/datamining/Classification/DiscriminantAnalysis.json +82 -0
  76. package/examples/datamining/Classification/Ensembles/Bagging.json +67 -0
  77. package/examples/datamining/Classification/Ensembles/Boosting.json +68 -0
  78. package/examples/datamining/Classification/Ensembles/RandomTrees.json +92 -0
  79. package/examples/datamining/Classification/FindBestModel.json +87 -0
  80. package/examples/datamining/Classification/LogisticRegression.json +83 -0
  81. package/examples/datamining/Classification/NaiveBayes.json +79 -0
  82. package/examples/datamining/Classification/NearestNeighbors.json +85 -0
  83. package/examples/datamining/Classification/NeuralNetwork.json +93 -0
  84. package/examples/datamining/Clustering/Hierarchical.json +55 -0
  85. package/examples/datamining/Clustering/KMeans.json +72 -0
  86. package/examples/datamining/DataSources/DelimitedFile.json +50 -0
  87. package/examples/datamining/DataSources/JSONFile.json +50 -0
  88. package/examples/datamining/DataSources/MSAccessDatabase.json +50 -0
  89. package/examples/datamining/DataSources/MSExcelTable.json +51 -0
  90. package/examples/datamining/DataSources/MSSQLDatabase.json +50 -0
  91. package/examples/datamining/DataSources/ODATATable.json +50 -0
  92. package/examples/datamining/DataSources/ODBCDatabase.json +50 -0
  93. package/examples/datamining/FeatureSelection/LinearWrapping.json +54 -0
  94. package/examples/datamining/FeatureSelection/LogisticWrapping.json +57 -0
  95. package/examples/datamining/FeatureSelection/Univariate.json +79 -0
  96. package/examples/datamining/Regression/DecisionTree.json +82 -0
  97. package/examples/datamining/Regression/Ensembles/Bagging.json +63 -0
  98. package/examples/datamining/Regression/Ensembles/Boosting.json +63 -0
  99. package/examples/datamining/Regression/Ensembles/RandomTrees.json +79 -0
  100. package/examples/datamining/Regression/FindBestModel.json +87 -0
  101. package/examples/datamining/Regression/LinearRegression.json +125 -0
  102. package/examples/datamining/Regression/NearestNeighbors.json +78 -0
  103. package/examples/datamining/Regression/NeuralNetwork.json +83 -0
  104. package/examples/datamining/Scoring/JSONClassifier.json +63 -0
  105. package/examples/datamining/Scoring/JSONClassifierNN.json +63 -0
  106. package/examples/datamining/Scoring/JSONClusterizer.json +38 -0
  107. package/examples/datamining/Scoring/JSONForecaster.json +50 -0
  108. package/examples/datamining/Scoring/JSONLinearRegression.json +57 -0
  109. package/examples/datamining/Scoring/JSONPCA.json +42 -0
  110. package/examples/datamining/Scoring/JSONRegressor.json +57 -0
  111. package/examples/datamining/Scoring/JSONTransformer.json +39 -0
  112. package/examples/datamining/Scoring/PMMLClassifier.json +43 -0
  113. package/examples/datamining/Scoring/PMMLForecaster.json +44 -0
  114. package/examples/datamining/Scoring/PMMLRegressor.json +39 -0
  115. package/examples/datamining/Scoring/PMMLTransformer.json +39 -0
  116. package/examples/datamining/Simulation/LinearRegressionSimulation.json +118 -0
  117. package/examples/datamining/Simulation/SyntheticDataGeneration.json +109 -0
  118. package/examples/datamining/Simulation/pmml-risk-scoring.json +63 -0
  119. package/examples/datamining/Summarizer/Summarization.json +55 -0
  120. package/examples/datamining/TextMining/LatentSemanticAnalysis.json +52 -0
  121. package/examples/datamining/TextMining/TfIdf-FileData.json +66 -0
  122. package/examples/datamining/TextMining/TfIdf-InlineData.json +56 -0
  123. package/examples/datamining/TimeSeries/AddHoltWinters.json +80 -0
  124. package/examples/datamining/TimeSeries/Arima.json +75 -0
  125. package/examples/datamining/TimeSeries/DoubleExponential.json +66 -0
  126. package/examples/datamining/TimeSeries/Exponential.json +65 -0
  127. package/examples/datamining/TimeSeries/LagAnalysis.json +49 -0
  128. package/examples/datamining/TimeSeries/MovingAverage.json +66 -0
  129. package/examples/datamining/TimeSeries/MulHoltWinters.json +66 -0
  130. package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +66 -0
  131. package/examples/datamining/Transformation/Binning.json +70 -0
  132. package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +48 -0
  133. package/examples/datamining/Transformation/CategoryReduction.json +52 -0
  134. package/examples/datamining/Transformation/Factorization.json +51 -0
  135. package/examples/datamining/Transformation/MissingDataHandling.json +84 -0
  136. package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +55 -0
  137. package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +49 -0
  138. package/examples/datamining/Transformation/PartitionTimeSeries.json +49 -0
  139. package/examples/datamining/Transformation/Partitioning-DF.json +73 -0
  140. package/examples/datamining/Transformation/Partitioning.json +47 -0
  141. package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +66 -0
  142. package/examples/datamining/Transformation/PartitioningWithOversampling.json +45 -0
  143. package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +53 -0
  144. package/examples/datamining/Transformation/Rescaling.json +68 -0
  145. package/examples/datamining/Transformation/Sampling.json +44 -0
  146. package/examples/datamining/Transformation/StratifiedSampling.json +47 -0
  147. package/examples/flow/SQLServerTransform.json +261 -0
  148. package/examples/flow/dm-calc-pipeline.json +278 -0
  149. package/examples/flow/dm-pipeline-simulation.json +114 -0
  150. package/examples/flow/opt-sim-pipeline.json +160 -0
  151. package/examples/flow/sim-dm-pipeline.json +107 -0
  152. package/examples/flow/sim-sim-pipeline.json +137 -0
  153. package/examples/index.json +4679 -0
  154. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +53 -0
  155. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +58 -0
  156. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +36 -0
  157. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +34 -0
  158. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +26 -0
  159. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +48 -0
  160. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +70 -0
  161. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +50 -0
  162. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +338 -0
  163. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +62 -0
  164. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +191 -0
  165. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +76 -0
  166. package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +109 -0
  167. package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +69 -0
  168. package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -0
  169. package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -0
  170. package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +155 -0
  171. package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +119 -0
  172. package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +143 -0
  173. package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +82 -0
  174. package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -0
  175. package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +114 -0
  176. package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +108 -0
  177. package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -0
  178. package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -0
  179. package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -0
  180. package/examples/rason-features/UserGuide/UGForecast.json +51 -0
  181. package/examples/rason-features/UserGuide/UGProductMix1.json +49 -0
  182. package/examples/rason-features/UserGuide/UGProductMix2.json +49 -0
  183. package/examples/rason-features/UserGuide/UGProductMixTab1.json +68 -0
  184. package/examples/rason-features/UserGuide/UGProductMixTab2.json +77 -0
  185. package/examples/rason-features/UserGuide/UGProductMixTab3.json +67 -0
  186. package/examples/rason-features/UserGuide/UGProductMixTab4.json +71 -0
  187. package/examples/rason-features/UserGuide/UGProductMixTab5.json +68 -0
  188. package/examples/rason-features/UserGuide/UGProjectSelect0.json +92 -0
  189. package/examples/rason-features/UserGuide/UGProjectSelect1.json +75 -0
  190. package/examples/rason-features/UserGuide/UGProjectSelect2.json +75 -0
  191. package/examples/rason-features/UserGuide/UGYieldManagement1.json +62 -0
  192. package/examples/rason-features/UserGuide/UGYieldManagement2.json +62 -0
  193. package/examples/rason-features/UserGuide/UGYieldManagement3.json +64 -0
  194. package/out/index.cjs +361 -0
  195. package/package.json +76 -0
@@ -0,0 +1,85 @@
1
+ {
2
+ "modelName": "ProjectSelect3Example",
3
+ "modelDescription": "RASON Simulation-optimization example with indexed assignments: A company is considering eight different investment projects for the coming year. Each project's expected cash flow can be modeled as a PsiTriangular distribution with Minimum, Likely, and Maximum parameters. There is a 90% chance that each project chosen will be successful. The Initial Investment for each project can be found in the f block in 'formulas', below. Select the investments that will maximize the Expected Total Cash Flow while keeping within the $1.5M budget. ",
4
+ "modelType": "optimization",
5
+ "modelSettings": {
6
+ "comment": "This example uses simulation optimization to solve the model. See 'Solving with Simulation Optimization' on the Help tab for more information. The option 'numTrials' sets the number of simulation trials to 100. Enter a positive integer value for randomSeed; this value will then be used to 'seed' the random number generator each time you click Solve.",
7
+ "simulationOptimization": true,
8
+ "numTrials": 100,
9
+ "randomSeed": 1
10
+ },
11
+ "engineSettings": {
12
+ "comment": "Set the engine to be used to solve the model here. Since this model solves with simulation optimization, the Evolutionary engine is selected.",
13
+ "engine": "Evolutionary"
14
+ },
15
+ "variables": {
16
+ "x": {
17
+ "comment": "This example contains 8 decision variables. These variables are binary variables, or 0/1 variables, which represent the decision to accept or reject the project. Final values of the variables will be included in the result since the keyword finalValue is present. The 'dimensions' property explicitly specifies the number of dimensions as 8.",
18
+ "dimensions": [ 8 ],
19
+ "type": "binary",
20
+ "finalValue": []
21
+ }
22
+ },
23
+ "uncertainVariables": {
24
+ "comment": "There are also 16 uncertain variables. This means that each uncertain variable will have 100 (numtrials) values. The first 8 uncertain variables, in the c array, model the expected cash flow for each of the 8 projects using the PsiTriangular distribution. For more information on this distribution, see https://www.solver.com/risk-solver-help/psi-function-help/simulation/distributions/psiTriangular. The next 8 uncertain variables, d, model the project's success using the binomial distribution. For more information on this distribution, see https://www.solver.com/risk-solver-help/psi-function-help/simulation/distributions/psiBinomial.",
25
+ "c": {
26
+ "comment": "In this example, the c array of size 8 is created first, then populated element by element.",
27
+ "dimensions": [ 8 ]
28
+ },
29
+ "c[1]": {
30
+ "formula": "PsiTriangular(400000, 500000, 900000)"
31
+ },
32
+ "c[2]": {
33
+ "formula": "PsiTriangular(500000, 750000, 1250000)"
34
+ },
35
+ "c[3]": {
36
+ "formula": "PsiTriangular(500000, 1000000,1500000)"
37
+ },
38
+ "c[4]": {
39
+ "formula": "PsiTriangular(400000, 600000, 900000)"
40
+ },
41
+ "c[5]": {
42
+ "formula": "PsiTriangular(250000, 500000, 750000)"
43
+ },
44
+ "c[6]": {
45
+ "formula": "PsiTriangular(300000, 500000, 600000)"
46
+ },
47
+ "c[7]": {
48
+ "formula": "PsiTriangular(200000, 450000, 700000)"
49
+ },
50
+ "c[8]": {
51
+ "formula": "PsiTriangular(400000, 500000, 700000)"
52
+ },
53
+ "d": {
54
+ "comment": "This uncertain variable block contains 8 uncertain variables, all with the same distribution, PsiBinomial(1,0.9).",
55
+ "dimensions": [ 8 ],
56
+ "formula": "PsiBinomial(1, 0.9)"
57
+ }
58
+ },
59
+ "formulas": {
60
+ "comment": "Use this optional section to setup constant arrays and calculate intermediary formulas that will be used in the constraints and objective.",
61
+ "f": {
62
+ "comment": "This array contains the initial investment for each project.",
63
+ "value": [ 325000, 450000, 550000, 300000, 150000, 250000, 150000, 325000 ]
64
+ },
65
+ "cash": {
66
+ "comment": "This array calculates the sumproduct of the expected cash flow for each project minus the initial investment, and the decision variables, to calculate the total net cash flow.",
67
+ "formula": "sumproduct(c * d - f, x)"
68
+ }
69
+ },
70
+ "constraints": {
71
+ "comment": "This model uses 1 constraint to ensure that the total investment does not exceed the budget of $1.5M.",
72
+ "invest": {
73
+ "formula": "sumproduct(f, x)",
74
+ "upper": 1500000
75
+ }
76
+ },
77
+ "objective": {
78
+ "comment": "Maximizes the expected total cash flow. Notice that the objective is maximizing PsiMean(cash), reducing the uncertainty in the model from 100 values to 1. The objective could have also been set to maximize the Expected value of the objective as done in GasCompanyRecourse.",
79
+ "total": {
80
+ "type": "maximize",
81
+ "formula": "PsiMean(cash)",
82
+ "finalValue": []
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "modelName": "ProjectSelect4Example",
3
+ "modelDescription": "Simulation-optimization RASON investment model example with formulas in array: A company is considering eight different investment projects for the coming year. Each project's expected cash flow can be modeled as a PsiTriangular distribution with Minimum, Likely, and Maximum parameters. There is a 90% chance that each project chosen will be successful. The Initial Investment for each project can be found in the f block within 'formulas', below. Select the investments that will maximize the Expected Total Cash Flow while keeping within the $1.5M budget. ",
4
+ "modelType": "optimization",
5
+ "modelSettings": {
6
+ "comment": "This example uses simulation optimization to solve the model. See 'Solving with Simulation Optimization' on the Help tab for more information. The option 'numTrials' sets the number of simulation trials to 100. Enter a positive integer value for randomSeed; this value will then be used to 'seed' the random number generator each time you click Solve.",
7
+ "simulationOptimization": true,
8
+ "numTrials": 100,
9
+ "randomSeed": 1
10
+ },
11
+ "engineSettings": {
12
+ "comment": "Set the engine to be used to solve the model here. Since this model solves with simulation optimization, the Evolutionary engine is selected.",
13
+ "engine": "Evolutionary"
14
+ },
15
+ "variables": {
16
+ "comment": "Enter the model decision variables in the 'variables' section of the RASON model.",
17
+ "x": {
18
+ "comment": "This example contains 8 decision variables. These variables are binary variables, or 0/1 variables, which represent the decision to accept or reject the project. Final values of the variables will be included in the result since the keyword finalValue is present. The 'dimensions' property explicitly specifies the number of dimensions as 8.",
19
+
20
+ "dimensions": [ 8 ],
21
+ "type": "binary",
22
+ "finalValue": []
23
+ }
24
+ },
25
+ "uncertainVariables": {
26
+ "comment": "There are also 16 uncertain variables. This means that each uncertain variable will have 100 (numtrials) values. The first 8 uncertain variables, in the c array, model the expected cash flow for each of the 8 projects using the PsiTriangular distribution. For more information on this distribution, see https://www.solver.com/risk-solver-help/psi-function-help/simulation/distributions/psiTriangular. The next 8 uncertain variables, d, model the project's success using the binomial distribution. For more information on this distribution, see https://www.solver.com/risk-solver-help/psi-function-help/simulation/distributions/psiBinomial.",
27
+ "c": {
28
+ "comment": "In this example, the c array of size 8 is populated directly with the distribution formulas.",
29
+ "dimensions": [ 8 ],
30
+ "formula": [
31
+ "PsiTriangular(400000, 500000, 900000)",
32
+ "PsiTriangular(500000, 750000, 1250000)",
33
+ "PsiTriangular(500000, 1000000,1500000)",
34
+ "PsiTriangular(400000, 600000, 900000)",
35
+ "PsiTriangular(250000, 500000, 750000)",
36
+ "PsiTriangular(300000, 500000, 600000)",
37
+ "PsiTriangular(200000, 450000, 700000)",
38
+ "PsiTriangular(400000, 500000, 700000)"
39
+ ]
40
+ },
41
+ "d": {
42
+ "comment": "This uncertain variable block contains 8 uncertain variables, all with the same distribution, PsiBinomial(1,0.9).",
43
+ "dimensions": [ 8 ],
44
+ "formula": "PsiBinomial(1, 0.9)"
45
+ }
46
+ },
47
+ "formulas": {
48
+ "comment": "Use this optional section to setup constant arrays and calculate intermediary formulas that will be used in the constraints and objective.",
49
+ "f": {
50
+ "comment": "This array contains the initial investment for each project.",
51
+ "value": [ 325000, 450000, 550000, 300000, 150000, 250000, 150000, 325000 ]
52
+ },
53
+ "cash": {
54
+ "comment": "This array calculates the sumproduct of the expected cash flow for each project minus the initial investment, and the decision variables, to calculate the total net cash flow.",
55
+ "formula": "sumproduct(c * d - f, x)"
56
+ }
57
+ },
58
+ "constraints": {
59
+ "comment": "Enter the model constraints in the 'constraints' section of the RASON model.",
60
+ "invest": {
61
+ "comment": "This model uses 1 constraint to ensure that the total investment does not exceed the budget of $1.5M.",
62
+ "formula": "sumproduct(f, x)",
63
+ "upper": 1500000
64
+ }
65
+ },
66
+ "objective": {
67
+ "comment": "Enter the objective function in the 'objective' section of the RASON model.",
68
+ "total": {
69
+ "comment": "Maximizes the expected total cash flow. Notice that the objective is maximizing PsiMean(cash), reducing the uncertainty in the model from 100 values to 1. The objective could have also been set to maximize the Expected value of the objective as done in GasCompanyRecourse.",
70
+ "type": "maximize",
71
+ "formula": "PsiMean(cash)",
72
+ "finalValue": []
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "comment": "RASON model illustrating PsiSip() functionality using past monthly candy sales",
3
+ "modelName": "CandyStoreSales(Sim)",
4
+ "modelDescription": "RASON model that uses a SIP (PsiSip) which uses a historical data point for each trial. Benjamin is the owner/operator of a candy store. His best selling products are chocolate bars, JuJu Beans, chocolate nuggets and eclairs. Using last year's sales data from each product, he has estimated his daily Gross Profit from these four products using four different SIPs (Stochastic Information Packets), one for each product.",
5
+ "modelType": "simulation",
6
+ "modelSettings": {
7
+ "comment": "When using a SIP or SLURP, it is important to set the number of trials to a multiple of the number of data points in the historical data. For example, in this model, there are 365 data points in the Past Bars Sales Data. As a result, numTrials is set to 730 or 2 * 365.",
8
+ "numTrials": 730
9
+ },
10
+ "engineSettings": {
11
+ "comment": "Use the engineSettings section to set options related to the engine being used to solve the model, in the case of a simulation model, the Risk Solver Engine. In most cases, the default values are sufficient.",
12
+ "randomGenerator": "Lecuyer",
13
+ "samplingMethod": "Latin"
14
+ },
15
+ "uncertainVariables": {
16
+ "comment": "The are four uncertain variables in the model, all representing the daily sales for each product. Each uncertain variable pulls historical data (directly and in order) from a SIP, or Stochastic Information Packet.",
17
+ "bars": {
18
+ "comment": "Check the output for the PsiSip values used for this uncertain function by using the trials: [] property. You'll notice that they will match the historical data for bars.",
19
+ "formula": "PsiSip(Past Bars Sales Data)",
20
+ "trials": []
21
+ },
22
+ "beans": {
23
+ "comment": "Check the output for the PsiSip values used for this uncertain function by using the trials: [] property. You'll notice that they will match the historical data for beans.",
24
+ "formula": "PsiSip(Past Beans Sales Data)",
25
+ "trials": []
26
+ },
27
+ "nuggets": {
28
+ "comment": "Check the output for the PsiSip values used for this uncertain function by using the trials: [] property. You'll notice that they will match the historical data for nuggets.",
29
+ "formula": "PsiSip(Past Nuggets Sales Data)",
30
+ "trials": []
31
+ },
32
+ "eclairs": {
33
+ "comment": "Check the output for the PsiSip values used for this uncertain function by using the trials: [] property. You'll notice that they will match the historical data for eclairs.",
34
+ "formula": "PsiSip(Past Eclairs Sales Data)",
35
+ "trials": []
36
+ }
37
+ },
38
+ "data": {
39
+ "comment": "The 'data' section contains the daily historical sales data for each product for 1 year.",
40
+ "Past Bars Sales Data": {
41
+ "value": [ 7, 16, 8, 10, 14, 7, 6, 10, 7, 5, 9, 7, 11, 7, 10, 16, 9, 6, 12, 16, 24, 5, 6, 6, 9, 15, 10, 17, 16, 21, 3, 13, 11, 12, 8, 7, 5, 4, 8, 19, 12, 5, 10, 11, 7, 11, 9, 9, 5, 11, 7, 15, 6, 6, 12, 6, 7, 15, 13, 3, 13, 4, 4, 10, 10, 11, 26, 13, 11, 7, 9, 8, 9, 6, 14, 4, 6, 3, 6, 12, 10, 8, 9, 6, 8, 9, 5, 9, 5, 11, 7, 5, 8, 6, 6, 14, 12, 13, 18, 6, 17, 33, 6, 9, 6, 5, 6, 3, 12, 6, 13, 11, 5, 11, 12, 30, 7, 10, 10, 9, 8, 10, 5, 6, 5, 14, 12, 10, 12, 5, 14, 12, 16, 18, 14, 6, 6, 4, 31, 21, 8, 8, 8, 6, 11, 21, 16, 5, 7, 20, 10, 8, 11, 4, 6, 7, 4, 9, 12, 16, 15, 16, 6, 9, 7, 11, 11, 8, 5, 7, 4, 5, 12, 6, 6, 3, 8, 5, 13, 18, 6, 6, 8, 7, 8, 19, 14, 5, 12, 7, 9, 8, 11, 6, 12, 7, 8, 22, 2, 13, 7, 22, 6, 13, 8, 9, 10, 9, 4, 15, 8, 10, 6, 13, 6, 13, 4, 11, 8, 20, 5, 10, 9, 7, 4, 9, 3, 4, 18, 16, 5, 10, 4, 4, 15, 9, 9, 9, 17, 6, 5, 8, 5, 9, 10, 5, 7, 5, 10, 8, 7, 5, 9, 8, 16, 6, 10, 6, 8, 11, 8, 4, 7, 4, 7, 12, 11, 13, 9, 6, 7, 8, 8, 18, 7, 7, 6, 10, 19, 6, 7, 12, 6, 7, 9, 8, 7, 5, 5, 8, 9, 15, 10, 6, 12, 9, 9, 5, 7, 5, 12, 11, 8, 8, 7, 10, 13, 12, 6, 5, 11, 12, 6, 9, 9, 17, 8, 3, 10, 8, 5, 10, 10, 6, 6, 9, 12, 11, 12, 7, 6, 14, 3, 8, 5, 5, 10, 7, 6, 11, 3, 6, 7, 8, 25, 6, 4, 6, 7, 5, 6, 11, 7, 4, 6, 4, 19, 8, 9, 11, 17, 8, 6, 15, 4 ]
42
+ },
43
+ "Past Beans Sales Data": {
44
+ "value": [ 8, 6, 6, 7, 7, 4, 7, 7, 8, 7, 6, 7, 5, 7, 5, 4, 5, 7, 6, 6, 4, 5, 6,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, 6, 5, 2, 5, 2, 2, 6, 3, 4, 5, 5, 3, 4, 2, 1, 2, 5, 7, 2, 2, 2, 4, 3, 2, 7, 2, 5, 2, 1, 4, 1, 2, 1, 4, 4, 3, 3, 6, 10, 3, 5, 2, 6, 5, 4, 4, 2, 7, 4, 2, 15, 4, 1, 4, 1, 3, 6, 5, 3, 4, 4, 6, 1, 0, 9, 1, 2, 2, 5, 3, 4, 3, 3 ]
51
+ },
52
+ "priceBars": {
53
+ "comment": "The price of a chocolate bar.",
54
+ "value": 2.5
55
+ },
56
+ "costBars": {
57
+ "comment": "The cost to make 1 chocolate bar.",
58
+ "value": 1.5
59
+ },
60
+ "priceBeans": {
61
+ "comment": "The price of a bag of juju beans.",
62
+ "value": 1.75
63
+ },
64
+ "costBeans": {
65
+ "comment": "The cost to make 1 bag of juju beans.",
66
+ "value": 1.05
67
+ },
68
+ "priceNuggets": {
69
+ "comment": "The price of a chocolate nugget.",
70
+ "value": 3.5
71
+ },
72
+ "costNuggets": {
73
+ "comment": "The cost to make 1 chocolate nugget.",
74
+ "value": 2.25
75
+ },
76
+ "priceEclairs": {
77
+ "comment": "The price of an eclair.",
78
+ "value": 4
79
+ },
80
+ "costEclairs": {
81
+ "comment": "The cost to make 1 eclair.",
82
+ "value": 2.95
83
+ }
84
+ },
85
+ "formulas": {
86
+ "salesBars": {
87
+ "comment": "calculating the sales revenue for bars.",
88
+ "formula": "priceBars * bars"
89
+ },
90
+ "salesBeans": {
91
+ "comment": "calculating the sales revenue for juju beans.",
92
+ "formula": "priceBeans * beans"
93
+ },
94
+ "salesNuggets": {
95
+ "comment": "calculating the sales revenue for nuggets.",
96
+ "formula": "priceNuggets * nuggets"
97
+ },
98
+ "salesEclairs": {
99
+ "comment": "calculating the sales revenue for eclairs.",
100
+ "formula": "priceEclairs * eclairs"
101
+ },
102
+ "totalCostBars": {
103
+ "comment": "calculating the production costs associated with chocolate bars.",
104
+ "formula": "costBars * bars"
105
+ },
106
+ "totalCostBeans": {
107
+ "comment": "calculating the production costs associated with juju beans.",
108
+ "formula": "costBeans * beans"
109
+ },
110
+ "totalCostNuggets": {
111
+ "comment": "calculating the production costs associated with chocolate nuggets.",
112
+ "formula": "costNuggets * nuggets"
113
+ },
114
+ "totalCostEclairs": {
115
+ "comment": "calculating the production costs associated with chocolate eclairs.",
116
+ "formula": "costEclairs * eclairs"
117
+ }
118
+ },
119
+ "uncertainFunctions": {
120
+ "comment": "The uncertain functions calculate the gross profit for each product.",
121
+ "profitBars": {
122
+ "comment": "Gross profit for chocolate bars",
123
+ "formula": "salesBars - totalCostBars",
124
+ "mean": []
125
+ },
126
+ "profitBeans": {
127
+ "comment": "Gross profit for chocolate juju beans",
128
+ "formula": "salesBeans - totalCostBeans",
129
+ "mean": []
130
+ },
131
+ "profitNuggets": {
132
+ "comment": "Gross profit for chocolate nuggets",
133
+ "formula": "salesNuggets - totalCostNuggets",
134
+ "mean": []
135
+ },
136
+ "profitEclairs": {
137
+ "comment": "Gross profit for eclairs",
138
+ "formula": "salesEclairs - totalCostEclairs",
139
+ "mean": []
140
+ },
141
+ "Total Profit": {
142
+ "comment": "Calculates the Gross Profit for all products combined.",
143
+ "formula": "sum(profitBars + profitBeans + profitNuggets + profitEclairs)",
144
+ "mean": [],
145
+ "trials": []
146
+ }
147
+ }
148
+ }