@frontlinesystems/rason-mcp-server 2026.5.1 → 2026.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/LICENSE +35 -35
  2. package/examples/EXAMPLES_REFERENCE.md +128 -128
  3. package/examples/{optimization → Optimization}/Conic/AirlineHubConic.json +111 -111
  4. package/examples/{optimization → Optimization}/Conic/AirlineHubConic2.json +108 -108
  5. package/examples/{optimization → Optimization}/Conic/AirlineHubConic3.json +111 -111
  6. package/examples/{optimization → Optimization}/Conic/AirlineHubConic4.json +99 -99
  7. package/examples/{optimization → Optimization}/Conic/AirlineHubConic5.json +101 -101
  8. package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv.json +81 -81
  9. package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv4.json +96 -96
  10. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel.json +73 -73
  11. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel1.json +86 -86
  12. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel11.json +108 -108
  13. package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel2.json +77 -77
  14. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab.json +89 -89
  15. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab1.json +73 -73
  16. package/examples/{optimization → Optimization}/DataBinding/ProductMixTab2.json +77 -77
  17. package/examples/{optimization → Optimization}/Linear/Inventory.json +199 -199
  18. package/examples/{optimization → Optimization}/Linear/Matop.json +119 -119
  19. package/examples/{optimization → Optimization}/Linear/ProductMix.json +97 -97
  20. package/examples/{optimization → Optimization}/Linear/ProductMix2.json +72 -72
  21. package/examples/{optimization → Optimization}/Linear/ProductMix3.json +49 -49
  22. package/examples/{optimization → Optimization}/Linear/ProductMix4.json +56 -56
  23. package/examples/{optimization → Optimization}/Linear/ProductMixCsv1.json +106 -106
  24. package/examples/{optimization → Optimization}/Linear/ProductMixCsv2.json +106 -106
  25. package/examples/{optimization → Optimization}/Linear/ProductMixSQL11.json +82 -82
  26. package/examples/{optimization → Optimization}/Linear/Rowop.json +126 -126
  27. package/examples/{optimization → Optimization}/NonLinear/AirlineHub.json +63 -63
  28. package/examples/{optimization → Optimization}/NonLinear/AirlineHub2.json +47 -47
  29. package/examples/{optimization → Optimization}/NonLinear/AirlineHub3.json +47 -47
  30. package/examples/{optimization → Optimization}/NonSmooth/Inventory2.json +159 -159
  31. package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt.json +55 -55
  32. package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt2.json +65 -65
  33. package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyChance.json +78 -78
  34. package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyRecourse.json +78 -78
  35. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect.json +77 -77
  36. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect2.json +81 -81
  37. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect3.json +84 -84
  38. package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect4.json +74 -74
  39. package/examples/{simulation → Simulation}/CandyStoreSalesUsingSIP.json +147 -147
  40. package/examples/{simulation → Simulation}/CollegeFundGrowth1.json +423 -423
  41. package/examples/{simulation → Simulation}/CollegeFundGrowth1SIPModel.json +27 -27
  42. package/examples/{simulation → Simulation}/CollegeFundGrowth2.json +415 -415
  43. package/examples/{simulation → Simulation}/CollegeFundGrowthSIP.json +401 -401
  44. package/examples/{simulation → Simulation}/GBMSimulationModel.json +236 -236
  45. package/examples/{simulation → Simulation}/YieldManagement(Sim).json +69 -69
  46. package/examples/{simulation → Simulation}/YieldManagement2(Sim).json +72 -72
  47. package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +53 -53
  48. package/examples/calculation/DMNExamples/DMN Context example.json +69 -69
  49. package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -43
  50. package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -28
  51. package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -66
  52. package/examples/calculation/DMNExamples/FEEL For with two indices.json +15 -15
  53. package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -88
  54. package/examples/calculation/DMNExamples/FEEL If Then Else example.json +25 -25
  55. package/examples/calculation/DMNExamples/FEEL List example.json +37 -37
  56. package/examples/calculation/DMNExamples/FEEL List operator.json +17 -17
  57. package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +36 -36
  58. package/examples/calculation/DMNExamples/FEEL Some or Every example.json +65 -65
  59. package/examples/calculation/DecisionTables/DT Datasource example.json +52 -52
  60. package/examples/calculation/DecisionTables/DT Date and Time examples.json +91 -91
  61. package/examples/calculation/DecisionTables/DT Expression example.json +32 -32
  62. package/examples/calculation/DecisionTables/DT Hit Policy examples.json +136 -136
  63. package/examples/calculation/DecisionTables/DT Loan Recommend model.json +81 -81
  64. package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +218 -218
  65. package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -286
  66. package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +203 -203
  67. package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -214
  68. package/examples/calculation/DecisionTables/DT Output Order example.json +39 -39
  69. package/examples/calculation/DecisionTables/DT Unique example.json +38 -38
  70. package/examples/calculation/TypeDefinitions/TypeDefCF.json +64 -64
  71. package/examples/calculation/TypeDefinitions/TypeDefDT.json +57 -57
  72. package/examples/datamining/AffinityAnalysis/AssociationRules.json +51 -51
  73. package/examples/datamining/Classification/DecisionTree.json +90 -90
  74. package/examples/datamining/Classification/DiscriminantAnalysis.json +81 -81
  75. package/examples/datamining/Classification/Ensembles/Bagging.json +66 -66
  76. package/examples/datamining/Classification/Ensembles/Boosting.json +67 -67
  77. package/examples/datamining/Classification/Ensembles/RandomTrees.json +91 -91
  78. package/examples/datamining/Classification/FindBestModel.json +86 -86
  79. package/examples/datamining/Classification/LogisticRegression.json +82 -82
  80. package/examples/datamining/Classification/NaiveBayes.json +78 -78
  81. package/examples/datamining/Classification/NearestNeighbors.json +84 -84
  82. package/examples/datamining/Classification/NeuralNetwork.json +92 -92
  83. package/examples/datamining/Clustering/Hierarchical.json +54 -54
  84. package/examples/datamining/Clustering/KMeans.json +71 -71
  85. package/examples/datamining/DataSources/DelimitedFile.json +49 -49
  86. package/examples/datamining/DataSources/JSONFile.json +49 -49
  87. package/examples/datamining/DataSources/MSAccessDatabase.json +49 -49
  88. package/examples/datamining/DataSources/MSExcelTable.json +50 -50
  89. package/examples/datamining/DataSources/MSSQLDatabase.json +49 -49
  90. package/examples/datamining/DataSources/ODATATable.json +49 -49
  91. package/examples/datamining/DataSources/ODBCDatabase.json +49 -49
  92. package/examples/datamining/FeatureSelection/LinearWrapping.json +53 -53
  93. package/examples/datamining/FeatureSelection/LogisticWrapping.json +56 -56
  94. package/examples/datamining/FeatureSelection/Univariate.json +78 -78
  95. package/examples/datamining/Regression/DecisionTree.json +82 -82
  96. package/examples/datamining/Regression/Ensembles/Bagging.json +62 -62
  97. package/examples/datamining/Regression/Ensembles/Boosting.json +62 -62
  98. package/examples/datamining/Regression/Ensembles/RandomTrees.json +78 -78
  99. package/examples/datamining/Regression/FindBestModel.json +86 -86
  100. package/examples/datamining/Regression/LinearRegression.json +124 -124
  101. package/examples/datamining/Regression/NearestNeighbors.json +77 -77
  102. package/examples/datamining/Regression/NeuralNetwork.json +82 -82
  103. package/examples/datamining/Scoring/JSONClassifier.json +62 -62
  104. package/examples/datamining/Scoring/JSONClassifierNN.json +62 -62
  105. package/examples/datamining/Scoring/JSONClusterizer.json +37 -37
  106. package/examples/datamining/Scoring/JSONForecaster.json +49 -49
  107. package/examples/datamining/Scoring/JSONLinearRegression.json +56 -56
  108. package/examples/datamining/Scoring/JSONPCA.json +41 -41
  109. package/examples/datamining/Scoring/JSONRegressor.json +56 -56
  110. package/examples/datamining/Scoring/JSONTransformer.json +38 -38
  111. package/examples/datamining/Scoring/PMMLClassifier.json +42 -42
  112. package/examples/datamining/Scoring/PMMLForecaster.json +43 -43
  113. package/examples/datamining/Scoring/PMMLRegressor.json +38 -38
  114. package/examples/datamining/Scoring/PMMLTransformer.json +38 -38
  115. package/examples/datamining/Simulation/LinearRegressionSimulation.json +117 -117
  116. package/examples/datamining/Simulation/SyntheticDataGeneration.json +108 -108
  117. package/examples/datamining/Simulation/pmml-risk-scoring.json +62 -62
  118. package/examples/datamining/Summarizer/Summarization.json +54 -54
  119. package/examples/datamining/TextMining/LatentSemanticAnalysis.json +51 -51
  120. package/examples/datamining/TextMining/TfIdf-FileData.json +65 -65
  121. package/examples/datamining/TextMining/TfIdf-InlineData.json +55 -55
  122. package/examples/datamining/TimeSeries/AddHoltWinters.json +79 -79
  123. package/examples/datamining/TimeSeries/Arima.json +74 -74
  124. package/examples/datamining/TimeSeries/DoubleExponential.json +65 -65
  125. package/examples/datamining/TimeSeries/Exponential.json +64 -64
  126. package/examples/datamining/TimeSeries/LagAnalysis.json +48 -48
  127. package/examples/datamining/TimeSeries/MovingAverage.json +65 -65
  128. package/examples/datamining/TimeSeries/MulHoltWinters.json +65 -65
  129. package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +65 -65
  130. package/examples/datamining/Transformation/Binning.json +69 -69
  131. package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +47 -47
  132. package/examples/datamining/Transformation/CategoryReduction.json +51 -51
  133. package/examples/datamining/Transformation/Factorization.json +50 -50
  134. package/examples/datamining/Transformation/MissingDataHandling.json +83 -83
  135. package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +54 -54
  136. package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +48 -48
  137. package/examples/datamining/Transformation/PartitionTimeSeries.json +48 -48
  138. package/examples/datamining/Transformation/Partitioning-DF.json +72 -72
  139. package/examples/datamining/Transformation/Partitioning.json +46 -46
  140. package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +65 -65
  141. package/examples/datamining/Transformation/PartitioningWithOversampling.json +44 -44
  142. package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +52 -52
  143. package/examples/datamining/Transformation/Rescaling.json +67 -67
  144. package/examples/datamining/Transformation/Sampling.json +43 -43
  145. package/examples/datamining/Transformation/StratifiedSampling.json +46 -46
  146. package/examples/flow/SQLServerTransform.json +260 -260
  147. package/examples/flow/dm-calc-pipeline.json +277 -277
  148. package/examples/flow/dm-pipeline-simulation.json +113 -113
  149. package/examples/flow/opt-sim-pipeline.json +159 -159
  150. package/examples/flow/sim-dm-pipeline.json +106 -106
  151. package/examples/flow/sim-sim-pipeline.json +136 -136
  152. package/examples/index.json +4678 -4678
  153. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +52 -52
  154. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +57 -57
  155. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +35 -35
  156. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +33 -33
  157. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +25 -25
  158. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +47 -47
  159. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +69 -69
  160. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +49 -49
  161. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +337 -337
  162. package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +61 -61
  163. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +190 -190
  164. package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +75 -75
  165. package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +108 -108
  166. package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +68 -68
  167. package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -183
  168. package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -79
  169. package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +154 -154
  170. package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +118 -118
  171. package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +142 -142
  172. package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +81 -81
  173. package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -69
  174. package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +113 -113
  175. package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +107 -107
  176. package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -117
  177. package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -108
  178. package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -67
  179. package/examples/rason-features/UserGuide/UGForecast.json +50 -50
  180. package/examples/rason-features/UserGuide/UGProductMix1.json +48 -48
  181. package/examples/rason-features/UserGuide/UGProductMix2.json +48 -48
  182. package/examples/rason-features/UserGuide/UGProductMixTab1.json +67 -67
  183. package/examples/rason-features/UserGuide/UGProductMixTab2.json +76 -76
  184. package/examples/rason-features/UserGuide/UGProductMixTab3.json +66 -66
  185. package/examples/rason-features/UserGuide/UGProductMixTab4.json +70 -70
  186. package/examples/rason-features/UserGuide/UGProductMixTab5.json +67 -67
  187. package/examples/rason-features/UserGuide/UGProjectSelect0.json +91 -91
  188. package/examples/rason-features/UserGuide/UGProjectSelect1.json +74 -74
  189. package/examples/rason-features/UserGuide/UGProjectSelect2.json +74 -74
  190. package/examples/rason-features/UserGuide/UGYieldManagement1.json +61 -61
  191. package/examples/rason-features/UserGuide/UGYieldManagement2.json +61 -61
  192. package/examples/rason-features/UserGuide/UGYieldManagement3.json +63 -63
  193. package/out/index.cjs +1 -1
  194. package/package.json +3 -2
@@ -1,114 +1,114 @@
1
- {
2
- "modelName": "RGFirehouseLocationConic",
3
- "modelDescription": "RASON Conic Optimization Example: Example of solving a Conic Optimization Model. The goal of this example is the same for the RGFirehouseLocation example, to find a location, given by x and y coordinates, of a proposed firehouse that minimizes the maximum distance between the firehouse and six cities in the region. The difference between this example and the RGFirehouseLocation example is that this example replaces the 6 nonlinear constraints (calculating the distances betwen the proposed firehouse location and each city) with a 6 conic constraints. Since the model is now a conic optimization model, the SOCP Barrier engine can be used. ",
4
- "modelType": "optimization",
5
- "engineSettings": {
6
- "comment": "Since the model is now a conic optimization model, the SOCP Barrier engine can be used to solve the model. Note: In RASON, you can solve any type of model containing conic constraints. There is no need to select a specific engine within engineSettings. If the model is diagnosed as 'SOCP', then the model will be solved using an engine that supports conic constraints. Currently, the three engines that support conic constraints are: 'SOCP Barrier', 'Gurobi Solver' and 'Mosek Solver'.",
7
- "engine": "SOCP Barrier"
8
- },
9
- "variables": {
10
- "comment": "The variables for this conic formulation contains the three original variables: x and y, which will hold the final x,y coordinate values for the proposed firehouse and z, the variale to be minimized in the objective function. 18 new variables in the f, g and h arrays, are required for the 6 conic constraints. Each member of the f, g, and h variable blocks must (for example f[1], g[1], and h[1]) belong to a second order cone constraint which can be rewritten as f[1] > = SQRT (SUMSQ(g[1]; h[1])). ",
11
- "x": {
12
- "comment": "The x variable will hold the final x coordinate of the proposed firehouse.",
13
- "value": 1.0,
14
- "finalValue": []
15
- },
16
- "y": {
17
- "comment": "The y variable will hold the final y coordinate of the proposed firehouse.",
18
- "value": 1.0,
19
- "finalValue": []
20
- },
21
- "z": {
22
- "comment": "The z variable will be minimized in the objective.",
23
- "value": 1.0,
24
- "finalValue": []
25
- },
26
- "f": {
27
- "comment": "The f block of variables will be forced by the dx block of constraints to equal the distance between the x coordinate of the proposed firehouse and the x coordinate of each city.",
28
- "dimensions": [ 6 ],
29
- "value": 1.0,
30
- "finalValue": []
31
- },
32
- "g": {
33
- "comment": "The g block of variables will be forced by the dy block of constraints to equal the distance between the y coordinate of the proposed firehouse and the y coordinate of each city.",
34
- "dimensions": [ 6 ],
35
- "value": 1.0
36
- },
37
- "h": {
38
- "comment": "The h block of variables will be driven by the dz block of constraints to be less than or equal to z, the variable to be minimized in the objective function.",
39
- "dimensions": [ 6 ],
40
- "value": 1.0
41
- }
42
- },
43
- "data": {
44
- "comment": "The x and y coordinates of each of the 6 cities to be served by the firehouse are given in the corx and cory arrays, respectively. In the RGFirehouseLocation example, these coordinates were supplied in the constraint formulas.",
45
- "corx": {
46
- "comment": "x coordinates of the each of the 6 cities.",
47
- "dimensions": [ 6 ],
48
- "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
49
- },
50
- "cory": {
51
- "comment": "y coordinates of the each of the 6 cities.",
52
- "dimensions": [ 6 ],
53
- "value": [ 4, 3, 4, 2, 5, 6 ]
54
- }
55
- },
56
- "constraints": {
57
- "dx": {
58
- "comment": "This constraint calculates the differences between the X coordinates of the hub and each city set equal to the new variables in the g block.",
59
- "dimensions": [ 6 ],
60
- "formula": "corx - x - g",
61
- "equal": 0
62
- },
63
- "dy": {
64
- "comment": "This constraint calculates the differences between the Y coordinates of the hub and each city set equal to the new variables in the h block.",
65
- "dimensions": [ 6 ],
66
- "formula": "cory - y - h",
67
- "equal": 0
68
- },
69
- "dz": {
70
- "comment": "The effect of this constraint, coupled with the minimization of the Z variable, results in the Z variable being set equal to the maximum value in the F variable block, in the final solution.",
71
- "dimensions": [ 6 ],
72
- "formula": "f - z",
73
- "upper": 0
74
- },
75
- "cone1": {
76
- "comment": "Each set of the f, g, and h variables must belong to a second order cone constraint which can be rewritten as F >= SQRT(SUMSQ(G,H)), in this constraint specifically: F[1] >= SQRT(SUMSQ(G[1],H[1])). These 6 conic constraints replace the nonlinear distance calculation in the previous RGFirehouseLocation example.",
77
- "value": "f[1], g[1], h[1]",
78
- "type": "cone"
79
- },
80
- "cone2": {
81
- "comment": "F[2] >= SQRT(SUMSQ(G[2],H[2]))",
82
- "value": "f[2], g[2], h[2]",
83
- "type": "cone"
84
- },
85
- "cone3": {
86
- "comment": "F[3] >= SQRT(SUMSQ(G[3],H[3]))",
87
- "value": "f[3], g[3], h[3]",
88
- "type": "cone"
89
- },
90
- "cone4": {
91
- "comment": "F[4] >= SQRT(SUMSQ(G[4],H[4]))",
92
- "value": "f[4], g[4], h[4]",
93
- "type": "cone"
94
- },
95
- "cone5": {
96
- "comment": "F[5] >= SQRT(SUMSQ(G[5],H[5]))",
97
- "value": "f[5], g[5], h[5]",
98
- "type": "cone"
99
- },
100
- "cone6": {
101
- "comment": "F[6] >= SQRT(SUMSQ(G[6],H[6]))",
102
- "value": "f[6], g[6], h[6]",
103
- "type": "cone"
104
- }
105
- },
106
- "objective": {
107
- "obj": {
108
- "comment": "Minimizing the z variable in the objective function will push the maximum distance between the proposed firehouse location and each city to the lowest possible value guaranteeing that the firehouse is as close as possible to each of the six cities. ",
109
- "formula": "z",
110
- "type": "minimize",
111
- "finalValue": []
112
- }
113
- }
1
+ {
2
+ "modelName": "RGFirehouseLocationConic",
3
+ "modelDescription": "RASON Conic Optimization Example: Example of solving a Conic Optimization Model. The goal of this example is the same for the RGFirehouseLocation example, to find a location, given by x and y coordinates, of a proposed firehouse that minimizes the maximum distance between the firehouse and six cities in the region. The difference between this example and the RGFirehouseLocation example is that this example replaces the 6 nonlinear constraints (calculating the distances betwen the proposed firehouse location and each city) with a 6 conic constraints. Since the model is now a conic optimization model, the SOCP Barrier engine can be used. ",
4
+ "modelType": "optimization",
5
+ "engineSettings": {
6
+ "comment": "Since the model is now a conic optimization model, the SOCP Barrier engine can be used to solve the model. Note: In RASON, you can solve any type of model containing conic constraints. There is no need to select a specific engine within engineSettings. If the model is diagnosed as 'SOCP', then the model will be solved using an engine that supports conic constraints. Currently, the three engines that support conic constraints are: 'SOCP Barrier', 'Gurobi Solver' and 'Mosek Solver'.",
7
+ "engine": "SOCP Barrier"
8
+ },
9
+ "variables": {
10
+ "comment": "The variables for this conic formulation contains the three original variables: x and y, which will hold the final x,y coordinate values for the proposed firehouse and z, the variale to be minimized in the objective function. 18 new variables in the f, g and h arrays, are required for the 6 conic constraints. Each member of the f, g, and h variable blocks must (for example f[1], g[1], and h[1]) belong to a second order cone constraint which can be rewritten as f[1] > = SQRT (SUMSQ(g[1]; h[1])). ",
11
+ "x": {
12
+ "comment": "The x variable will hold the final x coordinate of the proposed firehouse.",
13
+ "value": 1.0,
14
+ "finalValue": []
15
+ },
16
+ "y": {
17
+ "comment": "The y variable will hold the final y coordinate of the proposed firehouse.",
18
+ "value": 1.0,
19
+ "finalValue": []
20
+ },
21
+ "z": {
22
+ "comment": "The z variable will be minimized in the objective.",
23
+ "value": 1.0,
24
+ "finalValue": []
25
+ },
26
+ "f": {
27
+ "comment": "The f block of variables will be forced by the dx block of constraints to equal the distance between the x coordinate of the proposed firehouse and the x coordinate of each city.",
28
+ "dimensions": [ 6 ],
29
+ "value": 1.0,
30
+ "finalValue": []
31
+ },
32
+ "g": {
33
+ "comment": "The g block of variables will be forced by the dy block of constraints to equal the distance between the y coordinate of the proposed firehouse and the y coordinate of each city.",
34
+ "dimensions": [ 6 ],
35
+ "value": 1.0
36
+ },
37
+ "h": {
38
+ "comment": "The h block of variables will be driven by the dz block of constraints to be less than or equal to z, the variable to be minimized in the objective function.",
39
+ "dimensions": [ 6 ],
40
+ "value": 1.0
41
+ }
42
+ },
43
+ "data": {
44
+ "comment": "The x and y coordinates of each of the 6 cities to be served by the firehouse are given in the corx and cory arrays, respectively. In the RGFirehouseLocation example, these coordinates were supplied in the constraint formulas.",
45
+ "corx": {
46
+ "comment": "x coordinates of the each of the 6 cities.",
47
+ "dimensions": [ 6 ],
48
+ "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
49
+ },
50
+ "cory": {
51
+ "comment": "y coordinates of the each of the 6 cities.",
52
+ "dimensions": [ 6 ],
53
+ "value": [ 4, 3, 4, 2, 5, 6 ]
54
+ }
55
+ },
56
+ "constraints": {
57
+ "dx": {
58
+ "comment": "This constraint calculates the differences between the X coordinates of the hub and each city set equal to the new variables in the g block.",
59
+ "dimensions": [ 6 ],
60
+ "formula": "corx - x - g",
61
+ "equal": 0
62
+ },
63
+ "dy": {
64
+ "comment": "This constraint calculates the differences between the Y coordinates of the hub and each city set equal to the new variables in the h block.",
65
+ "dimensions": [ 6 ],
66
+ "formula": "cory - y - h",
67
+ "equal": 0
68
+ },
69
+ "dz": {
70
+ "comment": "The effect of this constraint, coupled with the minimization of the Z variable, results in the Z variable being set equal to the maximum value in the F variable block, in the final solution.",
71
+ "dimensions": [ 6 ],
72
+ "formula": "f - z",
73
+ "upper": 0
74
+ },
75
+ "cone1": {
76
+ "comment": "Each set of the f, g, and h variables must belong to a second order cone constraint which can be rewritten as F >= SQRT(SUMSQ(G,H)), in this constraint specifically: F[1] >= SQRT(SUMSQ(G[1],H[1])). These 6 conic constraints replace the nonlinear distance calculation in the previous RGFirehouseLocation example.",
77
+ "value": "f[1], g[1], h[1]",
78
+ "type": "cone"
79
+ },
80
+ "cone2": {
81
+ "comment": "F[2] >= SQRT(SUMSQ(G[2],H[2]))",
82
+ "value": "f[2], g[2], h[2]",
83
+ "type": "cone"
84
+ },
85
+ "cone3": {
86
+ "comment": "F[3] >= SQRT(SUMSQ(G[3],H[3]))",
87
+ "value": "f[3], g[3], h[3]",
88
+ "type": "cone"
89
+ },
90
+ "cone4": {
91
+ "comment": "F[4] >= SQRT(SUMSQ(G[4],H[4]))",
92
+ "value": "f[4], g[4], h[4]",
93
+ "type": "cone"
94
+ },
95
+ "cone5": {
96
+ "comment": "F[5] >= SQRT(SUMSQ(G[5],H[5]))",
97
+ "value": "f[5], g[5], h[5]",
98
+ "type": "cone"
99
+ },
100
+ "cone6": {
101
+ "comment": "F[6] >= SQRT(SUMSQ(G[6],H[6]))",
102
+ "value": "f[6], g[6], h[6]",
103
+ "type": "cone"
104
+ }
105
+ },
106
+ "objective": {
107
+ "obj": {
108
+ "comment": "Minimizing the z variable in the objective function will push the maximum distance between the proposed firehouse location and each city to the lowest possible value guaranteeing that the firehouse is as close as possible to each of the six cities. ",
109
+ "formula": "z",
110
+ "type": "minimize",
111
+ "finalValue": []
112
+ }
113
+ }
114
114
  }
@@ -1,108 +1,108 @@
1
- {
2
- "modelName": "RGProductMixCsv1",
3
- "modelDescription": "RASON Conic Optimization Example: Illustrates binding to a CSV File. In this example, initial variable values are first imported from the CSV file ResultVarsInit.txt and, after the model is solved, the final variable values are saved back to that same CSV file. The final constraint values are saved to ResultFcns.txt and the final objective value is saved to ResultObj.txt. Both ResultFcns.txt and ResultObj.txt will be created once the model is solved. (Click Download RASON Examples icon to download all source files. To attach the files to the example, click Choose Files, navigate to the location of the saved files, select ProductMixParts.txt, ProductMixInventory.txt, ProductMixProfits.txt and ResultVarsInit.txt and click Open. Then POST the model by clicking the POST icon, then solve the model by clicking the down arrow next to the Play icon and selecting Solve.",
4
- "modelType": "optimization",
5
- "datasources": {
6
- "comment": "Imports data from outside datasources.",
7
- "parts_data": {
8
- "comment": "Imports the parts data.",
9
- "type": "csv",
10
- "connection": "ProductMixParts.txt",
11
- "indexCols": [ "parts", "prods" ],
12
- "valueCols": [ "qty" ],
13
- "direction": "import"
14
- },
15
- "invent_data": {
16
- "comment": "Imports the inventory data.",
17
- "type": "csv",
18
- "connection": "ProductMixInventory.txt",
19
- "indexCols": [ "parts" ],
20
- "valueCols": [ "inventory" ],
21
- "direction": "import"
22
- },
23
- "profit_data": {
24
- "comment": "Imports the profit per unit data.",
25
- "type": "csv",
26
- "connection": "ProductMixProfits.txt",
27
- "indexCols": [ "prods" ],
28
- "valueCols": [ "profits" ],
29
- "direction": "import"
30
- },
31
- "vars_data": {
32
- "comment": "The vars_data data source performs a dual function by first importing the decision variable initial values from the CSV file ResultVarsInit.txt and then saving the final variable values back to that same file. The first property, type, specifies the type of file where the data is being imported/exported ('csv') while the second property, connection, specifies the file name within quotes ('ResultVarsInit.txt'). The third and fourth properties (indexCols and valueCols) are required for importing the initial variable values. The third property, indexCols specifies the dimension(s) (or column(s)) to be imported and the fourth property, valueCols, specifies the values to be imported. Within variables, a block of decision variables x is bound to the vars_data data source using the binding property. Since only one output property is passed within the x definition, finalValue:[], a single column containing the final values of the decision variables will be appended to ResultVarsInit.txt. The last property, direction: 'import/export', stipulates that the contents of the file will be 'imported' (for initial variable values) and then the final variable values will be 'exported', hence the setting 'import/export'.",
33
- "type": "csv",
34
- "connection": "ResultVarsInit.txt",
35
- "indexCols": [ "prods" ],
36
- "valueCols": [ "initials" ],
37
- "direction": "import/export"
38
- },
39
- "fcns_data": {
40
- "comment": "The fcns_data datasource exports the final constraint values to the TXT file, ResultFcns.txt. The first property, type, specifies the type of file where the data is being imported/exported. In this example, the file is a CSV file. The second property, connection, specifies the file name within quotes ('ResultFcns.txt') while the third property assigns the direction of the file as 'export'. The binding property within the c constraint definition binds the constraint block to the fcns_data data source. The user must specify which results he/she would like exported. In this example, only one output property is passed, finalValue:[]. For a complete list of results that may be written to a writeable data source, see the constraints section discussion within the RASON Reference Guide on the Help tab.",
41
- "type": "csv",
42
- "connection": "ResultFcns.txt",
43
- "direction": "export"
44
- },
45
- "obj_data": {
46
- "comment": "The obj_data datasource exports the final objective value to the TXT file, ResultObj.txt. The first property, type, specifies the file type ('CSV') while the second property, connection, specifies the file name ('ResultObj.txt')and the third, direction, specifies that the file will be exported. Within objective, the total objective function is bound to the obj_data data source. The only output property passed within the objective definition is finalValue:[]. As a result, only the final objective function value will be exported to ResultObj.txt. For a complete list of results that may be written to a writeable data source, see the objective section discussion in the RASON Reference Guide.",
47
- "type": "csv",
48
- "connection": "ResultObj.txt",
49
- "direction": "export"
50
- }
51
- },
52
- "data": {
53
- "comment": "Binds the datasources to data component.",
54
- "parts2": {
55
- "comment": "Binds the values in the qty column in the parts_data datasource to parts2 data component.",
56
- "binding": "parts_data",
57
- "valueCol": "qty"
58
- },
59
- "invent": {
60
- "comment": "Binds the values in the inventory column in the invent_data datasource to invent data component.",
61
- "binding": "invent_data",
62
- "valueCol": "inventory"
63
- },
64
- "profit": {
65
- "comment": "Binds the values in the profits column in the profit_data datasource to profit data component.",
66
- "binding": "profit_data",
67
- "valueCol": "profits"
68
- }
69
- },
70
- "formulas": {
71
- "comment": "Use this section to calculate intermediate formulas to be used within the constraints and objective sections.",
72
- "piv_parts": {
73
- "comment": "Calculates the amount of parts used to produce all three products.",
74
- "formula": "PIVOT(parts2, { 'prods' }, { 'parts' })"
75
- }
76
- },
77
- "variables": {
78
- "comment": "Decision Variables",
79
- "x": {
80
- "comment": "The amount of products to produce, x[1] = TVs, x[2] = Stereos, x[3] = Speakers",
81
- "binding": "vars_data",
82
- "valueCol": "initials",
83
- "lower": 0,
84
- "finalValue": []
85
- }
86
- },
87
- "constraints": {
88
- "comment": "Constraints",
89
- "c": {
90
- "comment": "Generates 5 constraints that calculate the number of parts used in creating the three products, then sets each constraint equal to the amount of each part in inventory.",
91
- "dimensions": [ "parts" ],
92
- "binding": "fcns_data",
93
- "formula": "MMULT(piv_parts, x)",
94
- "upper": "invent",
95
- "finalValue": []
96
- }
97
- },
98
- "objective": {
99
- "comment": "objective function",
100
- "total": {
101
- "comment": "Calculates the profit by multiplying the profit per unit of each product by the final variable values.",
102
- "binding": "obj_data",
103
- "formula": "sumproduct(x, profit)",
104
- "type": "maximize",
105
- "finalValue": []
106
- }
107
- }
1
+ {
2
+ "modelName": "RGProductMixCsv1",
3
+ "modelDescription": "RASON Conic Optimization Example: Illustrates binding to a CSV File. In this example, initial variable values are first imported from the CSV file ResultVarsInit.txt and, after the model is solved, the final variable values are saved back to that same CSV file. The final constraint values are saved to ResultFcns.txt and the final objective value is saved to ResultObj.txt. Both ResultFcns.txt and ResultObj.txt will be created once the model is solved. (Click Download RASON Examples icon to download all source files. To attach the files to the example, click Choose Files, navigate to the location of the saved files, select ProductMixParts.txt, ProductMixInventory.txt, ProductMixProfits.txt and ResultVarsInit.txt and click Open. Then POST the model by clicking the POST icon, then solve the model by clicking the down arrow next to the Play icon and selecting Solve.",
4
+ "modelType": "optimization",
5
+ "datasources": {
6
+ "comment": "Imports data from outside datasources.",
7
+ "parts_data": {
8
+ "comment": "Imports the parts data.",
9
+ "type": "csv",
10
+ "connection": "ProductMixParts.txt",
11
+ "indexCols": [ "parts", "prods" ],
12
+ "valueCols": [ "qty" ],
13
+ "direction": "import"
14
+ },
15
+ "invent_data": {
16
+ "comment": "Imports the inventory data.",
17
+ "type": "csv",
18
+ "connection": "ProductMixInventory.txt",
19
+ "indexCols": [ "parts" ],
20
+ "valueCols": [ "inventory" ],
21
+ "direction": "import"
22
+ },
23
+ "profit_data": {
24
+ "comment": "Imports the profit per unit data.",
25
+ "type": "csv",
26
+ "connection": "ProductMixProfits.txt",
27
+ "indexCols": [ "prods" ],
28
+ "valueCols": [ "profits" ],
29
+ "direction": "import"
30
+ },
31
+ "vars_data": {
32
+ "comment": "The vars_data data source performs a dual function by first importing the decision variable initial values from the CSV file ResultVarsInit.txt and then saving the final variable values back to that same file. The first property, type, specifies the type of file where the data is being imported/exported ('csv') while the second property, connection, specifies the file name within quotes ('ResultVarsInit.txt'). The third and fourth properties (indexCols and valueCols) are required for importing the initial variable values. The third property, indexCols specifies the dimension(s) (or column(s)) to be imported and the fourth property, valueCols, specifies the values to be imported. Within variables, a block of decision variables x is bound to the vars_data data source using the binding property. Since only one output property is passed within the x definition, finalValue:[], a single column containing the final values of the decision variables will be appended to ResultVarsInit.txt. The last property, direction: 'import/export', stipulates that the contents of the file will be 'imported' (for initial variable values) and then the final variable values will be 'exported', hence the setting 'import/export'.",
33
+ "type": "csv",
34
+ "connection": "ResultVarsInit.txt",
35
+ "indexCols": [ "prods" ],
36
+ "valueCols": [ "initials" ],
37
+ "direction": "import/export"
38
+ },
39
+ "fcns_data": {
40
+ "comment": "The fcns_data datasource exports the final constraint values to the TXT file, ResultFcns.txt. The first property, type, specifies the type of file where the data is being imported/exported. In this example, the file is a CSV file. The second property, connection, specifies the file name within quotes ('ResultFcns.txt') while the third property assigns the direction of the file as 'export'. The binding property within the c constraint definition binds the constraint block to the fcns_data data source. The user must specify which results he/she would like exported. In this example, only one output property is passed, finalValue:[]. For a complete list of results that may be written to a writeable data source, see the constraints section discussion within the RASON Reference Guide on the Help tab.",
41
+ "type": "csv",
42
+ "connection": "ResultFcns.txt",
43
+ "direction": "export"
44
+ },
45
+ "obj_data": {
46
+ "comment": "The obj_data datasource exports the final objective value to the TXT file, ResultObj.txt. The first property, type, specifies the file type ('CSV') while the second property, connection, specifies the file name ('ResultObj.txt')and the third, direction, specifies that the file will be exported. Within objective, the total objective function is bound to the obj_data data source. The only output property passed within the objective definition is finalValue:[]. As a result, only the final objective function value will be exported to ResultObj.txt. For a complete list of results that may be written to a writeable data source, see the objective section discussion in the RASON Reference Guide.",
47
+ "type": "csv",
48
+ "connection": "ResultObj.txt",
49
+ "direction": "export"
50
+ }
51
+ },
52
+ "data": {
53
+ "comment": "Binds the datasources to data component.",
54
+ "parts2": {
55
+ "comment": "Binds the values in the qty column in the parts_data datasource to parts2 data component.",
56
+ "binding": "parts_data",
57
+ "valueCol": "qty"
58
+ },
59
+ "invent": {
60
+ "comment": "Binds the values in the inventory column in the invent_data datasource to invent data component.",
61
+ "binding": "invent_data",
62
+ "valueCol": "inventory"
63
+ },
64
+ "profit": {
65
+ "comment": "Binds the values in the profits column in the profit_data datasource to profit data component.",
66
+ "binding": "profit_data",
67
+ "valueCol": "profits"
68
+ }
69
+ },
70
+ "formulas": {
71
+ "comment": "Use this section to calculate intermediate formulas to be used within the constraints and objective sections.",
72
+ "piv_parts": {
73
+ "comment": "Calculates the amount of parts used to produce all three products.",
74
+ "formula": "PIVOT(parts2, { 'prods' }, { 'parts' })"
75
+ }
76
+ },
77
+ "variables": {
78
+ "comment": "Decision Variables",
79
+ "x": {
80
+ "comment": "The amount of products to produce, x[1] = TVs, x[2] = Stereos, x[3] = Speakers",
81
+ "binding": "vars_data",
82
+ "valueCol": "initials",
83
+ "lower": 0,
84
+ "finalValue": []
85
+ }
86
+ },
87
+ "constraints": {
88
+ "comment": "Constraints",
89
+ "c": {
90
+ "comment": "Generates 5 constraints that calculate the number of parts used in creating the three products, then sets each constraint equal to the amount of each part in inventory.",
91
+ "dimensions": [ "parts" ],
92
+ "binding": "fcns_data",
93
+ "formula": "MMULT(piv_parts, x)",
94
+ "upper": "invent",
95
+ "finalValue": []
96
+ }
97
+ },
98
+ "objective": {
99
+ "comment": "objective function",
100
+ "total": {
101
+ "comment": "Calculates the profit by multiplying the profit per unit of each product by the final variable values.",
102
+ "binding": "obj_data",
103
+ "formula": "sumproduct(x, profit)",
104
+ "type": "maximize",
105
+ "finalValue": []
106
+ }
107
+ }
108
108
  }