@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,127 +1,127 @@
1
- {
2
- "modelName": "rowopExample",
3
- "modelDescription": "RASON example uses Frontline's ROWOP function to solve a famous and difficult fixed-charge transportation optimization model. The optimal objective = 3712. In a fixed charge constraint, a binary variable is forced to 1 if the corresponding continuous variable is nonzero. In other words, if X >0 then Y = 1. From here the binary variable may be multiplied by a constant value to model a penalty or charge.",
4
- "modelType": "optimization",
5
- "data": {
6
- "comment": "The data section contains constant parameters utilized in the model to generate the constraints and the objective.",
7
- "rows": {
8
- "comment": "Creates constant, rows, with an assigned value = 14.",
9
- "value": 14
10
- },
11
- "cols": {
12
- "comment": "Creates constant, cols, with an assigned value = 18.",
13
- "value": 18
14
- },
15
- "I": {
16
- "comment": "Creates the array, I, of size 14. All elements values = 1.",
17
- "dimensions": [ "rows" ],
18
- "value": 1
19
- },
20
- "J": {
21
- "comment": "Creates the array, J, of size 18. All elements values = 1.",
22
- "dimensions": [ "cols" ],
23
- "value": 1
24
- },
25
- "Demand": {
26
- "comment": "Creates the array, Demand. The size of the array is inferred by the number of values passed. These values represent the demand.",
27
- "value": [ 6, 13, 21, 11, 20, 4, 35, 13, 20, 9, 7, 18, 14, 22, 33, 45, 11, 8 ]
28
- },
29
- "Supply": {
30
- "comment": "Creates the array, Supply. The size of the array is inferred by the number of values passed. These values represent the supply.",
31
- "value": [ 21, 19, 24, 10, 27, 25, 10, 16, 17, 38, 22, 33, 22, 26 ]
32
- },
33
- "Cost": {
34
- "comment": "Creates Cost matrix. This matrix contains the transportation costs, or the cost per mile",
35
- "value": [
36
- [ 4, 4, 10, 3, 4, 9, 10, 9, 3, 10, 5, 10, 9, 10, 5, 8, 9, 8 ],
37
- [ 7, 1, 7, 4, 6, 7, 7, 1, 4, 4, 10, 1, 7, 5, 8, 3, 3, 1 ],
38
- [ 10, 10, 4, 10, 3, 2, 3, 8, 3, 7, 1, 5, 5, 6, 1, 8, 3, 8 ],
39
- [ 7, 1, 1, 1, 10, 1, 7, 6, 6, 2, 5, 5, 7, 9, 6, 3, 3, 5 ],
40
- [ 4, 10, 2, 1, 7, 8, 1, 2, 4, 5, 9, 2, 8, 7, 2, 8, 5, 3 ],
41
- [ 3, 7, 4, 10, 8, 10, 9, 9, 6, 8, 9, 5, 5, 6, 1, 4, 9, 5 ],
42
- [ 2, 7, 10, 10, 4, 10, 6, 8, 6, 6, 6, 8, 2, 3, 6, 9, 7, 5 ],
43
- [ 1, 7, 10, 1, 7, 3, 1, 10, 10, 6, 2, 9, 1, 6, 5, 8, 6, 5 ],
44
- [ 10, 7, 4, 1, 1, 1, 8, 4, 4, 3, 2, 4, 6, 6, 8, 3, 6, 6 ],
45
- [ 4, 7, 1, 3, 3, 1, 3, 3, 5, 9, 9, 2, 6, 8, 2, 4, 3, 6 ],
46
- [ 4, 1, 1, 2, 1, 4, 6, 8, 2, 4, 2, 5, 5, 8, 7, 4, 6, 9 ],
47
- [ 7, 4, 1, 3, 10, 3, 1, 5, 2, 5, 1, 5, 6, 6, 3, 9, 9, 3 ],
48
- [ 4, 7, 1, 10, 3, 8, 2, 9, 9, 6, 6, 9, 7, 7, 9, 1, 3, 10 ],
49
- [ 6, 4, 8, 1, 2, 3, 4, 9, 9, 2, 6, 2, 5, 7, 8, 10, 10, 2 ]
50
- ]
51
- },
52
- "FixedCost": {
53
- "comment": "Creates FixedCost matrix. This matrix contains the fixed charge cost.",
54
- "value": [
55
- [ 202.0, 222.0, 100.0, 174.0, 116.0, 253.0, 252.0, 113.0, 261.0, 240.0, 106.0, 146.0, 76.0, 169.0, 247.0, 194.0, 208.0, 242.0 ],
56
- [ 190.0, 158.0, 243.0, 175.0, 191.0, 243.0, 162.0, 251.0, 248.0, 213.0, 123.0, 65.0, 73.0, 246.0, 181.0, 132.0, 91.0, 264.0 ],
57
- [ 229.0, 112.0, 107.0, 193.0, 214.0, 120.0, 154.0, 150.0, 94.0, 74.0, 104.0, 152.0, 94.0, 258.0, 264.0, 88.0, 262.0, 220.0 ],
58
- [ 190.0, 198.0, 130.0, 118.0, 135.0, 91.0, 243.0, 258.0, 98.0, 78.0, 188.0, 129.0, 162.0, 208.0, 110.0, 186.0, 262.0, 223.0 ],
59
- [ 154.0, 217.0, 156.0, 91.0, 233.0, 191.0, 172.0, 157.0, 202.0, 212.0, 169.0, 173.0, 150.0, 96.0, 210.0, 194.0, 106.0, 221.0 ],
60
- [ 141.0, 149.0, 234.0, 230.0, 126.0, 113.0, 101.0, 240.0, 138.0, 87.0, 242.0, 189.0, 93.0, 204.0, 184.0, 176.0, 148.0, 140.0 ],
61
- [ 131.0, 256.0, 147.0, 252.0, 107.0, 112.0, 165.0, 255.0, 71.0, 244.0, 192.0, 168.0, 250.0, 132.0, 177.0, 195.0, 98.0, 105.0 ],
62
- [ 211.0, 85.0, 124.0, 171.0, 139.0, 115.0, 65.0, 253.0, 217.0, 178.0, 186.0, 87.0, 119.0, 137.0, 82.0, 208.0, 205.0, 223.0 ],
63
- [ 147.0, 149.0, 214.0, 105.0, 132.0, 131.0, 202.0, 213.0, 81.0, 234.0, 226.0, 202.0, 138.0, 245.0, 148.0, 209.0, 177.0, 152.0 ],
64
- [ 249.0, 126.0, 145.0, 235.0, 234.0, 92.0, 201.0, 142.0, 106.0, 113.0, 134.0, 90.0, 138.0, 114.0, 239.0, 222.0, 262.0, 205.0 ],
65
- [ 95.0, 251.0, 145.0, 131.0, 130.0, 222.0, 192.0, 179.0, 183.0, 234.0, 196.0, 106.0, 200.0, 147.0, 72.0, 176.0, 231.0, 160.0 ],
66
- [ 109.0, 234.0, 78.0, 115.0, 136.0, 221.0, 252.0, 129.0, 80.0, 94.0, 65.0, 177.0, 258.0, 137.0, 185.0, 242.0, 181.0, 132.0 ],
67
- [ 107.0, 233.0, 91.0, 112.0, 261.0, 150.0, 119.0, 102.0, 207.0, 138.0, 71.0, 122.0, 125.0, 166.0, 168.0, 144.0, 174.0, 241.0 ],
68
- [ 191.0, 154.0, 101.0, 66.0, 156.0, 128.0, 234.0, 75.0, 86.0, 210.0, 231.0, 79.0, 105.0, 166.0, 147.0, 171.0, 241.0, 80.0 ]
69
- ]
70
- }
71
- },
72
- "formulas": {
73
- "comment": "A new matrix is created using the MATOP function by applying two operators, oper1 and oper2, MATOP(A, oper1, oper2, B); For each k: MATOP[x, y] = MATOP[x, y] oper2 (A[x, k] oper1 B[k, y]). For more information on this function, see https://www.solver.com/risk-solver-help/psi-function-help/matrices/matop.",
74
- "xup": {
75
- "dimensions": [ "rows", "cols" ],
76
- "formula": "MATOP(Supply, 'min', '+', transpose(Demand))"
77
- }
78
- },
79
- "variables": {
80
- "comment": "This model includes two variable blocks, x and y. The x variable array contains 252 continuous variables. The y variable array contains 252 binary (0,1) variables.",
81
- "x": {
82
- "comment": "Creates x double array to hold 252 variables (14 * 18). All vars have been given an initial value of 0 using 'value' and a lower bound of 0, using 'lower'. The final variable values will be returned in the results due to the presence of the 'finalValue' keyword.",
83
- "dimensions": [ "rows", "cols" ],
84
- "value": 0,
85
- "lower": 0,
86
- "finalValue": []
87
- },
88
- "y": {
89
- "comment": "Creates y double array to hold 252 more variables (14 * 18). All vars have been given an initial value of 0 using 'value', a lower bound of 0, using 'lower' and an upper bound of 1 using 'upper'. The 'type' property specifies that variables in this array must be integer, or binary variables, taking on values of either 0 or 1. The final variable values will be returned in the results due to the presence of the 'finalValue' keyword. The 'fix' constraint will ensure that if the corresponding x variable is nonzero, the corresponding y variable will be forced to 1, (i.e. if x(1,1) is > 0, y(1,1) = 1. ",
90
- "dimensions": [ "rows", "cols" ],
91
- "value": 0,
92
- "lower": 0,
93
- "upper": 1,
94
- "type": "int",
95
- "finalValue": []
96
- }
97
- },
98
- "constraints": {
99
- "comment": "Contains 18 + 14 + 252 = 284 constraints.",
100
- "con1": {
101
- "comment": "Generates Demand constraints: Adds up the continuous variable values by row and sets each formula equal to the appropriate demand value (i.e. x(1,1) + x(2,1) + x(3,1) + ... x(18,1) = 6 where 6 is Demand[1].",
102
- "dimensions": [ "cols" ],
103
- "formula": "transpose(ROWOP(x, '+'))",
104
- "equal": "Demand"
105
- },
106
- "con2": {
107
- "comment": "Generates Supply constraints: Adds up the continuous variable values by column and sets each formula equal to the appropriate supply value (i.e. x(1,1) + x(2,1) + x(3,1) + ... x(18,1) = 21 where 21 is Supply[1].",
108
- "dimensions": [ "rows" ],
109
- "formula": "COLOP(x, '+')",
110
- "equal": "Supply"
111
- },
112
- "fix": {
113
- "comment": "Creates the fixed charge constraint that forces the y variables to 1 when the corresponding x variable i nonzero. This type of constraint is otherwise known as a fixed-charge constraint because it applies a fixed cost if a truck route is selected.",
114
- "dimensions": [ "rows", "cols" ],
115
- "formula": "xup * y - x",
116
- "lower": 0
117
- }
118
- },
119
- "objective": {
120
- "obj": {
121
- "comment": "The objective minimizes the transportation costs by adding the sumproduct of the Fixed Cost matrix and the y matrix with the sumproduct of the Cost matrix and the x matrix.",
122
- "type": "minimize",
123
- "formula": "sumproduct(FixedCost, y) + sumproduct(Cost, x)",
124
- "finalValue": []
125
- }
126
- }
1
+ {
2
+ "modelName": "rowopExample",
3
+ "modelDescription": "RASON example uses Frontline's ROWOP function to solve a famous and difficult fixed-charge transportation optimization model. The optimal objective = 3712. In a fixed charge constraint, a binary variable is forced to 1 if the corresponding continuous variable is nonzero. In other words, if X >0 then Y = 1. From here the binary variable may be multiplied by a constant value to model a penalty or charge.",
4
+ "modelType": "optimization",
5
+ "data": {
6
+ "comment": "The data section contains constant parameters utilized in the model to generate the constraints and the objective.",
7
+ "rows": {
8
+ "comment": "Creates constant, rows, with an assigned value = 14.",
9
+ "value": 14
10
+ },
11
+ "cols": {
12
+ "comment": "Creates constant, cols, with an assigned value = 18.",
13
+ "value": 18
14
+ },
15
+ "I": {
16
+ "comment": "Creates the array, I, of size 14. All elements values = 1.",
17
+ "dimensions": [ "rows" ],
18
+ "value": 1
19
+ },
20
+ "J": {
21
+ "comment": "Creates the array, J, of size 18. All elements values = 1.",
22
+ "dimensions": [ "cols" ],
23
+ "value": 1
24
+ },
25
+ "Demand": {
26
+ "comment": "Creates the array, Demand. The size of the array is inferred by the number of values passed. These values represent the demand.",
27
+ "value": [ 6, 13, 21, 11, 20, 4, 35, 13, 20, 9, 7, 18, 14, 22, 33, 45, 11, 8 ]
28
+ },
29
+ "Supply": {
30
+ "comment": "Creates the array, Supply. The size of the array is inferred by the number of values passed. These values represent the supply.",
31
+ "value": [ 21, 19, 24, 10, 27, 25, 10, 16, 17, 38, 22, 33, 22, 26 ]
32
+ },
33
+ "Cost": {
34
+ "comment": "Creates Cost matrix. This matrix contains the transportation costs, or the cost per mile",
35
+ "value": [
36
+ [ 4, 4, 10, 3, 4, 9, 10, 9, 3, 10, 5, 10, 9, 10, 5, 8, 9, 8 ],
37
+ [ 7, 1, 7, 4, 6, 7, 7, 1, 4, 4, 10, 1, 7, 5, 8, 3, 3, 1 ],
38
+ [ 10, 10, 4, 10, 3, 2, 3, 8, 3, 7, 1, 5, 5, 6, 1, 8, 3, 8 ],
39
+ [ 7, 1, 1, 1, 10, 1, 7, 6, 6, 2, 5, 5, 7, 9, 6, 3, 3, 5 ],
40
+ [ 4, 10, 2, 1, 7, 8, 1, 2, 4, 5, 9, 2, 8, 7, 2, 8, 5, 3 ],
41
+ [ 3, 7, 4, 10, 8, 10, 9, 9, 6, 8, 9, 5, 5, 6, 1, 4, 9, 5 ],
42
+ [ 2, 7, 10, 10, 4, 10, 6, 8, 6, 6, 6, 8, 2, 3, 6, 9, 7, 5 ],
43
+ [ 1, 7, 10, 1, 7, 3, 1, 10, 10, 6, 2, 9, 1, 6, 5, 8, 6, 5 ],
44
+ [ 10, 7, 4, 1, 1, 1, 8, 4, 4, 3, 2, 4, 6, 6, 8, 3, 6, 6 ],
45
+ [ 4, 7, 1, 3, 3, 1, 3, 3, 5, 9, 9, 2, 6, 8, 2, 4, 3, 6 ],
46
+ [ 4, 1, 1, 2, 1, 4, 6, 8, 2, 4, 2, 5, 5, 8, 7, 4, 6, 9 ],
47
+ [ 7, 4, 1, 3, 10, 3, 1, 5, 2, 5, 1, 5, 6, 6, 3, 9, 9, 3 ],
48
+ [ 4, 7, 1, 10, 3, 8, 2, 9, 9, 6, 6, 9, 7, 7, 9, 1, 3, 10 ],
49
+ [ 6, 4, 8, 1, 2, 3, 4, 9, 9, 2, 6, 2, 5, 7, 8, 10, 10, 2 ]
50
+ ]
51
+ },
52
+ "FixedCost": {
53
+ "comment": "Creates FixedCost matrix. This matrix contains the fixed charge cost.",
54
+ "value": [
55
+ [ 202.0, 222.0, 100.0, 174.0, 116.0, 253.0, 252.0, 113.0, 261.0, 240.0, 106.0, 146.0, 76.0, 169.0, 247.0, 194.0, 208.0, 242.0 ],
56
+ [ 190.0, 158.0, 243.0, 175.0, 191.0, 243.0, 162.0, 251.0, 248.0, 213.0, 123.0, 65.0, 73.0, 246.0, 181.0, 132.0, 91.0, 264.0 ],
57
+ [ 229.0, 112.0, 107.0, 193.0, 214.0, 120.0, 154.0, 150.0, 94.0, 74.0, 104.0, 152.0, 94.0, 258.0, 264.0, 88.0, 262.0, 220.0 ],
58
+ [ 190.0, 198.0, 130.0, 118.0, 135.0, 91.0, 243.0, 258.0, 98.0, 78.0, 188.0, 129.0, 162.0, 208.0, 110.0, 186.0, 262.0, 223.0 ],
59
+ [ 154.0, 217.0, 156.0, 91.0, 233.0, 191.0, 172.0, 157.0, 202.0, 212.0, 169.0, 173.0, 150.0, 96.0, 210.0, 194.0, 106.0, 221.0 ],
60
+ [ 141.0, 149.0, 234.0, 230.0, 126.0, 113.0, 101.0, 240.0, 138.0, 87.0, 242.0, 189.0, 93.0, 204.0, 184.0, 176.0, 148.0, 140.0 ],
61
+ [ 131.0, 256.0, 147.0, 252.0, 107.0, 112.0, 165.0, 255.0, 71.0, 244.0, 192.0, 168.0, 250.0, 132.0, 177.0, 195.0, 98.0, 105.0 ],
62
+ [ 211.0, 85.0, 124.0, 171.0, 139.0, 115.0, 65.0, 253.0, 217.0, 178.0, 186.0, 87.0, 119.0, 137.0, 82.0, 208.0, 205.0, 223.0 ],
63
+ [ 147.0, 149.0, 214.0, 105.0, 132.0, 131.0, 202.0, 213.0, 81.0, 234.0, 226.0, 202.0, 138.0, 245.0, 148.0, 209.0, 177.0, 152.0 ],
64
+ [ 249.0, 126.0, 145.0, 235.0, 234.0, 92.0, 201.0, 142.0, 106.0, 113.0, 134.0, 90.0, 138.0, 114.0, 239.0, 222.0, 262.0, 205.0 ],
65
+ [ 95.0, 251.0, 145.0, 131.0, 130.0, 222.0, 192.0, 179.0, 183.0, 234.0, 196.0, 106.0, 200.0, 147.0, 72.0, 176.0, 231.0, 160.0 ],
66
+ [ 109.0, 234.0, 78.0, 115.0, 136.0, 221.0, 252.0, 129.0, 80.0, 94.0, 65.0, 177.0, 258.0, 137.0, 185.0, 242.0, 181.0, 132.0 ],
67
+ [ 107.0, 233.0, 91.0, 112.0, 261.0, 150.0, 119.0, 102.0, 207.0, 138.0, 71.0, 122.0, 125.0, 166.0, 168.0, 144.0, 174.0, 241.0 ],
68
+ [ 191.0, 154.0, 101.0, 66.0, 156.0, 128.0, 234.0, 75.0, 86.0, 210.0, 231.0, 79.0, 105.0, 166.0, 147.0, 171.0, 241.0, 80.0 ]
69
+ ]
70
+ }
71
+ },
72
+ "formulas": {
73
+ "comment": "A new matrix is created using the MATOP function by applying two operators, oper1 and oper2, MATOP(A, oper1, oper2, B); For each k: MATOP[x, y] = MATOP[x, y] oper2 (A[x, k] oper1 B[k, y]). For more information on this function, see https://www.solver.com/risk-solver-help/psi-function-help/matrices/matop.",
74
+ "xup": {
75
+ "dimensions": [ "rows", "cols" ],
76
+ "formula": "MATOP(Supply, 'min', '+', transpose(Demand))"
77
+ }
78
+ },
79
+ "variables": {
80
+ "comment": "This model includes two variable blocks, x and y. The x variable array contains 252 continuous variables. The y variable array contains 252 binary (0,1) variables.",
81
+ "x": {
82
+ "comment": "Creates x double array to hold 252 variables (14 * 18). All vars have been given an initial value of 0 using 'value' and a lower bound of 0, using 'lower'. The final variable values will be returned in the results due to the presence of the 'finalValue' keyword.",
83
+ "dimensions": [ "rows", "cols" ],
84
+ "value": 0,
85
+ "lower": 0,
86
+ "finalValue": []
87
+ },
88
+ "y": {
89
+ "comment": "Creates y double array to hold 252 more variables (14 * 18). All vars have been given an initial value of 0 using 'value', a lower bound of 0, using 'lower' and an upper bound of 1 using 'upper'. The 'type' property specifies that variables in this array must be integer, or binary variables, taking on values of either 0 or 1. The final variable values will be returned in the results due to the presence of the 'finalValue' keyword. The 'fix' constraint will ensure that if the corresponding x variable is nonzero, the corresponding y variable will be forced to 1, (i.e. if x(1,1) is > 0, y(1,1) = 1. ",
90
+ "dimensions": [ "rows", "cols" ],
91
+ "value": 0,
92
+ "lower": 0,
93
+ "upper": 1,
94
+ "type": "int",
95
+ "finalValue": []
96
+ }
97
+ },
98
+ "constraints": {
99
+ "comment": "Contains 18 + 14 + 252 = 284 constraints.",
100
+ "con1": {
101
+ "comment": "Generates Demand constraints: Adds up the continuous variable values by row and sets each formula equal to the appropriate demand value (i.e. x(1,1) + x(2,1) + x(3,1) + ... x(18,1) = 6 where 6 is Demand[1].",
102
+ "dimensions": [ "cols" ],
103
+ "formula": "transpose(ROWOP(x, '+'))",
104
+ "equal": "Demand"
105
+ },
106
+ "con2": {
107
+ "comment": "Generates Supply constraints: Adds up the continuous variable values by column and sets each formula equal to the appropriate supply value (i.e. x(1,1) + x(2,1) + x(3,1) + ... x(18,1) = 21 where 21 is Supply[1].",
108
+ "dimensions": [ "rows" ],
109
+ "formula": "COLOP(x, '+')",
110
+ "equal": "Supply"
111
+ },
112
+ "fix": {
113
+ "comment": "Creates the fixed charge constraint that forces the y variables to 1 when the corresponding x variable i nonzero. This type of constraint is otherwise known as a fixed-charge constraint because it applies a fixed cost if a truck route is selected.",
114
+ "dimensions": [ "rows", "cols" ],
115
+ "formula": "xup * y - x",
116
+ "lower": 0
117
+ }
118
+ },
119
+ "objective": {
120
+ "obj": {
121
+ "comment": "The objective minimizes the transportation costs by adding the sumproduct of the Fixed Cost matrix and the y matrix with the sumproduct of the Cost matrix and the x matrix.",
122
+ "type": "minimize",
123
+ "formula": "sumproduct(FixedCost, y) + sumproduct(Cost, x)",
124
+ "finalValue": []
125
+ }
126
+ }
127
127
  }
@@ -1,64 +1,64 @@
1
- {
2
- "modelName": "AirlineHubExample",
3
- "modelDescription": "Airline Hub Nonlinear RASON Optimization Example: Finds the hub location that minimizes the overall distance to 6 different airports. This example uses the distance formula to determine the distance between the projected hub and each of the 6 airports, SQRT((x1 - x0) + (y1 - y0)) The objective returns the coordinates of the prospective location.",
4
- "modelType": "optimization",
5
- "engineSettings": {
6
- "engine": "GRG Nonlinear"
7
- },
8
- "variables": {
9
- "comment": "3 variables: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue.",
10
- "x": {
11
- "value": 1.0,
12
- "finalValue": []
13
- },
14
- "y": {
15
- "value": 1.0,
16
- "finalValue": []
17
- },
18
- "z": {
19
- "value": 1.0,
20
- "finalValue": []
21
- }
22
- },
23
- "constraints": {
24
- "comment": "Each constraint calculates the distance between the proposed hub and each of the 6 airports. Originally, each constraint would be of the form SQRT((x1 - x0) + (y1 - y0)) <= z where z is the artificial variable. When z is minimized in the objective, it has a 'squashing' effect that pushes the distance formula to be as small as possible, thereby moving the (x,y) coordinates to such a place that minimizes the distance between the hub and all 6 airports. (To convert the constraint to standard form, z is subtracted from both sides of the equation, leaving SQRT((x1 - x0) + (y1 - y0)) - z <= 0.)",
25
- "c1": {
26
- "comment": "Minimize the distance between the proposed hub and airport 1.",
27
- "formula": "sqrt((x - 1)^2 + (y - 4)^2) - z",
28
- "upper": 0
29
- },
30
- "c2": {
31
- "comment": "Minimize the distance between the proposed hub and airport 2.",
32
- "formula": "sqrt((x - 0.5)^2 + (y - 3)^2) - z",
33
- "upper": 0
34
- },
35
- "c3": {
36
- "comment": "Minimize the distance between the proposed hub and airport 3.",
37
- "formula": "sqrt((x - 2)^2 + (y - 4)^2) - z",
38
- "upper": 0
39
- },
40
- "c4": {
41
- "comment": "Minimize the distance between the proposed hub and airport 4.",
42
- "formula": "sqrt((x - 2)^2 + (y - 2)^2) - z",
43
- "upper": 0
44
- },
45
- "c5": {
46
- "comment": "Minimize the distance between the proposed hub and airport 5.",
47
- "formula": "sqrt((x - 2)^2 + (y - 5)^2) - z",
48
- "upper": 0
49
- },
50
- "c6": {
51
- "comment": "Minimize the distance between the proposed hub and airport 6.",
52
- "formula": "sqrt((x - 0.5)^2 + (y - 6)^2) - z",
53
- "upper": 0
54
- }
55
- },
56
- "objective": {
57
- "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports.",
58
- "obj": {
59
- "formula": "z",
60
- "type": "minimize",
61
- "finalValue": []
62
- }
63
- }
1
+ {
2
+ "modelName": "AirlineHubExample",
3
+ "modelDescription": "Airline Hub Nonlinear RASON Optimization Example: Finds the hub location that minimizes the overall distance to 6 different airports. This example uses the distance formula to determine the distance between the projected hub and each of the 6 airports, SQRT((x1 - x0) + (y1 - y0)) The objective returns the coordinates of the prospective location.",
4
+ "modelType": "optimization",
5
+ "engineSettings": {
6
+ "engine": "GRG Nonlinear"
7
+ },
8
+ "variables": {
9
+ "comment": "3 variables: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue.",
10
+ "x": {
11
+ "value": 1.0,
12
+ "finalValue": []
13
+ },
14
+ "y": {
15
+ "value": 1.0,
16
+ "finalValue": []
17
+ },
18
+ "z": {
19
+ "value": 1.0,
20
+ "finalValue": []
21
+ }
22
+ },
23
+ "constraints": {
24
+ "comment": "Each constraint calculates the distance between the proposed hub and each of the 6 airports. Originally, each constraint would be of the form SQRT((x1 - x0) + (y1 - y0)) <= z where z is the artificial variable. When z is minimized in the objective, it has a 'squashing' effect that pushes the distance formula to be as small as possible, thereby moving the (x,y) coordinates to such a place that minimizes the distance between the hub and all 6 airports. (To convert the constraint to standard form, z is subtracted from both sides of the equation, leaving SQRT((x1 - x0) + (y1 - y0)) - z <= 0.)",
25
+ "c1": {
26
+ "comment": "Minimize the distance between the proposed hub and airport 1.",
27
+ "formula": "sqrt((x - 1)^2 + (y - 4)^2) - z",
28
+ "upper": 0
29
+ },
30
+ "c2": {
31
+ "comment": "Minimize the distance between the proposed hub and airport 2.",
32
+ "formula": "sqrt((x - 0.5)^2 + (y - 3)^2) - z",
33
+ "upper": 0
34
+ },
35
+ "c3": {
36
+ "comment": "Minimize the distance between the proposed hub and airport 3.",
37
+ "formula": "sqrt((x - 2)^2 + (y - 4)^2) - z",
38
+ "upper": 0
39
+ },
40
+ "c4": {
41
+ "comment": "Minimize the distance between the proposed hub and airport 4.",
42
+ "formula": "sqrt((x - 2)^2 + (y - 2)^2) - z",
43
+ "upper": 0
44
+ },
45
+ "c5": {
46
+ "comment": "Minimize the distance between the proposed hub and airport 5.",
47
+ "formula": "sqrt((x - 2)^2 + (y - 5)^2) - z",
48
+ "upper": 0
49
+ },
50
+ "c6": {
51
+ "comment": "Minimize the distance between the proposed hub and airport 6.",
52
+ "formula": "sqrt((x - 0.5)^2 + (y - 6)^2) - z",
53
+ "upper": 0
54
+ }
55
+ },
56
+ "objective": {
57
+ "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports.",
58
+ "obj": {
59
+ "formula": "z",
60
+ "type": "minimize",
61
+ "finalValue": []
62
+ }
63
+ }
64
64
  }
@@ -1,48 +1,48 @@
1
- {
2
- "modelName": "AirlineHub2Example",
3
- "modelDescription": "Airline Hub 2 RASON Nonlinear Optimization Example: Same problem as AirlineHubExample but this example uses block constraints. (Recall that this RASON example finds the minimum distance between a proposed airline hub location and several regional cities.) This model still finds the location that minimizes the overall distance to 6 different airports",
4
- "modelType": "optimization",
5
- "variables": {
6
- "comment": "As with AirlineHubExample, there are 3 variables in the model: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue.",
7
-
8
- "x": {
9
- "value": 1.0,
10
- "finalValue": []
11
- },
12
- "y": {
13
- "value": 1.0,
14
- "finalValue": []
15
- },
16
- "z": {
17
- "value": 1.0,
18
- "finalValue": []
19
- }
20
- },
21
- "data": {
22
- "comment": "The data section holds the x and y coordinates of each of the 6 airports. Supplying the x and y coordinates in two arrays allows all 6 constraints to be entered as a constraint block. See 'constraints' section below. In this example, the size of the arrays are inferred by the number of values passed to each array.",
23
- "dx": {
24
- "comment": "These are the x coordinates of each of the 6 airports.",
25
- "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
26
- },
27
- "dy": {
28
- "comment": "These are the y coordinates of each of the 6 airports.",
29
- "value": [ 4, 3, 4, 2, 5, 6 ]
30
- }
31
- },
32
- "constraints": {
33
- "comment": "In AirlineHubExample, each constraint was entered separately. In this example, all six constraints are entered at once. This was made possible by the x and y coordinates being supplied via two arrays, dx and dy. Recall from the original AirlineHubExample, that each constraint calculates the distance between the proposed hub and each of the 6 airports. Originally, each constraint would be of the form SQRT((x1 - x0) + (y1 - y0)) <= z where z is the artificial variable. When z is minimized in the objective, it has a 'squashing' effect that pushes the distance formula to be as small as possible, thereby moving the (x,y) coordinates to such a place that minimizes the distance between the hub and all 6 airports. (To convert the constraint to standard form, z is subtracted from both sides of the equation, leaving SQRT((x1 - x0) + (y1 - y0)) - z <= 0.) Notice that the 'dimensions' propety is used to explicitly create the array of size 6.",
34
- "c": {
35
- "dimensions": [ 6 ],
36
- "formula": "sqrt((x - dx)^2 + (y - dy)^2) - z",
37
- "upper": 0
38
- }
39
- },
40
- "objective": {
41
- "obj": {
42
- "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports.",
43
- "formula": "z",
44
- "type": "minimize",
45
- "finalValue": []
46
- }
47
- }
1
+ {
2
+ "modelName": "AirlineHub2Example",
3
+ "modelDescription": "Airline Hub 2 RASON Nonlinear Optimization Example: Same problem as AirlineHubExample but this example uses block constraints. (Recall that this RASON example finds the minimum distance between a proposed airline hub location and several regional cities.) This model still finds the location that minimizes the overall distance to 6 different airports",
4
+ "modelType": "optimization",
5
+ "variables": {
6
+ "comment": "As with AirlineHubExample, there are 3 variables in the model: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue.",
7
+
8
+ "x": {
9
+ "value": 1.0,
10
+ "finalValue": []
11
+ },
12
+ "y": {
13
+ "value": 1.0,
14
+ "finalValue": []
15
+ },
16
+ "z": {
17
+ "value": 1.0,
18
+ "finalValue": []
19
+ }
20
+ },
21
+ "data": {
22
+ "comment": "The data section holds the x and y coordinates of each of the 6 airports. Supplying the x and y coordinates in two arrays allows all 6 constraints to be entered as a constraint block. See 'constraints' section below. In this example, the size of the arrays are inferred by the number of values passed to each array.",
23
+ "dx": {
24
+ "comment": "These are the x coordinates of each of the 6 airports.",
25
+ "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
26
+ },
27
+ "dy": {
28
+ "comment": "These are the y coordinates of each of the 6 airports.",
29
+ "value": [ 4, 3, 4, 2, 5, 6 ]
30
+ }
31
+ },
32
+ "constraints": {
33
+ "comment": "In AirlineHubExample, each constraint was entered separately. In this example, all six constraints are entered at once. This was made possible by the x and y coordinates being supplied via two arrays, dx and dy. Recall from the original AirlineHubExample, that each constraint calculates the distance between the proposed hub and each of the 6 airports. Originally, each constraint would be of the form SQRT((x1 - x0) + (y1 - y0)) <= z where z is the artificial variable. When z is minimized in the objective, it has a 'squashing' effect that pushes the distance formula to be as small as possible, thereby moving the (x,y) coordinates to such a place that minimizes the distance between the hub and all 6 airports. (To convert the constraint to standard form, z is subtracted from both sides of the equation, leaving SQRT((x1 - x0) + (y1 - y0)) - z <= 0.) Notice that the 'dimensions' propety is used to explicitly create the array of size 6.",
34
+ "c": {
35
+ "dimensions": [ 6 ],
36
+ "formula": "sqrt((x - dx)^2 + (y - dy)^2) - z",
37
+ "upper": 0
38
+ }
39
+ },
40
+ "objective": {
41
+ "obj": {
42
+ "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports.",
43
+ "formula": "z",
44
+ "type": "minimize",
45
+ "finalValue": []
46
+ }
47
+ }
48
48
  }
@@ -1,48 +1,48 @@
1
- {
2
- "modelName": "AirlineHub3Example",
3
- "modelDescription": "Airline Hub 3 RASON Nonlinear Optimization Example: Same problem as AirlineHubExample and AirlineHub2Example but this example specifies the dimension directly for the data and constraint arrays. (Recall that these two RASON examples find the minimum distance between a proposed airline hub location and several regional cities.) This model still finds the location that minimizes the overall distance to 6 different airports",
4
- "modelType": "optimization",
5
- "variables": {
6
- "comment": "As with AirlineHubExample, there are 3 variables in the model: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue. This section remains unchanged from the previous example, AirlineHub2Example.",
7
- "x": {
8
- "value": 1.0,
9
- "finalValue": []
10
- },
11
- "y": {
12
- "value": 1.0,
13
- "finalValue": []
14
- },
15
- "z": {
16
- "value": 1.0,
17
- "finalValue": []
18
- }
19
- },
20
- "data": {
21
- "comment": "The data section holds the x and y coordinates of each of the 6 airports. Supplying the x and y coordinates in two arrays allows all 6 constraints to be entered as a constraint block. See 'constraints' section below. In this example, the array dimensions are explicitly set using the dimensions property.",
22
- "dx": {
23
- "dimensions": [ 6 ],
24
- "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
25
- },
26
- "dy": {
27
- "dimensions": [ 6 ],
28
- "value": [ 4, 3, 4, 2, 5, 6 ]
29
- }
30
- },
31
- "constraints": {
32
- "comment": "The only difference for this section compared with AirlineHub2Example, is that in this example, the finalValue keyword is present which means that the final value of each constraint will be returned in the results.",
33
- "c": {
34
- "dimensions": [ 6 ],
35
- "formula": "sqrt((x - dx)^2 + (y - dy)^2) - z",
36
- "upper": 0,
37
- "finalValue": []
38
- }
39
- },
40
- "objective": {
41
- "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports. This section remains unchanged from the previous example, AirlineHub2Example.",
42
- "obj": {
43
- "formula": "z",
44
- "type": "minimize",
45
- "finalValue": []
46
- }
47
- }
1
+ {
2
+ "modelName": "AirlineHub3Example",
3
+ "modelDescription": "Airline Hub 3 RASON Nonlinear Optimization Example: Same problem as AirlineHubExample and AirlineHub2Example but this example specifies the dimension directly for the data and constraint arrays. (Recall that these two RASON examples find the minimum distance between a proposed airline hub location and several regional cities.) This model still finds the location that minimizes the overall distance to 6 different airports",
4
+ "modelType": "optimization",
5
+ "variables": {
6
+ "comment": "As with AirlineHubExample, there are 3 variables in the model: x, y and z. x and y are the (x, y) coordinates of the proposed hub location. z is an artificial variable that will be minimized in the objective. The initial value of each variable is set to 1 using the value property and the final values will be returned in the result due to the presence of the keyword, finalValue. This section remains unchanged from the previous example, AirlineHub2Example.",
7
+ "x": {
8
+ "value": 1.0,
9
+ "finalValue": []
10
+ },
11
+ "y": {
12
+ "value": 1.0,
13
+ "finalValue": []
14
+ },
15
+ "z": {
16
+ "value": 1.0,
17
+ "finalValue": []
18
+ }
19
+ },
20
+ "data": {
21
+ "comment": "The data section holds the x and y coordinates of each of the 6 airports. Supplying the x and y coordinates in two arrays allows all 6 constraints to be entered as a constraint block. See 'constraints' section below. In this example, the array dimensions are explicitly set using the dimensions property.",
22
+ "dx": {
23
+ "dimensions": [ 6 ],
24
+ "value": [ 1, 0.5, 2, 2, 2, 0.5 ]
25
+ },
26
+ "dy": {
27
+ "dimensions": [ 6 ],
28
+ "value": [ 4, 3, 4, 2, 5, 6 ]
29
+ }
30
+ },
31
+ "constraints": {
32
+ "comment": "The only difference for this section compared with AirlineHub2Example, is that in this example, the finalValue keyword is present which means that the final value of each constraint will be returned in the results.",
33
+ "c": {
34
+ "dimensions": [ 6 ],
35
+ "formula": "sqrt((x - dx)^2 + (y - dy)^2) - z",
36
+ "upper": 0,
37
+ "finalValue": []
38
+ }
39
+ },
40
+ "objective": {
41
+ "comment": "Minimize the artificial variable z. This minimization 'squashes' all six of the distance formulas. The resulting (x,y) coordinate will be the coordinate that minimizes the distance between the hub and all six airports. This section remains unchanged from the previous example, AirlineHub2Example.",
42
+ "obj": {
43
+ "formula": "z",
44
+ "type": "minimize",
45
+ "finalValue": []
46
+ }
47
+ }
48
48
  }