@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.
- package/LICENSE +35 -35
- package/examples/EXAMPLES_REFERENCE.md +128 -128
- package/examples/{optimization → Optimization}/Conic/AirlineHubConic.json +111 -111
- package/examples/{optimization → Optimization}/Conic/AirlineHubConic2.json +108 -108
- package/examples/{optimization → Optimization}/Conic/AirlineHubConic3.json +111 -111
- package/examples/{optimization → Optimization}/Conic/AirlineHubConic4.json +99 -99
- package/examples/{optimization → Optimization}/Conic/AirlineHubConic5.json +101 -101
- package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv.json +81 -81
- package/examples/{optimization → Optimization}/DataBinding/ProductMixCsv4.json +96 -96
- package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel.json +73 -73
- package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel1.json +86 -86
- package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel11.json +108 -108
- package/examples/{optimization → Optimization}/DataBinding/ProductMixExcel2.json +77 -77
- package/examples/{optimization → Optimization}/DataBinding/ProductMixTab.json +89 -89
- package/examples/{optimization → Optimization}/DataBinding/ProductMixTab1.json +73 -73
- package/examples/{optimization → Optimization}/DataBinding/ProductMixTab2.json +77 -77
- package/examples/{optimization → Optimization}/Linear/Inventory.json +199 -199
- package/examples/{optimization → Optimization}/Linear/Matop.json +119 -119
- package/examples/{optimization → Optimization}/Linear/ProductMix.json +97 -97
- package/examples/{optimization → Optimization}/Linear/ProductMix2.json +72 -72
- package/examples/{optimization → Optimization}/Linear/ProductMix3.json +49 -49
- package/examples/{optimization → Optimization}/Linear/ProductMix4.json +56 -56
- package/examples/{optimization → Optimization}/Linear/ProductMixCsv1.json +106 -106
- package/examples/{optimization → Optimization}/Linear/ProductMixCsv2.json +106 -106
- package/examples/{optimization → Optimization}/Linear/ProductMixSQL11.json +82 -82
- package/examples/{optimization → Optimization}/Linear/Rowop.json +126 -126
- package/examples/{optimization → Optimization}/NonLinear/AirlineHub.json +63 -63
- package/examples/{optimization → Optimization}/NonLinear/AirlineHub2.json +47 -47
- package/examples/{optimization → Optimization}/NonLinear/AirlineHub3.json +47 -47
- package/examples/{optimization → Optimization}/NonSmooth/Inventory2.json +159 -159
- package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt.json +55 -55
- package/examples/{optimization → Optimization}/Quadratic/PortfolioOpt2.json +65 -65
- package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyChance.json +78 -78
- package/examples/{optimization → Optimization}/WithUncertainty/GasCompanyRecourse.json +78 -78
- package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect.json +77 -77
- package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect2.json +81 -81
- package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect3.json +84 -84
- package/examples/{optimization → Optimization}/WithUncertainty/ProjectSelect4.json +74 -74
- package/examples/{simulation → Simulation}/CandyStoreSalesUsingSIP.json +147 -147
- package/examples/{simulation → Simulation}/CollegeFundGrowth1.json +423 -423
- package/examples/{simulation → Simulation}/CollegeFundGrowth1SIPModel.json +27 -27
- package/examples/{simulation → Simulation}/CollegeFundGrowth2.json +415 -415
- package/examples/{simulation → Simulation}/CollegeFundGrowthSIP.json +401 -401
- package/examples/{simulation → Simulation}/GBMSimulationModel.json +236 -236
- package/examples/{simulation → Simulation}/YieldManagement(Sim).json +69 -69
- package/examples/{simulation → Simulation}/YieldManagement2(Sim).json +72 -72
- package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +53 -53
- package/examples/calculation/DMNExamples/DMN Context example.json +69 -69
- package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -43
- package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -28
- package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -66
- package/examples/calculation/DMNExamples/FEEL For with two indices.json +15 -15
- package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -88
- package/examples/calculation/DMNExamples/FEEL If Then Else example.json +25 -25
- package/examples/calculation/DMNExamples/FEEL List example.json +37 -37
- package/examples/calculation/DMNExamples/FEEL List operator.json +17 -17
- package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +36 -36
- package/examples/calculation/DMNExamples/FEEL Some or Every example.json +65 -65
- package/examples/calculation/DecisionTables/DT Datasource example.json +52 -52
- package/examples/calculation/DecisionTables/DT Date and Time examples.json +91 -91
- package/examples/calculation/DecisionTables/DT Expression example.json +32 -32
- package/examples/calculation/DecisionTables/DT Hit Policy examples.json +136 -136
- package/examples/calculation/DecisionTables/DT Loan Recommend model.json +81 -81
- package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +218 -218
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -286
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +203 -203
- package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -214
- package/examples/calculation/DecisionTables/DT Output Order example.json +39 -39
- package/examples/calculation/DecisionTables/DT Unique example.json +38 -38
- package/examples/calculation/TypeDefinitions/TypeDefCF.json +64 -64
- package/examples/calculation/TypeDefinitions/TypeDefDT.json +57 -57
- package/examples/datamining/AffinityAnalysis/AssociationRules.json +51 -51
- package/examples/datamining/Classification/DecisionTree.json +90 -90
- package/examples/datamining/Classification/DiscriminantAnalysis.json +81 -81
- package/examples/datamining/Classification/Ensembles/Bagging.json +66 -66
- package/examples/datamining/Classification/Ensembles/Boosting.json +67 -67
- package/examples/datamining/Classification/Ensembles/RandomTrees.json +91 -91
- package/examples/datamining/Classification/FindBestModel.json +86 -86
- package/examples/datamining/Classification/LogisticRegression.json +82 -82
- package/examples/datamining/Classification/NaiveBayes.json +78 -78
- package/examples/datamining/Classification/NearestNeighbors.json +84 -84
- package/examples/datamining/Classification/NeuralNetwork.json +92 -92
- package/examples/datamining/Clustering/Hierarchical.json +54 -54
- package/examples/datamining/Clustering/KMeans.json +71 -71
- package/examples/datamining/DataSources/DelimitedFile.json +49 -49
- package/examples/datamining/DataSources/JSONFile.json +49 -49
- package/examples/datamining/DataSources/MSAccessDatabase.json +49 -49
- package/examples/datamining/DataSources/MSExcelTable.json +50 -50
- package/examples/datamining/DataSources/MSSQLDatabase.json +49 -49
- package/examples/datamining/DataSources/ODATATable.json +49 -49
- package/examples/datamining/DataSources/ODBCDatabase.json +49 -49
- package/examples/datamining/FeatureSelection/LinearWrapping.json +53 -53
- package/examples/datamining/FeatureSelection/LogisticWrapping.json +56 -56
- package/examples/datamining/FeatureSelection/Univariate.json +78 -78
- package/examples/datamining/Regression/DecisionTree.json +82 -82
- package/examples/datamining/Regression/Ensembles/Bagging.json +62 -62
- package/examples/datamining/Regression/Ensembles/Boosting.json +62 -62
- package/examples/datamining/Regression/Ensembles/RandomTrees.json +78 -78
- package/examples/datamining/Regression/FindBestModel.json +86 -86
- package/examples/datamining/Regression/LinearRegression.json +124 -124
- package/examples/datamining/Regression/NearestNeighbors.json +77 -77
- package/examples/datamining/Regression/NeuralNetwork.json +82 -82
- package/examples/datamining/Scoring/JSONClassifier.json +62 -62
- package/examples/datamining/Scoring/JSONClassifierNN.json +62 -62
- package/examples/datamining/Scoring/JSONClusterizer.json +37 -37
- package/examples/datamining/Scoring/JSONForecaster.json +49 -49
- package/examples/datamining/Scoring/JSONLinearRegression.json +56 -56
- package/examples/datamining/Scoring/JSONPCA.json +41 -41
- package/examples/datamining/Scoring/JSONRegressor.json +56 -56
- package/examples/datamining/Scoring/JSONTransformer.json +38 -38
- package/examples/datamining/Scoring/PMMLClassifier.json +42 -42
- package/examples/datamining/Scoring/PMMLForecaster.json +43 -43
- package/examples/datamining/Scoring/PMMLRegressor.json +38 -38
- package/examples/datamining/Scoring/PMMLTransformer.json +38 -38
- package/examples/datamining/Simulation/LinearRegressionSimulation.json +117 -117
- package/examples/datamining/Simulation/SyntheticDataGeneration.json +108 -108
- package/examples/datamining/Simulation/pmml-risk-scoring.json +62 -62
- package/examples/datamining/Summarizer/Summarization.json +54 -54
- package/examples/datamining/TextMining/LatentSemanticAnalysis.json +51 -51
- package/examples/datamining/TextMining/TfIdf-FileData.json +65 -65
- package/examples/datamining/TextMining/TfIdf-InlineData.json +55 -55
- package/examples/datamining/TimeSeries/AddHoltWinters.json +79 -79
- package/examples/datamining/TimeSeries/Arima.json +74 -74
- package/examples/datamining/TimeSeries/DoubleExponential.json +65 -65
- package/examples/datamining/TimeSeries/Exponential.json +64 -64
- package/examples/datamining/TimeSeries/LagAnalysis.json +48 -48
- package/examples/datamining/TimeSeries/MovingAverage.json +65 -65
- package/examples/datamining/TimeSeries/MulHoltWinters.json +65 -65
- package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +65 -65
- package/examples/datamining/Transformation/Binning.json +69 -69
- package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +47 -47
- package/examples/datamining/Transformation/CategoryReduction.json +51 -51
- package/examples/datamining/Transformation/Factorization.json +50 -50
- package/examples/datamining/Transformation/MissingDataHandling.json +83 -83
- package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +54 -54
- package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +48 -48
- package/examples/datamining/Transformation/PartitionTimeSeries.json +48 -48
- package/examples/datamining/Transformation/Partitioning-DF.json +72 -72
- package/examples/datamining/Transformation/Partitioning.json +46 -46
- package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +65 -65
- package/examples/datamining/Transformation/PartitioningWithOversampling.json +44 -44
- package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +52 -52
- package/examples/datamining/Transformation/Rescaling.json +67 -67
- package/examples/datamining/Transformation/Sampling.json +43 -43
- package/examples/datamining/Transformation/StratifiedSampling.json +46 -46
- package/examples/flow/SQLServerTransform.json +260 -260
- package/examples/flow/dm-calc-pipeline.json +277 -277
- package/examples/flow/dm-pipeline-simulation.json +113 -113
- package/examples/flow/opt-sim-pipeline.json +159 -159
- package/examples/flow/sim-dm-pipeline.json +106 -106
- package/examples/flow/sim-sim-pipeline.json +136 -136
- package/examples/index.json +4678 -4678
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +52 -52
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +57 -57
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +35 -35
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +33 -33
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +25 -25
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +47 -47
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +69 -69
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +49 -49
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +337 -337
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +61 -61
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +190 -190
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +75 -75
- package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +108 -108
- package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +68 -68
- package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -183
- package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -79
- package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +154 -154
- package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +118 -118
- package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +142 -142
- package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +81 -81
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -69
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +113 -113
- package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +107 -107
- package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -117
- package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -108
- package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -67
- package/examples/rason-features/UserGuide/UGForecast.json +50 -50
- package/examples/rason-features/UserGuide/UGProductMix1.json +48 -48
- package/examples/rason-features/UserGuide/UGProductMix2.json +48 -48
- package/examples/rason-features/UserGuide/UGProductMixTab1.json +67 -67
- package/examples/rason-features/UserGuide/UGProductMixTab2.json +76 -76
- package/examples/rason-features/UserGuide/UGProductMixTab3.json +66 -66
- package/examples/rason-features/UserGuide/UGProductMixTab4.json +70 -70
- package/examples/rason-features/UserGuide/UGProductMixTab5.json +67 -67
- package/examples/rason-features/UserGuide/UGProjectSelect0.json +91 -91
- package/examples/rason-features/UserGuide/UGProjectSelect1.json +74 -74
- package/examples/rason-features/UserGuide/UGProjectSelect2.json +74 -74
- package/examples/rason-features/UserGuide/UGYieldManagement1.json +61 -61
- package/examples/rason-features/UserGuide/UGYieldManagement2.json +61 -61
- package/examples/rason-features/UserGuide/UGYieldManagement3.json +63 -63
- package/out/index.cjs +1 -1
- package/package.json +3 -2
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modelName": "LambdaFunOptimize",
|
|
3
|
-
"modelDescription": "In this example, a LAMBDA Excel functon is used to create a custom, reusable function that can be called mulitiple times to calculate the distance between a proposed airline hub and 6 regional airports. Notice that the decision varaibles, constraints and the objective function have not changed from the original AirlineHub example under Examples - Optimization - Nonlinear.",
|
|
4
|
-
"modelType": "optimization",
|
|
5
|
-
"engineSettings": {
|
|
6
|
-
"comment": "Select the GRG nonlinear engine to solve the nonlinear model. Setting 'scaling' to -1 turns off scaling.",
|
|
7
|
-
"engine": "GRG Nonlinear",
|
|
8
|
-
"scaling": -1
|
|
9
|
-
},
|
|
10
|
-
"boxFunctions": {
|
|
11
|
-
"comment": "Use the 'boxFunctions' section to add either a box function or a lambda function to the RASON model. A LAMBDA function can be used to create custom, reusable functions which can be invoked in a RASON model, much like a box function.",
|
|
12
|
-
"DistanceFormula": {
|
|
13
|
-
"comment": "This custom LAMBDA function calculates the distance between two points. In this example, this function will be called to calculate the distance between the proposed hub and each of th 6 regional airports.",
|
|
14
|
-
"result": "LAMBDA(xone,xtwo,yone,ytwo,SQRT((xtwo-xone)^2+(ytwo-yone)^2))"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"variables": {
|
|
18
|
-
"comment": "The 'variables' section holds all the decision variables in the optimization model. There are three.",
|
|
19
|
-
"e13:f13": {
|
|
20
|
-
"comment": "The first two variables represent the x,y coordinates of the proposed airline hub.",
|
|
21
|
-
"value": 1,
|
|
22
|
-
"finalValue": []
|
|
23
|
-
},
|
|
24
|
-
"g20": {
|
|
25
|
-
"comment": "The third variable is an artificial variable that, when minimized in the objective, will have a squashing effect on the distance formula. In the final solution, this variable's value will equal the maximum constraint value.",
|
|
26
|
-
"value": 1,
|
|
27
|
-
"finalValue": []
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"data": {
|
|
31
|
-
"comment": "Use the 'data' section to organize constant data parameters.",
|
|
32
|
-
"e14": {
|
|
33
|
-
"comment": "The x coordinate of the 1st regional airport.",
|
|
34
|
-
"value": 6
|
|
35
|
-
},
|
|
36
|
-
"f14": {
|
|
37
|
-
"comment": "The x coordinate of the 1st regional airport.",
|
|
38
|
-
"value": 2
|
|
39
|
-
},
|
|
40
|
-
"e15": {
|
|
41
|
-
"comment": "The x coordinate of the 2nd regional airport.",
|
|
42
|
-
"value": 5
|
|
43
|
-
},
|
|
44
|
-
"f15": {
|
|
45
|
-
"comment": "The y coordinate of the 2nd regional airport.",
|
|
46
|
-
"value": 5
|
|
47
|
-
},
|
|
48
|
-
"e16": {
|
|
49
|
-
"comment": "The x coordinate of the 3rd regional airport.",
|
|
50
|
-
"value": 4
|
|
51
|
-
},
|
|
52
|
-
"f16": {
|
|
53
|
-
"comment": "The y coordinate of the 3rd regional airport.",
|
|
54
|
-
"value": 8
|
|
55
|
-
},
|
|
56
|
-
"e17": {
|
|
57
|
-
"comment": "The x coordinate of the 4th regional airport.",
|
|
58
|
-
"value": 3
|
|
59
|
-
},
|
|
60
|
-
"f17": {
|
|
61
|
-
"comment": "The y coordinate of the 4th regional airport.",
|
|
62
|
-
"value": 4
|
|
63
|
-
},
|
|
64
|
-
"e18": {
|
|
65
|
-
"comment": "The x coordinate of the 5th regional airport.",
|
|
66
|
-
"value": 3
|
|
67
|
-
},
|
|
68
|
-
"f18": {
|
|
69
|
-
"comment": "The y coordinate of the 5th regional airport.",
|
|
70
|
-
"value": 3
|
|
71
|
-
},
|
|
72
|
-
"e19": {
|
|
73
|
-
"comment": "The x coordinate of the 6th regional airport.",
|
|
74
|
-
"value": 1
|
|
75
|
-
},
|
|
76
|
-
"f19": {
|
|
77
|
-
"comment": "The y coordinate of the 6th regional airport.",
|
|
78
|
-
"value": 2
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"formulas": {
|
|
82
|
-
"comment": "Use the 'formulas' section to calcualte intermediary formulas which can then be used to calculate constraints or the objective.",
|
|
83
|
-
"g14": {
|
|
84
|
-
"comment": "The first constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 1st regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 1st regional airport in cells D14 and F14.",
|
|
85
|
-
"formula": "DistanceFormula($E$13,E14,$F$13,F14)"
|
|
86
|
-
},
|
|
87
|
-
"g15": {
|
|
88
|
-
"comment": "The second constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 2nd regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 2nd regional airport in cells D15 and F15.",
|
|
89
|
-
"formula": "DistanceFormula($E$13,E15,$F$13,F15)"
|
|
90
|
-
},
|
|
91
|
-
"g16": {
|
|
92
|
-
"comment": "The third constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 3rd regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 3rd regional airport in cells D16 and F16.",
|
|
93
|
-
"formula": "DistanceFormula($E$13,E16,$F$13,F16)"
|
|
94
|
-
},
|
|
95
|
-
"g17": {
|
|
96
|
-
"comment": "The fourth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 4th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 4th regional airport in cells D17 and F17.",
|
|
97
|
-
"formula": "DistanceFormula($E$13,E17,$F$13,F17)"
|
|
98
|
-
},
|
|
99
|
-
"g18": {
|
|
100
|
-
"comment": "The fifth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 5th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 5th regional airport in cells D18 and F18.",
|
|
101
|
-
"formula": "DistanceFormula($E$13,E18,$F$13,F18)"
|
|
102
|
-
},
|
|
103
|
-
"g19": {
|
|
104
|
-
"comment": "The sixth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 6th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 6th regional airport in cells D19 and F19.",
|
|
105
|
-
"formula": "DistanceFormula($E$13,E19,$F$13,F19)"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"constraints": {
|
|
109
|
-
"comment": "Sets the artificial variable, G20, to constraint the distance calculation for each regional airport. In the final solution, cell G20 will be equal to the maximum constraint value or MAX(G14, G15, G16, G17, G18, G19). ",
|
|
110
|
-
"airport1con": {
|
|
111
|
-
"formula": "g14 - g20",
|
|
112
|
-
"upper": 0
|
|
113
|
-
},
|
|
114
|
-
"airport2con": {
|
|
115
|
-
"formula": "g15 - g20",
|
|
116
|
-
"upper": 0
|
|
117
|
-
},
|
|
118
|
-
"airport3con": {
|
|
119
|
-
"formula": "g16 - g20",
|
|
120
|
-
"upper": 0
|
|
121
|
-
},
|
|
122
|
-
"airport4con": {
|
|
123
|
-
"formula": "g17 - g20",
|
|
124
|
-
"upper": 0
|
|
125
|
-
},
|
|
126
|
-
"airport5con": {
|
|
127
|
-
"formula": "g18 - g20",
|
|
128
|
-
"upper": 0
|
|
129
|
-
},
|
|
130
|
-
"airport6con": {
|
|
131
|
-
"formula": "g19 - g20",
|
|
132
|
-
"upper": 0
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"objective": {
|
|
136
|
-
"comment": "Minimizes the artifical variable, G20. This creates a squashing effect on the distance calculations. In the final solution, cell G20 will be equal to the maximum constraint value or MAX(G14, G15, G16, G17, G18, G19). ",
|
|
137
|
-
"objective": {
|
|
138
|
-
"formula": "g20",
|
|
139
|
-
"type": "min",
|
|
140
|
-
"finalValue": []
|
|
141
|
-
}
|
|
142
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modelName": "LambdaFunOptimize",
|
|
3
|
+
"modelDescription": "In this example, a LAMBDA Excel functon is used to create a custom, reusable function that can be called mulitiple times to calculate the distance between a proposed airline hub and 6 regional airports. Notice that the decision varaibles, constraints and the objective function have not changed from the original AirlineHub example under Examples - Optimization - Nonlinear.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"engineSettings": {
|
|
6
|
+
"comment": "Select the GRG nonlinear engine to solve the nonlinear model. Setting 'scaling' to -1 turns off scaling.",
|
|
7
|
+
"engine": "GRG Nonlinear",
|
|
8
|
+
"scaling": -1
|
|
9
|
+
},
|
|
10
|
+
"boxFunctions": {
|
|
11
|
+
"comment": "Use the 'boxFunctions' section to add either a box function or a lambda function to the RASON model. A LAMBDA function can be used to create custom, reusable functions which can be invoked in a RASON model, much like a box function.",
|
|
12
|
+
"DistanceFormula": {
|
|
13
|
+
"comment": "This custom LAMBDA function calculates the distance between two points. In this example, this function will be called to calculate the distance between the proposed hub and each of th 6 regional airports.",
|
|
14
|
+
"result": "LAMBDA(xone,xtwo,yone,ytwo,SQRT((xtwo-xone)^2+(ytwo-yone)^2))"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"variables": {
|
|
18
|
+
"comment": "The 'variables' section holds all the decision variables in the optimization model. There are three.",
|
|
19
|
+
"e13:f13": {
|
|
20
|
+
"comment": "The first two variables represent the x,y coordinates of the proposed airline hub.",
|
|
21
|
+
"value": 1,
|
|
22
|
+
"finalValue": []
|
|
23
|
+
},
|
|
24
|
+
"g20": {
|
|
25
|
+
"comment": "The third variable is an artificial variable that, when minimized in the objective, will have a squashing effect on the distance formula. In the final solution, this variable's value will equal the maximum constraint value.",
|
|
26
|
+
"value": 1,
|
|
27
|
+
"finalValue": []
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"data": {
|
|
31
|
+
"comment": "Use the 'data' section to organize constant data parameters.",
|
|
32
|
+
"e14": {
|
|
33
|
+
"comment": "The x coordinate of the 1st regional airport.",
|
|
34
|
+
"value": 6
|
|
35
|
+
},
|
|
36
|
+
"f14": {
|
|
37
|
+
"comment": "The x coordinate of the 1st regional airport.",
|
|
38
|
+
"value": 2
|
|
39
|
+
},
|
|
40
|
+
"e15": {
|
|
41
|
+
"comment": "The x coordinate of the 2nd regional airport.",
|
|
42
|
+
"value": 5
|
|
43
|
+
},
|
|
44
|
+
"f15": {
|
|
45
|
+
"comment": "The y coordinate of the 2nd regional airport.",
|
|
46
|
+
"value": 5
|
|
47
|
+
},
|
|
48
|
+
"e16": {
|
|
49
|
+
"comment": "The x coordinate of the 3rd regional airport.",
|
|
50
|
+
"value": 4
|
|
51
|
+
},
|
|
52
|
+
"f16": {
|
|
53
|
+
"comment": "The y coordinate of the 3rd regional airport.",
|
|
54
|
+
"value": 8
|
|
55
|
+
},
|
|
56
|
+
"e17": {
|
|
57
|
+
"comment": "The x coordinate of the 4th regional airport.",
|
|
58
|
+
"value": 3
|
|
59
|
+
},
|
|
60
|
+
"f17": {
|
|
61
|
+
"comment": "The y coordinate of the 4th regional airport.",
|
|
62
|
+
"value": 4
|
|
63
|
+
},
|
|
64
|
+
"e18": {
|
|
65
|
+
"comment": "The x coordinate of the 5th regional airport.",
|
|
66
|
+
"value": 3
|
|
67
|
+
},
|
|
68
|
+
"f18": {
|
|
69
|
+
"comment": "The y coordinate of the 5th regional airport.",
|
|
70
|
+
"value": 3
|
|
71
|
+
},
|
|
72
|
+
"e19": {
|
|
73
|
+
"comment": "The x coordinate of the 6th regional airport.",
|
|
74
|
+
"value": 1
|
|
75
|
+
},
|
|
76
|
+
"f19": {
|
|
77
|
+
"comment": "The y coordinate of the 6th regional airport.",
|
|
78
|
+
"value": 2
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"formulas": {
|
|
82
|
+
"comment": "Use the 'formulas' section to calcualte intermediary formulas which can then be used to calculate constraints or the objective.",
|
|
83
|
+
"g14": {
|
|
84
|
+
"comment": "The first constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 1st regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 1st regional airport in cells D14 and F14.",
|
|
85
|
+
"formula": "DistanceFormula($E$13,E14,$F$13,F14)"
|
|
86
|
+
},
|
|
87
|
+
"g15": {
|
|
88
|
+
"comment": "The second constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 2nd regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 2nd regional airport in cells D15 and F15.",
|
|
89
|
+
"formula": "DistanceFormula($E$13,E15,$F$13,F15)"
|
|
90
|
+
},
|
|
91
|
+
"g16": {
|
|
92
|
+
"comment": "The third constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 3rd regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 3rd regional airport in cells D16 and F16.",
|
|
93
|
+
"formula": "DistanceFormula($E$13,E16,$F$13,F16)"
|
|
94
|
+
},
|
|
95
|
+
"g17": {
|
|
96
|
+
"comment": "The fourth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 4th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 4th regional airport in cells D17 and F17.",
|
|
97
|
+
"formula": "DistanceFormula($E$13,E17,$F$13,F17)"
|
|
98
|
+
},
|
|
99
|
+
"g18": {
|
|
100
|
+
"comment": "The fifth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 5th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 5th regional airport in cells D18 and F18.",
|
|
101
|
+
"formula": "DistanceFormula($E$13,E18,$F$13,F18)"
|
|
102
|
+
},
|
|
103
|
+
"g19": {
|
|
104
|
+
"comment": "The sixth constraint calls the Lambda function, DistanceFormula, to calculate the distance between the proposed hub location and the 6th regional airport by passing the x and y coordiantes of the proposed hub (the decision variable values), E13 and F13, and the x and y coordinates of the 6th regional airport in cells D19 and F19.",
|
|
105
|
+
"formula": "DistanceFormula($E$13,E19,$F$13,F19)"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"constraints": {
|
|
109
|
+
"comment": "Sets the artificial variable, G20, to constraint the distance calculation for each regional airport. In the final solution, cell G20 will be equal to the maximum constraint value or MAX(G14, G15, G16, G17, G18, G19). ",
|
|
110
|
+
"airport1con": {
|
|
111
|
+
"formula": "g14 - g20",
|
|
112
|
+
"upper": 0
|
|
113
|
+
},
|
|
114
|
+
"airport2con": {
|
|
115
|
+
"formula": "g15 - g20",
|
|
116
|
+
"upper": 0
|
|
117
|
+
},
|
|
118
|
+
"airport3con": {
|
|
119
|
+
"formula": "g16 - g20",
|
|
120
|
+
"upper": 0
|
|
121
|
+
},
|
|
122
|
+
"airport4con": {
|
|
123
|
+
"formula": "g17 - g20",
|
|
124
|
+
"upper": 0
|
|
125
|
+
},
|
|
126
|
+
"airport5con": {
|
|
127
|
+
"formula": "g18 - g20",
|
|
128
|
+
"upper": 0
|
|
129
|
+
},
|
|
130
|
+
"airport6con": {
|
|
131
|
+
"formula": "g19 - g20",
|
|
132
|
+
"upper": 0
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"objective": {
|
|
136
|
+
"comment": "Minimizes the artifical variable, G20. This creates a squashing effect on the distance calculations. In the final solution, cell G20 will be equal to the maximum constraint value or MAX(G14, G15, G16, G17, G18, G19). ",
|
|
137
|
+
"objective": {
|
|
138
|
+
"formula": "g20",
|
|
139
|
+
"type": "min",
|
|
140
|
+
"finalValue": []
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
143
|
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"comment": "Simulation Model with Lambda Function",
|
|
3
|
-
"modelName": "LambdaFunSimulate",
|
|
4
|
-
"modelDescription": "In this example, a LAMBDA Excel functon is used to create a custom, reusable function that can be called mulitiple times to calculate the predicted daily stock price. Notice that the decision varaibles, constraints and the objective function have not changed from the original GBM Simulation Model under Examples - Simulation.",
|
|
5
|
-
"modelType": "simulation",
|
|
6
|
-
"boxFunctions": {
|
|
7
|
-
"comment": "Use the 'boxFunctions' section to add either a box function or a lambda function to the RASON model. A LAMBDA function can be used to create custom, reusable functions which can be invoked in a RASON model, much like a box function.",
|
|
8
|
-
"PredDailyPrice": {
|
|
9
|
-
"comment": "In this example, the lambda function will be called to calculate the daily predicted stock price.",
|
|
10
|
-
"result": "LAMBDA(Volatility,NumofDays,NormDist,Appreciation,Previous,Previous*(Volatility*SQRT(1/NumofDays)*NormDist+ EXP((Appreciation-Volatility^2*0.5)*(1/NumofDays))))"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"uncertainVariables": {
|
|
14
|
-
"comment": "These are the uncertain variables in the model. There are 5 total uncertain functions.",
|
|
15
|
-
"NormDist1": {
|
|
16
|
-
"formula": "PsiNormal(0,1)"
|
|
17
|
-
},
|
|
18
|
-
"NormDist2": {
|
|
19
|
-
"formula": "PsiNormal(0,1)"
|
|
20
|
-
},
|
|
21
|
-
"NormDist3": {
|
|
22
|
-
"formula": "PsiNormal(0,1)"
|
|
23
|
-
},
|
|
24
|
-
"NormDist4": {
|
|
25
|
-
"formula": "PsiNormal(0,1)"
|
|
26
|
-
},
|
|
27
|
-
"NormDist5": {
|
|
28
|
-
"formula": "PsiNormal(0,1)"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"data": {
|
|
32
|
-
"comment": "Use the 'data' section to organize constant parameters in the model: volatility parameter, number of days (NumDays), appreciation rate (AppRate) and the first closing price(FirstClose).",
|
|
33
|
-
"FirstClose": {
|
|
34
|
-
"value": 20.33
|
|
35
|
-
},
|
|
36
|
-
"Volatility": {
|
|
37
|
-
"value": 0.09486,
|
|
38
|
-
"comment": "volatility"
|
|
39
|
-
},
|
|
40
|
-
"NumofDays": {
|
|
41
|
-
"value": 100,
|
|
42
|
-
"comment": "numofdays"
|
|
43
|
-
},
|
|
44
|
-
"Appreciation": {
|
|
45
|
-
"value": 0.0234992098,
|
|
46
|
-
"comment": "appreciation"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"uncertainFunctions": {
|
|
50
|
-
"comment": "All uncertain functions must be entered into the 'uncertainFunctions' section. ",
|
|
51
|
-
"DayOne": {
|
|
52
|
-
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 1st day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
53
|
-
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist1,Appreciation,FirstClose)",
|
|
54
|
-
"mean": [],
|
|
55
|
-
"trials": []
|
|
56
|
-
},
|
|
57
|
-
"DayTwo": {
|
|
58
|
-
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 2nd day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
59
|
-
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist2,Appreciation,DayOne)",
|
|
60
|
-
"mean": [],
|
|
61
|
-
"trials": []
|
|
62
|
-
},
|
|
63
|
-
"DayThree": {
|
|
64
|
-
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 3rd day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
65
|
-
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist3,Appreciation,DayTwo)",
|
|
66
|
-
"mean": [],
|
|
67
|
-
"trials": []
|
|
68
|
-
},
|
|
69
|
-
"DayFour": {
|
|
70
|
-
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 4th day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
71
|
-
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist4,Appreciation,DayThree)",
|
|
72
|
-
"mean": [],
|
|
73
|
-
"trials": []
|
|
74
|
-
},
|
|
75
|
-
"DayFive": {
|
|
76
|
-
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 5th day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
77
|
-
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist5,Appreciation,DayFour)",
|
|
78
|
-
"mean": [],
|
|
79
|
-
"trials": []
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"comment": "Simulation Model with Lambda Function",
|
|
3
|
+
"modelName": "LambdaFunSimulate",
|
|
4
|
+
"modelDescription": "In this example, a LAMBDA Excel functon is used to create a custom, reusable function that can be called mulitiple times to calculate the predicted daily stock price. Notice that the decision varaibles, constraints and the objective function have not changed from the original GBM Simulation Model under Examples - Simulation.",
|
|
5
|
+
"modelType": "simulation",
|
|
6
|
+
"boxFunctions": {
|
|
7
|
+
"comment": "Use the 'boxFunctions' section to add either a box function or a lambda function to the RASON model. A LAMBDA function can be used to create custom, reusable functions which can be invoked in a RASON model, much like a box function.",
|
|
8
|
+
"PredDailyPrice": {
|
|
9
|
+
"comment": "In this example, the lambda function will be called to calculate the daily predicted stock price.",
|
|
10
|
+
"result": "LAMBDA(Volatility,NumofDays,NormDist,Appreciation,Previous,Previous*(Volatility*SQRT(1/NumofDays)*NormDist+ EXP((Appreciation-Volatility^2*0.5)*(1/NumofDays))))"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"uncertainVariables": {
|
|
14
|
+
"comment": "These are the uncertain variables in the model. There are 5 total uncertain functions.",
|
|
15
|
+
"NormDist1": {
|
|
16
|
+
"formula": "PsiNormal(0,1)"
|
|
17
|
+
},
|
|
18
|
+
"NormDist2": {
|
|
19
|
+
"formula": "PsiNormal(0,1)"
|
|
20
|
+
},
|
|
21
|
+
"NormDist3": {
|
|
22
|
+
"formula": "PsiNormal(0,1)"
|
|
23
|
+
},
|
|
24
|
+
"NormDist4": {
|
|
25
|
+
"formula": "PsiNormal(0,1)"
|
|
26
|
+
},
|
|
27
|
+
"NormDist5": {
|
|
28
|
+
"formula": "PsiNormal(0,1)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"data": {
|
|
32
|
+
"comment": "Use the 'data' section to organize constant parameters in the model: volatility parameter, number of days (NumDays), appreciation rate (AppRate) and the first closing price(FirstClose).",
|
|
33
|
+
"FirstClose": {
|
|
34
|
+
"value": 20.33
|
|
35
|
+
},
|
|
36
|
+
"Volatility": {
|
|
37
|
+
"value": 0.09486,
|
|
38
|
+
"comment": "volatility"
|
|
39
|
+
},
|
|
40
|
+
"NumofDays": {
|
|
41
|
+
"value": 100,
|
|
42
|
+
"comment": "numofdays"
|
|
43
|
+
},
|
|
44
|
+
"Appreciation": {
|
|
45
|
+
"value": 0.0234992098,
|
|
46
|
+
"comment": "appreciation"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"uncertainFunctions": {
|
|
50
|
+
"comment": "All uncertain functions must be entered into the 'uncertainFunctions' section. ",
|
|
51
|
+
"DayOne": {
|
|
52
|
+
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 1st day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
53
|
+
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist1,Appreciation,FirstClose)",
|
|
54
|
+
"mean": [],
|
|
55
|
+
"trials": []
|
|
56
|
+
},
|
|
57
|
+
"DayTwo": {
|
|
58
|
+
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 2nd day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
59
|
+
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist2,Appreciation,DayOne)",
|
|
60
|
+
"mean": [],
|
|
61
|
+
"trials": []
|
|
62
|
+
},
|
|
63
|
+
"DayThree": {
|
|
64
|
+
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 3rd day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
65
|
+
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist3,Appreciation,DayTwo)",
|
|
66
|
+
"mean": [],
|
|
67
|
+
"trials": []
|
|
68
|
+
},
|
|
69
|
+
"DayFour": {
|
|
70
|
+
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 4th day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
71
|
+
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist4,Appreciation,DayThree)",
|
|
72
|
+
"mean": [],
|
|
73
|
+
"trials": []
|
|
74
|
+
},
|
|
75
|
+
"DayFive": {
|
|
76
|
+
"comment": "This uncertain function calls the predDailyPrice lambda function to calculate the 5th day's predicted daily stock price. All 1000 trial values and the mean of the function will be returned in the result.",
|
|
77
|
+
"formula": "PredDailyPrice(Volatility,NumofDays,NormDist5,Appreciation,DayFour)",
|
|
78
|
+
"mean": [],
|
|
79
|
+
"trials": []
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
82
|
}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modelName": "RGFirehouseLocation",
|
|
3
|
-
"modelDescription": "RASON Conic Optimization Example: Example of solving a nonlinear Optimization Model with Cone Constraints. The goal of this example is 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.",
|
|
4
|
-
"modelType": "optimization",
|
|
5
|
-
"engineSettings": {
|
|
6
|
-
"comment": "Since this model is nonlinear, the GRG Nonlinear engine is selected as the solving engine.",
|
|
7
|
-
"engine": "GRG Nonlinear"
|
|
8
|
-
},
|
|
9
|
-
"variables": {
|
|
10
|
-
"comment": "This example contains three decision variables x, y and z. The x and y variables will hold the final x and y coordinates of the proposed firehouse location. The third variable, z, will be minimized in the objective function. Since the finalValue property is present, the final value of each variable will be returned in the results.",
|
|
11
|
-
"x": {
|
|
12
|
-
"comment": "The x coordinate of the proposed firehouse location.",
|
|
13
|
-
"value": 1.0,
|
|
14
|
-
"finalValue": []
|
|
15
|
-
},
|
|
16
|
-
"y": {
|
|
17
|
-
"comment": "The y coordinate of the proposed firehouse location.",
|
|
18
|
-
"value": 1.0,
|
|
19
|
-
"finalValue": []
|
|
20
|
-
},
|
|
21
|
-
"z": {
|
|
22
|
-
"comment": "The z variable that will be minimized in the objective function.",
|
|
23
|
-
"value": 1.0,
|
|
24
|
-
"finalValue": []
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"constraints": {
|
|
28
|
-
"comment": "The constraints calculate the distance between the proposed firehouse location and each of the six cities using the the Pythagorean Theorem (SQRT ((Xc – X )^2 + (Yc – Y) ^2)), which is a nonlinear function of the variables.",
|
|
29
|
-
"c1": {
|
|
30
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 1.",
|
|
31
|
-
"formula": "sqrt((x - 1)^2 + (y - 4)^2) - z",
|
|
32
|
-
"upper": 0
|
|
33
|
-
},
|
|
34
|
-
"c2": {
|
|
35
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 2.",
|
|
36
|
-
"formula": "sqrt((x - 0.5)^2 + (y - 3)^2) - z",
|
|
37
|
-
"upper": 0
|
|
38
|
-
},
|
|
39
|
-
"c3": {
|
|
40
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 3.",
|
|
41
|
-
"formula": "sqrt((x - 2)^2 + (y - 4)^2) - z",
|
|
42
|
-
"upper": 0
|
|
43
|
-
},
|
|
44
|
-
"c4": {
|
|
45
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 4.",
|
|
46
|
-
"formula": "sqrt((x - 2)^2 + (y - 2)^2) - z",
|
|
47
|
-
"upper": 0
|
|
48
|
-
},
|
|
49
|
-
"c5": {
|
|
50
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 5.",
|
|
51
|
-
"formula": "sqrt((x - 2)^2 + (y - 5)^2) - z",
|
|
52
|
-
"upper": 0
|
|
53
|
-
},
|
|
54
|
-
"c6": {
|
|
55
|
-
"comment": "Calculates the distance between the proposed firehouse location and city 6.",
|
|
56
|
-
"formula": "sqrt((x - 0.5)^2 + (y - 6)^2) - z",
|
|
57
|
-
"upper": 0
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"objective": {
|
|
61
|
-
"comment": "The objective function minimizes the z variable creating a squashing effect that pushes the distances between the proposed firehouse location and the distance between each city to be as small as possible.",
|
|
62
|
-
"obj": {
|
|
63
|
-
"comment": "Since the finalValue property is present, the final value of the objective function will be returned in the results. Note that the final value for the objective function and the z variable will be equal.",
|
|
64
|
-
"formula": "z",
|
|
65
|
-
"type": "minimize",
|
|
66
|
-
"finalValue": []
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modelName": "RGFirehouseLocation",
|
|
3
|
+
"modelDescription": "RASON Conic Optimization Example: Example of solving a nonlinear Optimization Model with Cone Constraints. The goal of this example is 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.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"engineSettings": {
|
|
6
|
+
"comment": "Since this model is nonlinear, the GRG Nonlinear engine is selected as the solving engine.",
|
|
7
|
+
"engine": "GRG Nonlinear"
|
|
8
|
+
},
|
|
9
|
+
"variables": {
|
|
10
|
+
"comment": "This example contains three decision variables x, y and z. The x and y variables will hold the final x and y coordinates of the proposed firehouse location. The third variable, z, will be minimized in the objective function. Since the finalValue property is present, the final value of each variable will be returned in the results.",
|
|
11
|
+
"x": {
|
|
12
|
+
"comment": "The x coordinate of the proposed firehouse location.",
|
|
13
|
+
"value": 1.0,
|
|
14
|
+
"finalValue": []
|
|
15
|
+
},
|
|
16
|
+
"y": {
|
|
17
|
+
"comment": "The y coordinate of the proposed firehouse location.",
|
|
18
|
+
"value": 1.0,
|
|
19
|
+
"finalValue": []
|
|
20
|
+
},
|
|
21
|
+
"z": {
|
|
22
|
+
"comment": "The z variable that will be minimized in the objective function.",
|
|
23
|
+
"value": 1.0,
|
|
24
|
+
"finalValue": []
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"constraints": {
|
|
28
|
+
"comment": "The constraints calculate the distance between the proposed firehouse location and each of the six cities using the the Pythagorean Theorem (SQRT ((Xc – X )^2 + (Yc – Y) ^2)), which is a nonlinear function of the variables.",
|
|
29
|
+
"c1": {
|
|
30
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 1.",
|
|
31
|
+
"formula": "sqrt((x - 1)^2 + (y - 4)^2) - z",
|
|
32
|
+
"upper": 0
|
|
33
|
+
},
|
|
34
|
+
"c2": {
|
|
35
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 2.",
|
|
36
|
+
"formula": "sqrt((x - 0.5)^2 + (y - 3)^2) - z",
|
|
37
|
+
"upper": 0
|
|
38
|
+
},
|
|
39
|
+
"c3": {
|
|
40
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 3.",
|
|
41
|
+
"formula": "sqrt((x - 2)^2 + (y - 4)^2) - z",
|
|
42
|
+
"upper": 0
|
|
43
|
+
},
|
|
44
|
+
"c4": {
|
|
45
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 4.",
|
|
46
|
+
"formula": "sqrt((x - 2)^2 + (y - 2)^2) - z",
|
|
47
|
+
"upper": 0
|
|
48
|
+
},
|
|
49
|
+
"c5": {
|
|
50
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 5.",
|
|
51
|
+
"formula": "sqrt((x - 2)^2 + (y - 5)^2) - z",
|
|
52
|
+
"upper": 0
|
|
53
|
+
},
|
|
54
|
+
"c6": {
|
|
55
|
+
"comment": "Calculates the distance between the proposed firehouse location and city 6.",
|
|
56
|
+
"formula": "sqrt((x - 0.5)^2 + (y - 6)^2) - z",
|
|
57
|
+
"upper": 0
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"objective": {
|
|
61
|
+
"comment": "The objective function minimizes the z variable creating a squashing effect that pushes the distances between the proposed firehouse location and the distance between each city to be as small as possible.",
|
|
62
|
+
"obj": {
|
|
63
|
+
"comment": "Since the finalValue property is present, the final value of the objective function will be returned in the results. Note that the final value for the objective function and the z variable will be equal.",
|
|
64
|
+
"formula": "z",
|
|
65
|
+
"type": "minimize",
|
|
66
|
+
"finalValue": []
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|