@frontlinesystems/rason-mcp-server 2026.5.0 → 2026.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/LICENSE +35 -35
  2. package/README.md +1 -1
  3. package/examples/EXAMPLES_REFERENCE.md +128 -128
  4. package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +53 -53
  5. package/examples/calculation/DMNExamples/DMN Context example.json +69 -69
  6. package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -43
  7. package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -28
  8. package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -66
  9. package/examples/calculation/DMNExamples/FEEL For with two indices.json +15 -15
  10. package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -88
  11. package/examples/calculation/DMNExamples/FEEL If Then Else example.json +25 -25
  12. package/examples/calculation/DMNExamples/FEEL List example.json +37 -37
  13. package/examples/calculation/DMNExamples/FEEL List operator.json +17 -17
  14. package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +36 -36
  15. package/examples/calculation/DMNExamples/FEEL Some or Every example.json +65 -65
  16. package/examples/calculation/DecisionTables/DT Datasource example.json +52 -52
  17. package/examples/calculation/DecisionTables/DT Date and Time examples.json +91 -91
  18. package/examples/calculation/DecisionTables/DT Expression example.json +32 -32
  19. package/examples/calculation/DecisionTables/DT Hit Policy examples.json +136 -136
  20. package/examples/calculation/DecisionTables/DT Loan Recommend model.json +81 -81
  21. package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +218 -218
  22. package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -286
  23. package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +203 -203
  24. package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -214
  25. package/examples/calculation/DecisionTables/DT Output Order example.json +39 -39
  26. package/examples/calculation/DecisionTables/DT Unique example.json +38 -38
  27. package/examples/calculation/TypeDefinitions/TypeDefCF.json +64 -64
  28. package/examples/calculation/TypeDefinitions/TypeDefDT.json +57 -57
  29. package/examples/datamining/AffinityAnalysis/AssociationRules.json +51 -51
  30. package/examples/datamining/Classification/DecisionTree.json +90 -90
  31. package/examples/datamining/Classification/DiscriminantAnalysis.json +81 -81
  32. package/examples/datamining/Classification/Ensembles/Bagging.json +66 -66
  33. package/examples/datamining/Classification/Ensembles/Boosting.json +67 -67
  34. package/examples/datamining/Classification/Ensembles/RandomTrees.json +91 -91
  35. package/examples/datamining/Classification/FindBestModel.json +86 -86
  36. package/examples/datamining/Classification/LogisticRegression.json +82 -82
  37. package/examples/datamining/Classification/NaiveBayes.json +78 -78
  38. package/examples/datamining/Classification/NearestNeighbors.json +84 -84
  39. package/examples/datamining/Classification/NeuralNetwork.json +92 -92
  40. package/examples/datamining/Clustering/Hierarchical.json +54 -54
  41. package/examples/datamining/Clustering/KMeans.json +71 -71
  42. package/examples/datamining/DataSources/DelimitedFile.json +49 -49
  43. package/examples/datamining/DataSources/JSONFile.json +49 -49
  44. package/examples/datamining/DataSources/MSAccessDatabase.json +49 -49
  45. package/examples/datamining/DataSources/MSExcelTable.json +50 -50
  46. package/examples/datamining/DataSources/MSSQLDatabase.json +49 -49
  47. package/examples/datamining/DataSources/ODATATable.json +49 -49
  48. package/examples/datamining/DataSources/ODBCDatabase.json +49 -49
  49. package/examples/datamining/FeatureSelection/LinearWrapping.json +53 -53
  50. package/examples/datamining/FeatureSelection/LogisticWrapping.json +56 -56
  51. package/examples/datamining/FeatureSelection/Univariate.json +78 -78
  52. package/examples/datamining/Regression/DecisionTree.json +82 -82
  53. package/examples/datamining/Regression/Ensembles/Bagging.json +62 -62
  54. package/examples/datamining/Regression/Ensembles/Boosting.json +62 -62
  55. package/examples/datamining/Regression/Ensembles/RandomTrees.json +78 -78
  56. package/examples/datamining/Regression/FindBestModel.json +86 -86
  57. package/examples/datamining/Regression/LinearRegression.json +124 -124
  58. package/examples/datamining/Regression/NearestNeighbors.json +77 -77
  59. package/examples/datamining/Regression/NeuralNetwork.json +82 -82
  60. package/examples/datamining/Scoring/JSONClassifier.json +62 -62
  61. package/examples/datamining/Scoring/JSONClassifierNN.json +62 -62
  62. package/examples/datamining/Scoring/JSONClusterizer.json +37 -37
  63. package/examples/datamining/Scoring/JSONForecaster.json +49 -49
  64. package/examples/datamining/Scoring/JSONLinearRegression.json +56 -56
  65. package/examples/datamining/Scoring/JSONPCA.json +41 -41
  66. package/examples/datamining/Scoring/JSONRegressor.json +56 -56
  67. package/examples/datamining/Scoring/JSONTransformer.json +38 -38
  68. package/examples/datamining/Scoring/PMMLClassifier.json +42 -42
  69. package/examples/datamining/Scoring/PMMLForecaster.json +43 -43
  70. package/examples/datamining/Scoring/PMMLRegressor.json +38 -38
  71. package/examples/datamining/Scoring/PMMLTransformer.json +38 -38
  72. package/examples/datamining/Simulation/LinearRegressionSimulation.json +117 -117
  73. package/examples/datamining/Simulation/SyntheticDataGeneration.json +108 -108
  74. package/examples/datamining/Simulation/pmml-risk-scoring.json +62 -62
  75. package/examples/datamining/Summarizer/Summarization.json +54 -54
  76. package/examples/datamining/TextMining/LatentSemanticAnalysis.json +51 -51
  77. package/examples/datamining/TextMining/TfIdf-FileData.json +65 -65
  78. package/examples/datamining/TextMining/TfIdf-InlineData.json +55 -55
  79. package/examples/datamining/TimeSeries/AddHoltWinters.json +79 -79
  80. package/examples/datamining/TimeSeries/Arima.json +74 -74
  81. package/examples/datamining/TimeSeries/DoubleExponential.json +65 -65
  82. package/examples/datamining/TimeSeries/Exponential.json +64 -64
  83. package/examples/datamining/TimeSeries/LagAnalysis.json +48 -48
  84. package/examples/datamining/TimeSeries/MovingAverage.json +65 -65
  85. package/examples/datamining/TimeSeries/MulHoltWinters.json +65 -65
  86. package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +65 -65
  87. package/examples/datamining/Transformation/Binning.json +69 -69
  88. package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +47 -47
  89. package/examples/datamining/Transformation/CategoryReduction.json +51 -51
  90. package/examples/datamining/Transformation/Factorization.json +50 -50
  91. package/examples/datamining/Transformation/MissingDataHandling.json +83 -83
  92. package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +54 -54
  93. package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +48 -48
  94. package/examples/datamining/Transformation/PartitionTimeSeries.json +48 -48
  95. package/examples/datamining/Transformation/Partitioning-DF.json +72 -72
  96. package/examples/datamining/Transformation/Partitioning.json +46 -46
  97. package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +65 -65
  98. package/examples/datamining/Transformation/PartitioningWithOversampling.json +44 -44
  99. package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +52 -52
  100. package/examples/datamining/Transformation/Rescaling.json +67 -67
  101. package/examples/datamining/Transformation/Sampling.json +43 -43
  102. package/examples/datamining/Transformation/StratifiedSampling.json +46 -46
  103. package/examples/flow/SQLServerTransform.json +260 -260
  104. package/examples/flow/dm-calc-pipeline.json +277 -277
  105. package/examples/flow/dm-pipeline-simulation.json +113 -113
  106. package/examples/flow/opt-sim-pipeline.json +159 -159
  107. package/examples/flow/sim-dm-pipeline.json +106 -106
  108. package/examples/flow/sim-sim-pipeline.json +136 -136
  109. package/examples/index.json +4678 -4678
  110. package/examples/{Optimization → optimization}/Conic/AirlineHubConic.json +111 -111
  111. package/examples/{Optimization → optimization}/Conic/AirlineHubConic2.json +108 -108
  112. package/examples/{Optimization → optimization}/Conic/AirlineHubConic3.json +111 -111
  113. package/examples/{Optimization → optimization}/Conic/AirlineHubConic4.json +99 -99
  114. package/examples/{Optimization → optimization}/Conic/AirlineHubConic5.json +101 -101
  115. package/examples/{Optimization → optimization}/DataBinding/ProductMixCsv.json +81 -81
  116. package/examples/{Optimization → optimization}/DataBinding/ProductMixCsv4.json +96 -96
  117. package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel.json +73 -73
  118. package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel1.json +86 -86
  119. package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel11.json +108 -108
  120. package/examples/{Optimization → optimization}/DataBinding/ProductMixExcel2.json +77 -77
  121. package/examples/{Optimization → optimization}/DataBinding/ProductMixTab.json +89 -89
  122. package/examples/{Optimization → optimization}/DataBinding/ProductMixTab1.json +73 -73
  123. package/examples/{Optimization → optimization}/DataBinding/ProductMixTab2.json +77 -77
  124. package/examples/{Optimization → optimization}/Linear/Inventory.json +199 -199
  125. package/examples/{Optimization → optimization}/Linear/Matop.json +119 -119
  126. package/examples/{Optimization → optimization}/Linear/ProductMix.json +97 -97
  127. package/examples/{Optimization → optimization}/Linear/ProductMix2.json +72 -72
  128. package/examples/{Optimization → optimization}/Linear/ProductMix3.json +49 -49
  129. package/examples/{Optimization → optimization}/Linear/ProductMix4.json +56 -56
  130. package/examples/{Optimization → optimization}/Linear/ProductMixCsv1.json +106 -106
  131. package/examples/{Optimization → optimization}/Linear/ProductMixCsv2.json +106 -106
  132. package/examples/{Optimization → optimization}/Linear/ProductMixSQL11.json +82 -82
  133. package/examples/{Optimization → optimization}/Linear/Rowop.json +126 -126
  134. package/examples/{Optimization → optimization}/NonLinear/AirlineHub.json +63 -63
  135. package/examples/{Optimization → optimization}/NonLinear/AirlineHub2.json +47 -47
  136. package/examples/{Optimization → optimization}/NonLinear/AirlineHub3.json +47 -47
  137. package/examples/{Optimization → optimization}/NonSmooth/Inventory2.json +159 -159
  138. package/examples/{Optimization → optimization}/Quadratic/PortfolioOpt.json +55 -55
  139. package/examples/{Optimization → optimization}/Quadratic/PortfolioOpt2.json +65 -65
  140. package/examples/{Optimization → optimization}/WithUncertainty/GasCompanyChance.json +78 -78
  141. package/examples/{Optimization → optimization}/WithUncertainty/GasCompanyRecourse.json +78 -78
  142. package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect.json +77 -77
  143. package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect2.json +81 -81
  144. package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect3.json +84 -84
  145. package/examples/{Optimization → optimization}/WithUncertainty/ProjectSelect4.json +74 -74
  146. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +52 -52
  147. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +57 -57
  148. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +35 -35
  149. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +33 -33
  150. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +25 -25
  151. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +47 -47
  152. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +69 -69
  153. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +49 -49
  154. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +337 -337
  155. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +61 -61
  156. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +190 -190
  157. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +75 -75
  158. package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +108 -108
  159. package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +68 -68
  160. package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -183
  161. package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -79
  162. package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +154 -154
  163. package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +118 -118
  164. package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +142 -142
  165. package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +81 -81
  166. package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -69
  167. package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +113 -113
  168. package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +107 -107
  169. package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -117
  170. package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -108
  171. package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -67
  172. package/examples/rason-features/UserGuide/UGForecast.json +50 -50
  173. package/examples/rason-features/UserGuide/UGProductMix1.json +48 -48
  174. package/examples/rason-features/UserGuide/UGProductMix2.json +48 -48
  175. package/examples/rason-features/UserGuide/UGProductMixTab1.json +67 -67
  176. package/examples/rason-features/UserGuide/UGProductMixTab2.json +76 -76
  177. package/examples/rason-features/UserGuide/UGProductMixTab3.json +66 -66
  178. package/examples/rason-features/UserGuide/UGProductMixTab4.json +70 -70
  179. package/examples/rason-features/UserGuide/UGProductMixTab5.json +67 -67
  180. package/examples/rason-features/UserGuide/UGProjectSelect0.json +91 -91
  181. package/examples/rason-features/UserGuide/UGProjectSelect1.json +74 -74
  182. package/examples/rason-features/UserGuide/UGProjectSelect2.json +74 -74
  183. package/examples/rason-features/UserGuide/UGYieldManagement1.json +61 -61
  184. package/examples/rason-features/UserGuide/UGYieldManagement2.json +61 -61
  185. package/examples/rason-features/UserGuide/UGYieldManagement3.json +63 -63
  186. package/examples/{Simulation → simulation}/CandyStoreSalesUsingSIP.json +147 -147
  187. package/examples/{Simulation → simulation}/CollegeFundGrowth1.json +423 -423
  188. package/examples/{Simulation → simulation}/CollegeFundGrowth1SIPModel.json +27 -27
  189. package/examples/{Simulation → simulation}/CollegeFundGrowth2.json +415 -415
  190. package/examples/{Simulation → simulation}/CollegeFundGrowthSIP.json +401 -401
  191. package/examples/{Simulation → simulation}/GBMSimulationModel.json +236 -236
  192. package/examples/{Simulation → simulation}/YieldManagement(Sim).json +69 -69
  193. package/examples/{Simulation → simulation}/YieldManagement2(Sim).json +72 -72
  194. package/out/index.cjs +38 -38
  195. package/package.json +2 -2
@@ -1,51 +1,51 @@
1
- {
2
- "modelName": "UGForecastSimExample",
3
- "modelDescription": "RASON Forecast Simulation Example - This example appears in the Defining Your Simulation MOdel chapter in the RASON User Guide. Imagine that you are the sales manager for a company that is planning to introduce a new product. You need to estimate the first year profit from this product (which depends on the number of unit sales), the price per unit sold, the unit manufacturing cost, and any fixed costs or overhead. You have been advised that the unit manufacturing cost will range between $4.50 and $8.50, with a most-likely cost of $6.50. Based on your market research, you believe it is equally likely that the market demand will be Slow, OK, or Hot.",
4
- "modelType": "simulation",
5
- "comment": "When creating any RASON model, our model definition begins with a simple open bracket. Next we see three optional, but strongly recommended, high level properties, modelName, modelDescription and modelType. ModelName assigns a name to the model for easy retrieval later, modelDescription gives a short description of the problem and modelType informs the RASON Server that this model is a simulation model.",
6
- "uncertainVariables": {
7
- "comment": "There are two uncertain variables in this model, marketType and unitCost. The unit cost uses the PsiTriangular distribution to model the manufacturing cost while marketType uses the PsiIntUniform distribution to model the market demand. Since these are distributions, there will be 1000 values (the default setting for number of trials) returned for both marketType and unitCost.",
8
- "marketType": {
9
- "comment": "Since there are equal chances that the market will be Slow, OK, or Hot, we want to create an uncertain variable that selects among these three possibilities, by drawing a random number – say 1, 2 or 3 – with equal probability. We can do this easily in the RASON modeling language using an integer uniform probability distribution or PsiIntUniform(). Sales Volume and Selling Price will both be based on this uncertain variable. See the marketType uncertain variable in below. A sample drawn from a discrete distribution is always one of a set of discrete values, such as integer values. For more information on this distribution, see the RASON Reference Guide, downloadable from the Help tab. ",
10
- "formula": "PsiIntUniform(1,3)"
11
- },
12
- "unitCost": {
13
- "comment": "There are not just three, but many possible values for this variable: It can be anywhere from $4.50 to $8.50, with a most likely cost of $6.50. A crude but effective way to model this is to use a triangular distribution. The RASON modeling language provides a function called PsiTriangular() for this distribution (see the unitCost uncertain variable below). For more information on this distribution, see the RASON Reference Guide, downloadable from the Help tab.",
14
- "formula": "PsiTriangular(4.5, 6.5, 8.5)"
15
- }
16
- },
17
- "formulas": {
18
- "comment": "The salesVolume and sellingPrice formulas use the value of the PsiIntUniform distribution to determine which market (Slow, OK, or Hot) is selected per trial. If marketType equals 1, the Sales Volume and Selling Price are 50,000 and $11, if marketType equals 2, the Sales Volume and Selling Price are 75,000 and $10 and if marketType equals 3, the Sales Volume and Selling Price are 100,000 and $8.",
19
- "salesVolume": {
20
- "comment": "Calculates the sales volume based on the marketType uncertain variable. Since salesVolume is based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
21
- "formula": "if(marketType = 1, 50000, if(marketType = 2, 75000, if(marketType = 3, 100000)))"
22
- },
23
- "sellingPrice": {
24
- "comment": "Calculates the product selling price based on the marketType uncertain variable. Since salesVolume is based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
25
- "formula": "if(marketType = 1, 11, if(marketType = 2, 10, if(marketType = 3, 8)))"
26
- },
27
- "grossSales": {
28
- "comment": "Calculates gross sales as a product of selling price and sales volume. Since grossSales is indirectly based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
29
- "formula": "sellingPrice * salesVolume"
30
- },
31
- "totalCosts": {
32
- "comment": "Calculates the total costs as a product of sales volume and unit cost. Since totalCosts is indirectly based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
33
- "formula": "salesVolume * unitCost"
34
- }
35
- },
36
- "data": {
37
- "comment": "The data section holds the constant fixedCosts, which equals $120,000.",
38
- "fixedCosts": {
39
- "value": 120000
40
- }
41
- },
42
- "uncertainFunctions": {
43
- "comment": "The last section, uncertainFunctions, calculates the Net Profit by subtracting totalCosts and fixedCosts from grossSales. Since we want to know the expected (or average) net profit, we ask for the mean in our result. Note that the result of the formula ('grossSales - totalCosts - fixedCosts') is 1,000 scenarios or trials, rather than a single value. The mean that will be returned in the result will be the true average of Net Profit across 1,000 or more scenarios or trials – not a single calculation from average values of the inputs. We could have asked for additional result measures for netProfit such as the minimum function value, maximum function value, standard deviation, variance, median, mode, etc. One, several, or all can be returned in a result. View them in the results under netProfit_statistics. View all 1000 trials under netProfit_trials and view the percentile values under netProfit_percentiles. For a complete list of measures that may be returned please see the chapter RASON Model Components in the RASON Reference Guide.",
44
- "netProfit": {
45
- "formula": "grossSales - totalCosts - fixedCosts",
46
- "mean": [],
47
- "percentiles": [],
48
- "trials": []
49
- }
50
- }
1
+ {
2
+ "modelName": "UGForecastSimExample",
3
+ "modelDescription": "RASON Forecast Simulation Example - This example appears in the Defining Your Simulation MOdel chapter in the RASON User Guide. Imagine that you are the sales manager for a company that is planning to introduce a new product. You need to estimate the first year profit from this product (which depends on the number of unit sales), the price per unit sold, the unit manufacturing cost, and any fixed costs or overhead. You have been advised that the unit manufacturing cost will range between $4.50 and $8.50, with a most-likely cost of $6.50. Based on your market research, you believe it is equally likely that the market demand will be Slow, OK, or Hot.",
4
+ "modelType": "simulation",
5
+ "comment": "When creating any RASON model, our model definition begins with a simple open bracket. Next we see three optional, but strongly recommended, high level properties, modelName, modelDescription and modelType. ModelName assigns a name to the model for easy retrieval later, modelDescription gives a short description of the problem and modelType informs the RASON Server that this model is a simulation model.",
6
+ "uncertainVariables": {
7
+ "comment": "There are two uncertain variables in this model, marketType and unitCost. The unit cost uses the PsiTriangular distribution to model the manufacturing cost while marketType uses the PsiIntUniform distribution to model the market demand. Since these are distributions, there will be 1000 values (the default setting for number of trials) returned for both marketType and unitCost.",
8
+ "marketType": {
9
+ "comment": "Since there are equal chances that the market will be Slow, OK, or Hot, we want to create an uncertain variable that selects among these three possibilities, by drawing a random number – say 1, 2 or 3 – with equal probability. We can do this easily in the RASON modeling language using an integer uniform probability distribution or PsiIntUniform(). Sales Volume and Selling Price will both be based on this uncertain variable. See the marketType uncertain variable in below. A sample drawn from a discrete distribution is always one of a set of discrete values, such as integer values. For more information on this distribution, see the RASON Reference Guide, downloadable from the Help tab. ",
10
+ "formula": "PsiIntUniform(1,3)"
11
+ },
12
+ "unitCost": {
13
+ "comment": "There are not just three, but many possible values for this variable: It can be anywhere from $4.50 to $8.50, with a most likely cost of $6.50. A crude but effective way to model this is to use a triangular distribution. The RASON modeling language provides a function called PsiTriangular() for this distribution (see the unitCost uncertain variable below). For more information on this distribution, see the RASON Reference Guide, downloadable from the Help tab.",
14
+ "formula": "PsiTriangular(4.5, 6.5, 8.5)"
15
+ }
16
+ },
17
+ "formulas": {
18
+ "comment": "The salesVolume and sellingPrice formulas use the value of the PsiIntUniform distribution to determine which market (Slow, OK, or Hot) is selected per trial. If marketType equals 1, the Sales Volume and Selling Price are 50,000 and $11, if marketType equals 2, the Sales Volume and Selling Price are 75,000 and $10 and if marketType equals 3, the Sales Volume and Selling Price are 100,000 and $8.",
19
+ "salesVolume": {
20
+ "comment": "Calculates the sales volume based on the marketType uncertain variable. Since salesVolume is based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
21
+ "formula": "if(marketType = 1, 50000, if(marketType = 2, 75000, if(marketType = 3, 100000)))"
22
+ },
23
+ "sellingPrice": {
24
+ "comment": "Calculates the product selling price based on the marketType uncertain variable. Since salesVolume is based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
25
+ "formula": "if(marketType = 1, 11, if(marketType = 2, 10, if(marketType = 3, 8)))"
26
+ },
27
+ "grossSales": {
28
+ "comment": "Calculates gross sales as a product of selling price and sales volume. Since grossSales is indirectly based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
29
+ "formula": "sellingPrice * salesVolume"
30
+ },
31
+ "totalCosts": {
32
+ "comment": "Calculates the total costs as a product of sales volume and unit cost. Since totalCosts is indirectly based on the marketType uncertain variable, there will be 1000 values returned, not just a single value.",
33
+ "formula": "salesVolume * unitCost"
34
+ }
35
+ },
36
+ "data": {
37
+ "comment": "The data section holds the constant fixedCosts, which equals $120,000.",
38
+ "fixedCosts": {
39
+ "value": 120000
40
+ }
41
+ },
42
+ "uncertainFunctions": {
43
+ "comment": "The last section, uncertainFunctions, calculates the Net Profit by subtracting totalCosts and fixedCosts from grossSales. Since we want to know the expected (or average) net profit, we ask for the mean in our result. Note that the result of the formula ('grossSales - totalCosts - fixedCosts') is 1,000 scenarios or trials, rather than a single value. The mean that will be returned in the result will be the true average of Net Profit across 1,000 or more scenarios or trials – not a single calculation from average values of the inputs. We could have asked for additional result measures for netProfit such as the minimum function value, maximum function value, standard deviation, variance, median, mode, etc. One, several, or all can be returned in a result. View them in the results under netProfit_statistics. View all 1000 trials under netProfit_trials and view the percentile values under netProfit_percentiles. For a complete list of measures that may be returned please see the chapter RASON Model Components in the RASON Reference Guide.",
44
+ "netProfit": {
45
+ "formula": "grossSales - totalCosts - fixedCosts",
46
+ "mean": [],
47
+ "percentiles": [],
48
+ "trials": []
49
+ }
50
+ }
51
51
  }
@@ -1,49 +1,49 @@
1
- {
2
- "modelName": "UGProductMix1_BasicLinearModel",
3
- "modelDescription": "RASON Product Mix Example: UGProductMix1 Example - This example is discussed in the Defining Your Optimization Model chapter. Assume a company manufatures TVs, stereos and speakers, using a common parts inventory of chassis, LOCD screens, speakers power supplies and various internal electronics. Parts are in limited supply. This model works well for the business situation initially described, with exactly three products and five types of parts but it's not very flexible. What if more products were added and more parts were required? In the next example UGProductMix2Example, the model will be generalized so it can handle different numbers of products and parts.",
4
- "modelType": "optimization",
5
- "variables": {
6
- "comment": "In variables, a column vector x of size 3 is defined (x[1], x[2] and x[3]) to hold the number of products to produce. These are the decision variables. The dimensions of an array can be explicitly defined by the dimensions property. However, in the absence of the dimensions property (as in this example), the 'value', 'lower', or 'upper' properties can implicitly define the shape of the array, as is shown here using the 'lower' property. The empty array, finalValue[] tells RASON that we want the results from solving to include the final values of each variable.",
7
- "x": {
8
- "comment": "The decision variables are the number of products of each type to build: x1 for TV sets, x2 for stereos and x3 for speakers. Since a negative number of parts can not be manufactured, a lower bound of 0 is supplied for each variable using the 'lower' property. See the variable final values in the result under x.",
9
- "lower": [ 0, 0, 0 ],
10
- "finalValue": []
11
- }
12
- },
13
- "constraints": {
14
- "comment": "Building each product requires a certain number of parts of each type. For example, TV sets and stereos each require one chassis, but speakers don't use one. The number of parts used depends on the mix of products built (the left hand side of each constraint), and we have a limited number of parts of each type on hand (the corresponding constraint right hand side). Since the number of products built must be nonnegative, we also have the constraints x1, x2, x3 >= 0. Note that terms like 0 x3 are included purely to show the structure of the model – they can be either omitted or included in your data. The 5 constraints are calculated in Constraints by multiplying the decision variables (x[1], x[2] and x[3]) by the number of parts required. The number of parts used must be less than or equal to the number of parts in inventory, so the upper bound for our first constraint is: x[1] * 1 + x[2] * 1 + x[3] * 0 <= 450. The other constraints are similar. Note that both the upper and lower properties only support constant values, no formulas. ",
15
- "chassisUsed": {
16
- "comment": "#Tvs * 1 + #Stereos * 1 + #Speakers * 0 - Each TV and stereo require 1 chassis each. There are 450 chassis on hand in inventory. ",
17
- "formula": "x[1] * 1 + x[2] * 1 + x[3] * 0",
18
- "upper": 450
19
- },
20
- "screensUsed": {
21
- "comment": "#Tvs * 1 + #Stereos * 0 + #Speakers * 0 - Each TV requires screens chassis each. There are 250 screens on hand in inventory. ",
22
- "formula": "x[1] * 1 + x[2] * 0 + x[3] * 0",
23
- "upper": 250
24
- },
25
- "speakersUsed": {
26
- "comment": "#Tvs * 2 + #Stereos * 2 + #Speakers * 1 - Each TV and stereo require 2 speakers each; a speaker only requires 1 speaker part. There are 800 speakers on hand in inventory. ",
27
- "formula": "x[1] * 2 + x[2] * 2 + x[3] * 1",
28
- "upper": 800
29
- },
30
- "powerUsed": {
31
- "comment": "#Tvs * 1 + #Stereos * 1 + #Speakers * 0 - Each TV and stereo require 1 power cord each. There are 450 power cords on hand in inventory. ",
32
- "formula": "x[1] * 1 + x[2] * 1 + x[3] * 0",
33
- "upper": 450
34
- },
35
- "electronicsUsed": {
36
- "comment": "#Tvs * 2 + #Stereos * 1 + #Speakers * 1 - Each TV requires 2 electronic components and each stero and speaker require 1. There are 600 chassis on hand in inventory. ",
37
- "formula": "x[1] * 2 + x[2] * 1 + x[3] * 1",
38
- "upper": 600
39
- }
40
- },
41
- "objective": {
42
- "obj": {
43
- "comment": "There is a fixed profit per unit for each product, so the objective function (the quantity we want to maximize) is: Maximize 75 x1 + 50 x2 + 35 x3 (Profit). See the objective value in the results under obj.",
44
- "type": "maximize",
45
- "formula": "x[1] * 75 + x[2] * 50 + x[3] * 35",
46
- "finalValue": []
47
- }
48
- }
1
+ {
2
+ "modelName": "UGProductMix1_BasicLinearModel",
3
+ "modelDescription": "RASON Product Mix Example: UGProductMix1 Example - This example is discussed in the Defining Your Optimization Model chapter. Assume a company manufatures TVs, stereos and speakers, using a common parts inventory of chassis, LOCD screens, speakers power supplies and various internal electronics. Parts are in limited supply. This model works well for the business situation initially described, with exactly three products and five types of parts but it's not very flexible. What if more products were added and more parts were required? In the next example UGProductMix2Example, the model will be generalized so it can handle different numbers of products and parts.",
4
+ "modelType": "optimization",
5
+ "variables": {
6
+ "comment": "In variables, a column vector x of size 3 is defined (x[1], x[2] and x[3]) to hold the number of products to produce. These are the decision variables. The dimensions of an array can be explicitly defined by the dimensions property. However, in the absence of the dimensions property (as in this example), the 'value', 'lower', or 'upper' properties can implicitly define the shape of the array, as is shown here using the 'lower' property. The empty array, finalValue[] tells RASON that we want the results from solving to include the final values of each variable.",
7
+ "x": {
8
+ "comment": "The decision variables are the number of products of each type to build: x1 for TV sets, x2 for stereos and x3 for speakers. Since a negative number of parts can not be manufactured, a lower bound of 0 is supplied for each variable using the 'lower' property. See the variable final values in the result under x.",
9
+ "lower": [ 0, 0, 0 ],
10
+ "finalValue": []
11
+ }
12
+ },
13
+ "constraints": {
14
+ "comment": "Building each product requires a certain number of parts of each type. For example, TV sets and stereos each require one chassis, but speakers don't use one. The number of parts used depends on the mix of products built (the left hand side of each constraint), and we have a limited number of parts of each type on hand (the corresponding constraint right hand side). Since the number of products built must be nonnegative, we also have the constraints x1, x2, x3 >= 0. Note that terms like 0 x3 are included purely to show the structure of the model – they can be either omitted or included in your data. The 5 constraints are calculated in Constraints by multiplying the decision variables (x[1], x[2] and x[3]) by the number of parts required. The number of parts used must be less than or equal to the number of parts in inventory, so the upper bound for our first constraint is: x[1] * 1 + x[2] * 1 + x[3] * 0 <= 450. The other constraints are similar. Note that both the upper and lower properties only support constant values, no formulas. ",
15
+ "chassisUsed": {
16
+ "comment": "#Tvs * 1 + #Stereos * 1 + #Speakers * 0 - Each TV and stereo require 1 chassis each. There are 450 chassis on hand in inventory. ",
17
+ "formula": "x[1] * 1 + x[2] * 1 + x[3] * 0",
18
+ "upper": 450
19
+ },
20
+ "screensUsed": {
21
+ "comment": "#Tvs * 1 + #Stereos * 0 + #Speakers * 0 - Each TV requires screens chassis each. There are 250 screens on hand in inventory. ",
22
+ "formula": "x[1] * 1 + x[2] * 0 + x[3] * 0",
23
+ "upper": 250
24
+ },
25
+ "speakersUsed": {
26
+ "comment": "#Tvs * 2 + #Stereos * 2 + #Speakers * 1 - Each TV and stereo require 2 speakers each; a speaker only requires 1 speaker part. There are 800 speakers on hand in inventory. ",
27
+ "formula": "x[1] * 2 + x[2] * 2 + x[3] * 1",
28
+ "upper": 800
29
+ },
30
+ "powerUsed": {
31
+ "comment": "#Tvs * 1 + #Stereos * 1 + #Speakers * 0 - Each TV and stereo require 1 power cord each. There are 450 power cords on hand in inventory. ",
32
+ "formula": "x[1] * 1 + x[2] * 1 + x[3] * 0",
33
+ "upper": 450
34
+ },
35
+ "electronicsUsed": {
36
+ "comment": "#Tvs * 2 + #Stereos * 1 + #Speakers * 1 - Each TV requires 2 electronic components and each stero and speaker require 1. There are 600 chassis on hand in inventory. ",
37
+ "formula": "x[1] * 2 + x[2] * 1 + x[3] * 1",
38
+ "upper": 600
39
+ }
40
+ },
41
+ "objective": {
42
+ "obj": {
43
+ "comment": "There is a fixed profit per unit for each product, so the objective function (the quantity we want to maximize) is: Maximize 75 x1 + 50 x2 + 35 x3 (Profit). See the objective value in the results under obj.",
44
+ "type": "maximize",
45
+ "formula": "x[1] * 75 + x[2] * 50 + x[3] * 35",
46
+ "finalValue": []
47
+ }
48
+ }
49
49
  }
@@ -1,49 +1,49 @@
1
- {
2
- "modelName": "UGProductMix2_ImprovedLinearModel",
3
- "modelDescription": "RASON Product Mix Example: UGProductMix2 Example - This example is discussed in the Defining Your Optimization chapter within the RASON User Guide. See 'The Improve Model' section within the chapter. One way to make the original product mix model (UGProductMix1Example) more flexible is to use RASON's built-in functions that operate on all the elements of an array at once, treating it as a vector or matrix. With this version of the model, if the number of parts or products are increased or decreased, you will need to adjust the size of your arrays, but no changes will be needed for the constraints formula which can sometimes be the hardest part of the model to define.",
4
- "modelType": "optimization",
5
- "variables": {
6
- "comment": "In the variables section, we again define a column vector x of size 3 but this time the dimensions property is used to explicitly define the size of the array. As a result, we can pass a single value to the lower property applying a lower bound of 0 to all three elements of the x array. Again, the empty array, finalValue:[] tells the RASON system that you want the results from solving to include the final values of each variable.",
7
- "X": {
8
- "dimensions": [ 3 ],
9
- "lower": 0,
10
- "finalValue": []
11
- }
12
- },
13
- "data": {
14
- "profit": {
15
- "dimensions": [ 3, 1 ],
16
- "value": [ 75, 50, 35 ],
17
- "finalValue": []
18
- },
19
- "parts": {
20
- "dimensions": [ 5, 3 ],
21
- "value": [
22
- [ 1, 1, 0 ],
23
- [ 1, 0, 0 ],
24
- [ 2, 2, 1 ],
25
- [ 1, 1, 0 ],
26
- [ 2, 1, 1 ]
27
- ]
28
- },
29
- "inventory": {
30
- "value": [ 450, 250, 800, 450, 600 ]
31
- }
32
- },
33
- "constraints": {
34
- "comment": "In the original example (UGProductMix1Example), the 5 constraints were calculated using explicit formulas such as 'x[1] * 1 + x[2] * 1 + x[3] * 0'. In this model, three arrays are created in the 'data' section to hold the information for the model: profits (to hold the profit margin of each product), inventory (to hold the available inventory) and parts (a matrix holding the part requirements for each product). Note: The RASON Language Interpreter currently ONLY supports constants, a name with constant values, or a named array of constants for the lower and upper arguments.",
35
- "numUsed": {
36
- "comment": "The MMULT function in the num_used constraint multiplies the matrix parts (with 5 rows and 3 columns) by the column vector x. The product of this multiplication is a column vector with 5 rows which must be less than the column vector, inventory.",
37
- "dimensions": [ 5 ],
38
- "formula": "MMULT(parts, X)",
39
- "upper": "inventory"
40
- }
41
- },
42
- "objective": {
43
- "total": {
44
- "type": "maximize",
45
- "formula": "sumproduct(X, profit)",
46
- "finalValue": []
47
- }
48
- }
1
+ {
2
+ "modelName": "UGProductMix2_ImprovedLinearModel",
3
+ "modelDescription": "RASON Product Mix Example: UGProductMix2 Example - This example is discussed in the Defining Your Optimization chapter within the RASON User Guide. See 'The Improve Model' section within the chapter. One way to make the original product mix model (UGProductMix1Example) more flexible is to use RASON's built-in functions that operate on all the elements of an array at once, treating it as a vector or matrix. With this version of the model, if the number of parts or products are increased or decreased, you will need to adjust the size of your arrays, but no changes will be needed for the constraints formula which can sometimes be the hardest part of the model to define.",
4
+ "modelType": "optimization",
5
+ "variables": {
6
+ "comment": "In the variables section, we again define a column vector x of size 3 but this time the dimensions property is used to explicitly define the size of the array. As a result, we can pass a single value to the lower property applying a lower bound of 0 to all three elements of the x array. Again, the empty array, finalValue:[] tells the RASON system that you want the results from solving to include the final values of each variable.",
7
+ "X": {
8
+ "dimensions": [ 3 ],
9
+ "lower": 0,
10
+ "finalValue": []
11
+ }
12
+ },
13
+ "data": {
14
+ "profit": {
15
+ "dimensions": [ 3, 1 ],
16
+ "value": [ 75, 50, 35 ],
17
+ "finalValue": []
18
+ },
19
+ "parts": {
20
+ "dimensions": [ 5, 3 ],
21
+ "value": [
22
+ [ 1, 1, 0 ],
23
+ [ 1, 0, 0 ],
24
+ [ 2, 2, 1 ],
25
+ [ 1, 1, 0 ],
26
+ [ 2, 1, 1 ]
27
+ ]
28
+ },
29
+ "inventory": {
30
+ "value": [ 450, 250, 800, 450, 600 ]
31
+ }
32
+ },
33
+ "constraints": {
34
+ "comment": "In the original example (UGProductMix1Example), the 5 constraints were calculated using explicit formulas such as 'x[1] * 1 + x[2] * 1 + x[3] * 0'. In this model, three arrays are created in the 'data' section to hold the information for the model: profits (to hold the profit margin of each product), inventory (to hold the available inventory) and parts (a matrix holding the part requirements for each product). Note: The RASON Language Interpreter currently ONLY supports constants, a name with constant values, or a named array of constants for the lower and upper arguments.",
35
+ "numUsed": {
36
+ "comment": "The MMULT function in the num_used constraint multiplies the matrix parts (with 5 rows and 3 columns) by the column vector x. The product of this multiplication is a column vector with 5 rows which must be less than the column vector, inventory.",
37
+ "dimensions": [ 5 ],
38
+ "formula": "MMULT(parts, X)",
39
+ "upper": "inventory"
40
+ }
41
+ },
42
+ "objective": {
43
+ "total": {
44
+ "type": "maximize",
45
+ "formula": "sumproduct(X, profit)",
46
+ "finalValue": []
47
+ }
48
+ }
49
49
  }
@@ -1,68 +1,68 @@
1
- {
2
- "modelName": "UGProductMixTable1",
3
- "modelDescription": "RASON Product Mix Example: Arrays in the RASON Modeling language are limited to 2-dimensions. If you require an array containing more than 2-dimensions, a table may be created. There are many advantages to using tables: 1. Tables may hold more than 2 dimensions, 2. A table result may be used in an indexed array formula, 3. A table can be sparse while an array is dense, 4. The evaluation of a table is less expensive (time consuming) than the evaluation of an array with more than 2 dimensions. In this example, the matrix above has been specified in line (within the RASON model) as the parts table. This table contains 15 elements and is indexed using two dimensions: part and prod. Note that this table is DENSE, meaning that zero values have been supplied as well as non-zero values. See the next example, UGProductMixTable2 to see an example of a SPARSE table, meaning only non-zero values are supplied. (To open this full example, and any example referenced in this guide, click the down array under RASON examples -- Examples discussed in the RASON User Guide.)",
4
- "modelType": "optimization",
5
- "data": {
6
- "parts": {
7
- "comment": "Notice that even though the parts table is listed horizontally in the RASON model, the table elements are stored in a vertical array.",
8
- "indexCols": ["part", "prod"],
9
- "value": [
10
- ["chas", "tv", 1],
11
- ["elec", "stereo", 1],
12
- ["tube", "tv", 1],
13
- ["cone", "tv", 2],
14
- ["cone", "stereo", 2],
15
- ["chas", "stereo", 1],
16
- ["cone", "speaker", 1],
17
- ["psup", "tv", 1],
18
- ["psup", "stereo", 1],
19
- ["elec", "tv", 2],
20
- ["elec", "speaker", 1]
21
- ]
22
- },
23
- "profits": {
24
- "value": [75, 50, 35],
25
- "binding": "get",
26
- "finalValue": []
27
- }
28
- },
29
- "variables": {
30
- "x": {
31
- "comment": "The x array, dimensioned using the index column prod, is an array of size 3 containing the decision values x[1], x[2] and x[3]. These are the number of each product to produce.",
32
- "dimensions": ["prod"],
33
- "value": 0,
34
- "lower": 0,
35
- "finalValue": []
36
- }
37
- },
38
- "constraints": {
39
- "comment": "Five constraints are formulated by 'slicing' the table to obtain the correct part data. For example, in the first constraint, c1, parts['chas', ] slices the table across the part chas which results in the elements: 1, 1, 0. The second constraint, c2, slices the table across tube obtaining the elements 1, 0, 0. Constraints c3, c4 and c5 are calculated in the same fashion.",
40
- "c1": {
41
- "formula": "sumproduct(parts['chas',], x)",
42
- "upper": 450
43
- },
44
- "c2": {
45
- "formula": "sumproduct(parts['tube',], x)",
46
- "upper": 250
47
- },
48
- "c3": {
49
- "formula": "sumproduct(parts['cone',], x)",
50
- "upper": 800
51
- },
52
- "c4": {
53
- "formula": "sumproduct(parts['psup',], x)",
54
- "upper": 450
55
- },
56
- "c5": {
57
- "formula": "sumproduct(parts['elec',], x)",
58
- "upper": 600
59
- }
60
- },
61
- "objective": {
62
- "total": {
63
- "formula": "sumproduct(x, profits)",
64
- "type": "maximize",
65
- "finalValue": []
66
- }
67
- }
1
+ {
2
+ "modelName": "UGProductMixTable1",
3
+ "modelDescription": "RASON Product Mix Example: Arrays in the RASON Modeling language are limited to 2-dimensions. If you require an array containing more than 2-dimensions, a table may be created. There are many advantages to using tables: 1. Tables may hold more than 2 dimensions, 2. A table result may be used in an indexed array formula, 3. A table can be sparse while an array is dense, 4. The evaluation of a table is less expensive (time consuming) than the evaluation of an array with more than 2 dimensions. In this example, the matrix above has been specified in line (within the RASON model) as the parts table. This table contains 15 elements and is indexed using two dimensions: part and prod. Note that this table is DENSE, meaning that zero values have been supplied as well as non-zero values. See the next example, UGProductMixTable2 to see an example of a SPARSE table, meaning only non-zero values are supplied. (To open this full example, and any example referenced in this guide, click the down array under RASON examples -- Examples discussed in the RASON User Guide.)",
4
+ "modelType": "optimization",
5
+ "data": {
6
+ "parts": {
7
+ "comment": "Notice that even though the parts table is listed horizontally in the RASON model, the table elements are stored in a vertical array.",
8
+ "indexCols": ["part", "prod"],
9
+ "value": [
10
+ ["chas", "tv", 1],
11
+ ["elec", "stereo", 1],
12
+ ["tube", "tv", 1],
13
+ ["cone", "tv", 2],
14
+ ["cone", "stereo", 2],
15
+ ["chas", "stereo", 1],
16
+ ["cone", "speaker", 1],
17
+ ["psup", "tv", 1],
18
+ ["psup", "stereo", 1],
19
+ ["elec", "tv", 2],
20
+ ["elec", "speaker", 1]
21
+ ]
22
+ },
23
+ "profits": {
24
+ "value": [75, 50, 35],
25
+ "binding": "get",
26
+ "finalValue": []
27
+ }
28
+ },
29
+ "variables": {
30
+ "x": {
31
+ "comment": "The x array, dimensioned using the index column prod, is an array of size 3 containing the decision values x[1], x[2] and x[3]. These are the number of each product to produce.",
32
+ "dimensions": ["prod"],
33
+ "value": 0,
34
+ "lower": 0,
35
+ "finalValue": []
36
+ }
37
+ },
38
+ "constraints": {
39
+ "comment": "Five constraints are formulated by 'slicing' the table to obtain the correct part data. For example, in the first constraint, c1, parts['chas', ] slices the table across the part chas which results in the elements: 1, 1, 0. The second constraint, c2, slices the table across tube obtaining the elements 1, 0, 0. Constraints c3, c4 and c5 are calculated in the same fashion.",
40
+ "c1": {
41
+ "formula": "sumproduct(parts['chas',], x)",
42
+ "upper": 450
43
+ },
44
+ "c2": {
45
+ "formula": "sumproduct(parts['tube',], x)",
46
+ "upper": 250
47
+ },
48
+ "c3": {
49
+ "formula": "sumproduct(parts['cone',], x)",
50
+ "upper": 800
51
+ },
52
+ "c4": {
53
+ "formula": "sumproduct(parts['psup',], x)",
54
+ "upper": 450
55
+ },
56
+ "c5": {
57
+ "formula": "sumproduct(parts['elec',], x)",
58
+ "upper": 600
59
+ }
60
+ },
61
+ "objective": {
62
+ "total": {
63
+ "formula": "sumproduct(x, profits)",
64
+ "type": "maximize",
65
+ "finalValue": []
66
+ }
67
+ }
68
68
  }
@@ -1,77 +1,77 @@
1
- {
2
- "modelName": "UGProductMixTable2",
3
- "modelDescription": "RASON Product Mix Example: This example solves the same model as UGProductMixTable1, with two modifications. 1. Instead of passing a DENSE table, in which both zero and non-zero elements are passed in the parts table, this example passes a SPARSE table where only non-zero elements are passed. 2. This example model illustrates how to use an index set to dimension a table. RASON uses index sets exclusively to dimension tables and arrays.",
4
- "modelType": "optimization",
5
- "indexSets": {
6
- "comment": "The indexSets section is used exclusively to dimension tables and arrays. Typical mathematical programming models include multiple tables and arrays indexed over various index sets. An index set should be created at the beginning of the model to establish a basis of order for each dimension appearing in a table or array. Otherwise, the user will be required to keep track of and maintain the correct order of elements in all arrays and tables present in the model. An index set is always a 1-dimensional array and must be defined within the indexSets section of the RASON model. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
7
- "part": {
8
- "comment": "The example code below creates the part ordered set. The part set contains five items (in order as entered): chas, tube, cone, psup and elec. while the prod set contains 3 items: tv, stereo and speakers. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
9
- "value": ["chas", "tube", "cone", "psup", "elec"]
10
- },
11
- "prod": {
12
- "comment": "The example code below creates the prod ordered set. The prod set contains 3 items: tv, stereo and speakers. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
13
- "value": ["tv", "stereo", "speaker"]
14
- }
15
- },
16
- "data": {
17
- "comment": "In the data section, an inline table object, parts, is created containing two index columns (parts and prods) and a value column. Since the index set prod exists, we can dimension the profits array according to this set in order to assign the correct profit values to the appropriate products. Likewise, we can dimension the inventory array according to the part set in order to assign the correct inventory level to each part. See UGProductMixTable3 for an illustration of the sort property.",
18
- "parts": {
19
- "comment": "Note that the order in which the table elements are entered is irrelevant since we are supplying both dimensions for each value. ",
20
- "indexCols": ["part", "prod"],
21
- "value": [
22
- ["chas", "tv", 1],
23
- ["elec", "stereo", 1],
24
- ["tube", "tv", 1],
25
- ["cone", "tv", 2],
26
- ["cone", "stereo", 2],
27
- ["chas", "stereo", 1],
28
- ["cone", "speaker", 1],
29
- ["psup", "tv", 1],
30
- ["psup", "stereo", 1],
31
- ["elec", "tv", 2],
32
- ["elec", "speaker", 1]
33
- ]
34
- },
35
- "profits": {
36
- "dimensions": ["prod"],
37
- "value": [75, 50, 35],
38
- "binding": "get",
39
- "finalValue": []
40
- },
41
- "inventory": {
42
- "dimensions": ["part"],
43
- "value": [450, 250, 800, 450, 600],
44
- "binding": "get",
45
- "finalValue": []
46
- }
47
- },
48
- "formulas": {
49
- "comment": "Notice the use of the PIVOT function in the piv_parts formula. Recall that a table is stored as a vertical array. The PIVOT function returns a 2-dimensional table (or a 1- dimensional table) of values with rows and columns assigned by the index columns in the table passed as the first argument. (The first argument passes the data.) The second argument is the index column(s) to be assigned as column(s) in the PIVOT table. (These are the dimensions that will make up the columns of the table.) The third argument is the index column(s) to be assigned as row(s) in the PIVOT table. (These are the dimensions that will make up the rows of the table.) In this example, the table parts contains two index columns, parts and prods. The PIVOT function creates a 2-dimensional array of values by assigning the prod dimension (TV, Stereos and Speakers) as columns and the part dimension(chas, cone, elec, psup and tube) as rows. The result is a 5 x 3 matrix. Since piv_parts is now a 2-dimensional table, we can perform matrix multiplication using the MMULT (inherited from Excel) function to multiply this table by the variable array, x (which is also a vertical array). The result of this operation is a vertical array of size 5 which must be less than the inventory array (enforced by the upper property of 0). ",
50
- "piv_parts": {
51
- "formula": "PIVOT(parts, { 'prod' }, { 'part' })"
52
- }
53
- },
54
- "variables": {
55
- "comment":"The x array is dimensioned using the prod index.",
56
- "x": {
57
- "dimensions": ["prod"],
58
- "value": 0,
59
- "lower": 0,
60
- "finalValue": []
61
- }
62
- },
63
- "constraints": {
64
- "c": {
65
- "dimensions": ["part"],
66
- "formula": "MMULT(piv_parts, x) - inventory",
67
- "upper": 0
68
- }
69
- },
70
- "objective": {
71
- "total": {
72
- "formula": "sumproduct(x, profits)",
73
- "type": "maximize",
74
- "finalValue": []
75
- }
76
- }
1
+ {
2
+ "modelName": "UGProductMixTable2",
3
+ "modelDescription": "RASON Product Mix Example: This example solves the same model as UGProductMixTable1, with two modifications. 1. Instead of passing a DENSE table, in which both zero and non-zero elements are passed in the parts table, this example passes a SPARSE table where only non-zero elements are passed. 2. This example model illustrates how to use an index set to dimension a table. RASON uses index sets exclusively to dimension tables and arrays.",
4
+ "modelType": "optimization",
5
+ "indexSets": {
6
+ "comment": "The indexSets section is used exclusively to dimension tables and arrays. Typical mathematical programming models include multiple tables and arrays indexed over various index sets. An index set should be created at the beginning of the model to establish a basis of order for each dimension appearing in a table or array. Otherwise, the user will be required to keep track of and maintain the correct order of elements in all arrays and tables present in the model. An index set is always a 1-dimensional array and must be defined within the indexSets section of the RASON model. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
7
+ "part": {
8
+ "comment": "The example code below creates the part ordered set. The part set contains five items (in order as entered): chas, tube, cone, psup and elec. while the prod set contains 3 items: tv, stereo and speakers. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
9
+ "value": ["chas", "tube", "cone", "psup", "elec"]
10
+ },
11
+ "prod": {
12
+ "comment": "The example code below creates the prod ordered set. The prod set contains 3 items: tv, stereo and speakers. For more information on index sets, see the Index Sets section within the RASON Reference Guide.",
13
+ "value": ["tv", "stereo", "speaker"]
14
+ }
15
+ },
16
+ "data": {
17
+ "comment": "In the data section, an inline table object, parts, is created containing two index columns (parts and prods) and a value column. Since the index set prod exists, we can dimension the profits array according to this set in order to assign the correct profit values to the appropriate products. Likewise, we can dimension the inventory array according to the part set in order to assign the correct inventory level to each part. See UGProductMixTable3 for an illustration of the sort property.",
18
+ "parts": {
19
+ "comment": "Note that the order in which the table elements are entered is irrelevant since we are supplying both dimensions for each value. ",
20
+ "indexCols": ["part", "prod"],
21
+ "value": [
22
+ ["chas", "tv", 1],
23
+ ["elec", "stereo", 1],
24
+ ["tube", "tv", 1],
25
+ ["cone", "tv", 2],
26
+ ["cone", "stereo", 2],
27
+ ["chas", "stereo", 1],
28
+ ["cone", "speaker", 1],
29
+ ["psup", "tv", 1],
30
+ ["psup", "stereo", 1],
31
+ ["elec", "tv", 2],
32
+ ["elec", "speaker", 1]
33
+ ]
34
+ },
35
+ "profits": {
36
+ "dimensions": ["prod"],
37
+ "value": [75, 50, 35],
38
+ "binding": "get",
39
+ "finalValue": []
40
+ },
41
+ "inventory": {
42
+ "dimensions": ["part"],
43
+ "value": [450, 250, 800, 450, 600],
44
+ "binding": "get",
45
+ "finalValue": []
46
+ }
47
+ },
48
+ "formulas": {
49
+ "comment": "Notice the use of the PIVOT function in the piv_parts formula. Recall that a table is stored as a vertical array. The PIVOT function returns a 2-dimensional table (or a 1- dimensional table) of values with rows and columns assigned by the index columns in the table passed as the first argument. (The first argument passes the data.) The second argument is the index column(s) to be assigned as column(s) in the PIVOT table. (These are the dimensions that will make up the columns of the table.) The third argument is the index column(s) to be assigned as row(s) in the PIVOT table. (These are the dimensions that will make up the rows of the table.) In this example, the table parts contains two index columns, parts and prods. The PIVOT function creates a 2-dimensional array of values by assigning the prod dimension (TV, Stereos and Speakers) as columns and the part dimension(chas, cone, elec, psup and tube) as rows. The result is a 5 x 3 matrix. Since piv_parts is now a 2-dimensional table, we can perform matrix multiplication using the MMULT (inherited from Excel) function to multiply this table by the variable array, x (which is also a vertical array). The result of this operation is a vertical array of size 5 which must be less than the inventory array (enforced by the upper property of 0). ",
50
+ "piv_parts": {
51
+ "formula": "PIVOT(parts, { 'prod' }, { 'part' })"
52
+ }
53
+ },
54
+ "variables": {
55
+ "comment":"The x array is dimensioned using the prod index.",
56
+ "x": {
57
+ "dimensions": ["prod"],
58
+ "value": 0,
59
+ "lower": 0,
60
+ "finalValue": []
61
+ }
62
+ },
63
+ "constraints": {
64
+ "c": {
65
+ "dimensions": ["part"],
66
+ "formula": "MMULT(piv_parts, x) - inventory",
67
+ "upper": 0
68
+ }
69
+ },
70
+ "objective": {
71
+ "total": {
72
+ "formula": "sumproduct(x, profits)",
73
+ "type": "maximize",
74
+ "finalValue": []
75
+ }
76
+ }
77
77
  }