@frontlinesystems/rason-mcp-server 2026.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +35 -0
- package/README.md +282 -0
- package/examples/EXAMPLES_REFERENCE.md +128 -0
- package/examples/Optimization/Conic/AirlineHubConic.json +112 -0
- package/examples/Optimization/Conic/AirlineHubConic2.json +109 -0
- package/examples/Optimization/Conic/AirlineHubConic3.json +112 -0
- package/examples/Optimization/Conic/AirlineHubConic4.json +100 -0
- package/examples/Optimization/Conic/AirlineHubConic5.json +102 -0
- package/examples/Optimization/DataBinding/ProductMixCsv.json +82 -0
- package/examples/Optimization/DataBinding/ProductMixCsv4.json +96 -0
- package/examples/Optimization/DataBinding/ProductMixExcel.json +74 -0
- package/examples/Optimization/DataBinding/ProductMixExcel1.json +87 -0
- package/examples/Optimization/DataBinding/ProductMixExcel11.json +109 -0
- package/examples/Optimization/DataBinding/ProductMixExcel2.json +78 -0
- package/examples/Optimization/DataBinding/ProductMixTab.json +90 -0
- package/examples/Optimization/DataBinding/ProductMixTab1.json +74 -0
- package/examples/Optimization/DataBinding/ProductMixTab2.json +78 -0
- package/examples/Optimization/Linear/Inventory.json +200 -0
- package/examples/Optimization/Linear/Matop.json +120 -0
- package/examples/Optimization/Linear/ProductMix.json +98 -0
- package/examples/Optimization/Linear/ProductMix2.json +73 -0
- package/examples/Optimization/Linear/ProductMix3.json +50 -0
- package/examples/Optimization/Linear/ProductMix4.json +57 -0
- package/examples/Optimization/Linear/ProductMixCsv1.json +106 -0
- package/examples/Optimization/Linear/ProductMixCsv2.json +106 -0
- package/examples/Optimization/Linear/ProductMixSQL11.json +82 -0
- package/examples/Optimization/Linear/Rowop.json +127 -0
- package/examples/Optimization/NonLinear/AirlineHub.json +64 -0
- package/examples/Optimization/NonLinear/AirlineHub2.json +48 -0
- package/examples/Optimization/NonLinear/AirlineHub3.json +48 -0
- package/examples/Optimization/NonSmooth/Inventory2.json +160 -0
- package/examples/Optimization/Quadratic/PortfolioOpt.json +56 -0
- package/examples/Optimization/Quadratic/PortfolioOpt2.json +66 -0
- package/examples/Optimization/WithUncertainty/GasCompanyChance.json +79 -0
- package/examples/Optimization/WithUncertainty/GasCompanyRecourse.json +79 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect.json +78 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect2.json +82 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect3.json +85 -0
- package/examples/Optimization/WithUncertainty/ProjectSelect4.json +75 -0
- package/examples/Simulation/CandyStoreSalesUsingSIP.json +148 -0
- package/examples/Simulation/CollegeFundGrowth1.json +424 -0
- package/examples/Simulation/CollegeFundGrowth1SIPModel.json +28 -0
- package/examples/Simulation/CollegeFundGrowth2.json +416 -0
- package/examples/Simulation/CollegeFundGrowthSIP.json +402 -0
- package/examples/Simulation/GBMSimulationModel.json +237 -0
- package/examples/Simulation/YieldManagement(Sim).json +70 -0
- package/examples/Simulation/YieldManagement2(Sim).json +73 -0
- package/examples/calculation/DMNExamples/DMN Box Fun with typeDef result.json +54 -0
- package/examples/calculation/DMNExamples/DMN Context example.json +69 -0
- package/examples/calculation/DMNExamples/DMN DT with typeDef result.json +43 -0
- package/examples/calculation/DMNExamples/FEEL Date Time example.json +28 -0
- package/examples/calculation/DMNExamples/FEEL For iteration example.json +66 -0
- package/examples/calculation/DMNExamples/FEEL For with two indices.json +16 -0
- package/examples/calculation/DMNExamples/FEEL For with typeDef result.json +88 -0
- package/examples/calculation/DMNExamples/FEEL If Then Else example.json +26 -0
- package/examples/calculation/DMNExamples/FEEL List example.json +38 -0
- package/examples/calculation/DMNExamples/FEEL List operator.json +17 -0
- package/examples/calculation/DMNExamples/FEEL List with typeDef collection.json +37 -0
- package/examples/calculation/DMNExamples/FEEL Some or Every example.json +66 -0
- package/examples/calculation/DecisionTables/DT Datasource example.json +53 -0
- package/examples/calculation/DecisionTables/DT Date and Time examples.json +92 -0
- package/examples/calculation/DecisionTables/DT Expression example.json +32 -0
- package/examples/calculation/DecisionTables/DT Hit Policy examples.json +137 -0
- package/examples/calculation/DecisionTables/DT Loan Recommend model.json +82 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy Model and Predictive CSV-XML.json +219 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Datasource.json +286 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model and Predictive.json +204 -0
- package/examples/calculation/DecisionTables/DT Loan Strategy model by scratch.json +214 -0
- package/examples/calculation/DecisionTables/DT Output Order example.json +40 -0
- package/examples/calculation/DecisionTables/DT Unique example.json +39 -0
- package/examples/calculation/TypeDefinitions/TypeDefCF.json +65 -0
- package/examples/calculation/TypeDefinitions/TypeDefDT.json +58 -0
- package/examples/datamining/AffinityAnalysis/AssociationRules.json +52 -0
- package/examples/datamining/Classification/DecisionTree.json +91 -0
- package/examples/datamining/Classification/DiscriminantAnalysis.json +82 -0
- package/examples/datamining/Classification/Ensembles/Bagging.json +67 -0
- package/examples/datamining/Classification/Ensembles/Boosting.json +68 -0
- package/examples/datamining/Classification/Ensembles/RandomTrees.json +92 -0
- package/examples/datamining/Classification/FindBestModel.json +87 -0
- package/examples/datamining/Classification/LogisticRegression.json +83 -0
- package/examples/datamining/Classification/NaiveBayes.json +79 -0
- package/examples/datamining/Classification/NearestNeighbors.json +85 -0
- package/examples/datamining/Classification/NeuralNetwork.json +93 -0
- package/examples/datamining/Clustering/Hierarchical.json +55 -0
- package/examples/datamining/Clustering/KMeans.json +72 -0
- package/examples/datamining/DataSources/DelimitedFile.json +50 -0
- package/examples/datamining/DataSources/JSONFile.json +50 -0
- package/examples/datamining/DataSources/MSAccessDatabase.json +50 -0
- package/examples/datamining/DataSources/MSExcelTable.json +51 -0
- package/examples/datamining/DataSources/MSSQLDatabase.json +50 -0
- package/examples/datamining/DataSources/ODATATable.json +50 -0
- package/examples/datamining/DataSources/ODBCDatabase.json +50 -0
- package/examples/datamining/FeatureSelection/LinearWrapping.json +54 -0
- package/examples/datamining/FeatureSelection/LogisticWrapping.json +57 -0
- package/examples/datamining/FeatureSelection/Univariate.json +79 -0
- package/examples/datamining/Regression/DecisionTree.json +82 -0
- package/examples/datamining/Regression/Ensembles/Bagging.json +63 -0
- package/examples/datamining/Regression/Ensembles/Boosting.json +63 -0
- package/examples/datamining/Regression/Ensembles/RandomTrees.json +79 -0
- package/examples/datamining/Regression/FindBestModel.json +87 -0
- package/examples/datamining/Regression/LinearRegression.json +125 -0
- package/examples/datamining/Regression/NearestNeighbors.json +78 -0
- package/examples/datamining/Regression/NeuralNetwork.json +83 -0
- package/examples/datamining/Scoring/JSONClassifier.json +63 -0
- package/examples/datamining/Scoring/JSONClassifierNN.json +63 -0
- package/examples/datamining/Scoring/JSONClusterizer.json +38 -0
- package/examples/datamining/Scoring/JSONForecaster.json +50 -0
- package/examples/datamining/Scoring/JSONLinearRegression.json +57 -0
- package/examples/datamining/Scoring/JSONPCA.json +42 -0
- package/examples/datamining/Scoring/JSONRegressor.json +57 -0
- package/examples/datamining/Scoring/JSONTransformer.json +39 -0
- package/examples/datamining/Scoring/PMMLClassifier.json +43 -0
- package/examples/datamining/Scoring/PMMLForecaster.json +44 -0
- package/examples/datamining/Scoring/PMMLRegressor.json +39 -0
- package/examples/datamining/Scoring/PMMLTransformer.json +39 -0
- package/examples/datamining/Simulation/LinearRegressionSimulation.json +118 -0
- package/examples/datamining/Simulation/SyntheticDataGeneration.json +109 -0
- package/examples/datamining/Simulation/pmml-risk-scoring.json +63 -0
- package/examples/datamining/Summarizer/Summarization.json +55 -0
- package/examples/datamining/TextMining/LatentSemanticAnalysis.json +52 -0
- package/examples/datamining/TextMining/TfIdf-FileData.json +66 -0
- package/examples/datamining/TextMining/TfIdf-InlineData.json +56 -0
- package/examples/datamining/TimeSeries/AddHoltWinters.json +80 -0
- package/examples/datamining/TimeSeries/Arima.json +75 -0
- package/examples/datamining/TimeSeries/DoubleExponential.json +66 -0
- package/examples/datamining/TimeSeries/Exponential.json +65 -0
- package/examples/datamining/TimeSeries/LagAnalysis.json +49 -0
- package/examples/datamining/TimeSeries/MovingAverage.json +66 -0
- package/examples/datamining/TimeSeries/MulHoltWinters.json +66 -0
- package/examples/datamining/TimeSeries/NoTrendHoltWinters.json +66 -0
- package/examples/datamining/Transformation/Binning.json +70 -0
- package/examples/datamining/Transformation/CanonicalVariateAnalysis.json +48 -0
- package/examples/datamining/Transformation/CategoryReduction.json +52 -0
- package/examples/datamining/Transformation/Factorization.json +51 -0
- package/examples/datamining/Transformation/MissingDataHandling.json +84 -0
- package/examples/datamining/Transformation/OneHotEncoding-DataInline.json +55 -0
- package/examples/datamining/Transformation/OneHotEncoding-DatainFile.json +49 -0
- package/examples/datamining/Transformation/PartitionTimeSeries.json +49 -0
- package/examples/datamining/Transformation/Partitioning-DF.json +73 -0
- package/examples/datamining/Transformation/Partitioning.json +47 -0
- package/examples/datamining/Transformation/PartitioningWithOversampling-DF.json +66 -0
- package/examples/datamining/Transformation/PartitioningWithOversampling.json +45 -0
- package/examples/datamining/Transformation/PrincipalComponentsAnalysis.json +53 -0
- package/examples/datamining/Transformation/Rescaling.json +68 -0
- package/examples/datamining/Transformation/Sampling.json +44 -0
- package/examples/datamining/Transformation/StratifiedSampling.json +47 -0
- package/examples/flow/SQLServerTransform.json +261 -0
- package/examples/flow/dm-calc-pipeline.json +278 -0
- package/examples/flow/dm-pipeline-simulation.json +114 -0
- package/examples/flow/opt-sim-pipeline.json +160 -0
- package/examples/flow/sim-dm-pipeline.json +107 -0
- package/examples/flow/sim-sim-pipeline.json +137 -0
- package/examples/index.json +4679 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/DataFiltering/ListwithFilter.json +53 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ProductMix5.json +58 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/compoundWhileStatement.json +36 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/ifThenElseStatement.json +34 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/Loops/nestedLoop.json +26 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/ParallelArray.json +48 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/indexedArray.json +70 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/nonParallelArray.json +50 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/sumAggregateExample.json +338 -0
- package/examples/rason-features/Arrays_Loops_Tables/ArrayExamples/tsp.json +62 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Iter_Sim_RASON.json +191 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Loop_Sim_RASON.json +76 -0
- package/examples/rason-features/BoxIterators/Box_Fun_Sim_RASON.json +109 -0
- package/examples/rason-features/BoxIterators/Box_Iter_SIM_RASON.json +69 -0
- package/examples/rason-features/BoxIterators/Box_Iterator_Calc_Loop.json +183 -0
- package/examples/rason-features/BoxIterators/Box_Iterator_with_typeDef_partial.json +79 -0
- package/examples/rason-features/BoxLambdaExamples/BoxFunOptimize.json +155 -0
- package/examples/rason-features/BoxLambdaExamples/BoxFunSimulate.json +119 -0
- package/examples/rason-features/BoxLambdaExamples/LambdaFunOptimize.json +143 -0
- package/examples/rason-features/BoxLambdaExamples/LambdaFunSimulate.json +82 -0
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocation.json +69 -0
- package/examples/rason-features/ReferenceGuide/RGFirehouseLocationConic.json +114 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixCsv1.json +108 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixExcel11.json +117 -0
- package/examples/rason-features/ReferenceGuide/RGProductMixSQL11.json +108 -0
- package/examples/rason-features/UserGuide/UGAirlineHubCSV.json +67 -0
- package/examples/rason-features/UserGuide/UGForecast.json +51 -0
- package/examples/rason-features/UserGuide/UGProductMix1.json +49 -0
- package/examples/rason-features/UserGuide/UGProductMix2.json +49 -0
- package/examples/rason-features/UserGuide/UGProductMixTab1.json +68 -0
- package/examples/rason-features/UserGuide/UGProductMixTab2.json +77 -0
- package/examples/rason-features/UserGuide/UGProductMixTab3.json +67 -0
- package/examples/rason-features/UserGuide/UGProductMixTab4.json +71 -0
- package/examples/rason-features/UserGuide/UGProductMixTab5.json +68 -0
- package/examples/rason-features/UserGuide/UGProjectSelect0.json +92 -0
- package/examples/rason-features/UserGuide/UGProjectSelect1.json +75 -0
- package/examples/rason-features/UserGuide/UGProjectSelect2.json +75 -0
- package/examples/rason-features/UserGuide/UGYieldManagement1.json +62 -0
- package/examples/rason-features/UserGuide/UGYieldManagement2.json +62 -0
- package/examples/rason-features/UserGuide/UGYieldManagement3.json +64 -0
- package/out/index.cjs +361 -0
- package/package.json +76 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "inventoryExample",
|
|
3
|
+
"modelDescription": "RASON Inventory Planning Optimization Example: Example of non-smooth transformation. You are tasked with minimizing the inventory ordering and holding costs while ensuring there is enough inventory on hand to meet demand over a number of time periods, as well as with maintaining minimum inventory levels for each product. This inventory planning model was originally designed for linear programming, but to properly minimize holding costs, the objective was formulated using IF functions. When the modelSettings property 'transformNonSmooth' is set to True, RASON Decision Services will automatically transform this difficult, hard to solve nonsmooth model into a simple linear mixed integer model.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"modelSettings": {
|
|
6
|
+
"comment": "When 'transformNonSmooth' is set to True, RASON Decision Services will attempt to transform nonsmooth functions such as IF, MAX and ABS into equivalent linear formulations. A transformation will only be performed if the model is diagnosed as nonsmooth and a transformation results in a linear model. Otherwise, the model will be solved 'as is'. ",
|
|
7
|
+
"transformNonSmooth": true
|
|
8
|
+
},
|
|
9
|
+
"variables": {
|
|
10
|
+
"comment": "9 variables are created in this section representing the amount of products to order. The x variables apply to Product 1, y variables to Product 2 and z variables to Product 3. All variables are integers with upper bound=500 and lower bound=0. ",
|
|
11
|
+
"x1": {
|
|
12
|
+
"comment": "Represents the amount of Product 1 to purchase in Period 1. ",
|
|
13
|
+
"type": "int",
|
|
14
|
+
"lower": 0,
|
|
15
|
+
"upper": 500
|
|
16
|
+
},
|
|
17
|
+
"y1": {
|
|
18
|
+
"comment": "Represents the amount of Product 2 to purchase in Period 1. ",
|
|
19
|
+
"type": "int",
|
|
20
|
+
"lower": 0,
|
|
21
|
+
"upper": 500
|
|
22
|
+
},
|
|
23
|
+
"z1": {
|
|
24
|
+
"comment": "Represents the amount of Product 3 to purchase in Period 1.",
|
|
25
|
+
"type": "int",
|
|
26
|
+
"lower": 0,
|
|
27
|
+
"upper": 500
|
|
28
|
+
},
|
|
29
|
+
"x2": {
|
|
30
|
+
"comment": "Represents the amount of Product 1 to purchase in Period 2.",
|
|
31
|
+
"type": "int",
|
|
32
|
+
"lower": 0,
|
|
33
|
+
"upper": 500
|
|
34
|
+
},
|
|
35
|
+
"y2": {
|
|
36
|
+
"comment": "Represents the amount of Product 2 to purchase in Period 2.",
|
|
37
|
+
"type": "int",
|
|
38
|
+
"lower": 0,
|
|
39
|
+
"upper": 500
|
|
40
|
+
},
|
|
41
|
+
"z2": {
|
|
42
|
+
"comment": "Represents the amount of Product 3 to purchase in Period 2.",
|
|
43
|
+
"type": "int",
|
|
44
|
+
"lower": 0,
|
|
45
|
+
"upper": 500
|
|
46
|
+
},
|
|
47
|
+
"x3": {
|
|
48
|
+
"comment": "Represents the amount of Product 1 to purchase in Period 3.",
|
|
49
|
+
"type": "int",
|
|
50
|
+
"lower": 0,
|
|
51
|
+
"upper": 500
|
|
52
|
+
},
|
|
53
|
+
"y3": {
|
|
54
|
+
"comment": "Represents the amount of Product 2 to purchase in Period 3.",
|
|
55
|
+
"type": "int",
|
|
56
|
+
"lower": 0,
|
|
57
|
+
"upper": 500
|
|
58
|
+
},
|
|
59
|
+
"z3": {
|
|
60
|
+
"comment": "Represents the amount of Product 3 to purchase in Period 3.",
|
|
61
|
+
"type": "int",
|
|
62
|
+
"lower": 0,
|
|
63
|
+
"upper": 500
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"formulas": {
|
|
67
|
+
"comment": "Formulas calculating Inventory. Initial Inventory for all products in period 1 is 0. Calculate inventory using the following formula: Initial inventory + production in period 1 - demand in period 1 + production in period 2 - demand in period 2 + production in period 3 - demand in period 3.",
|
|
68
|
+
"ix1": {
|
|
69
|
+
"comment": "Inventory for product 1 after period 1. 0 = no demand for product 1 in period 1.",
|
|
70
|
+
"formula": "x1-0"
|
|
71
|
+
},
|
|
72
|
+
"iy1": {
|
|
73
|
+
"comment": "Inventory for product 2 after period 1. 50 = demand for product 2 in period 1.",
|
|
74
|
+
"formula": "y1-50"
|
|
75
|
+
},
|
|
76
|
+
"iz1": {
|
|
77
|
+
"comment": "Inventory for product 3 after period 1. 0 = no demand for product 3 in period 1.",
|
|
78
|
+
"formula": "z1-0"
|
|
79
|
+
},
|
|
80
|
+
"ix2": {
|
|
81
|
+
"comment": "Inventory for product 1 after period 2. 20 = demand for product 1 in period 2.",
|
|
82
|
+
"formula": "ix1+x2-20"
|
|
83
|
+
},
|
|
84
|
+
"iy2": {
|
|
85
|
+
"comment": "Inventory for product 2 after period 2. 0 = no demand for product 2 in period 2.",
|
|
86
|
+
"formula": "iy1+y2-0"
|
|
87
|
+
},
|
|
88
|
+
"iz2": {
|
|
89
|
+
"comment": "Inventory for product 1 after period 2. 100 = demand for product 3 in period 2.",
|
|
90
|
+
"formula": "iz1+z2-100"
|
|
91
|
+
},
|
|
92
|
+
"ix3": {
|
|
93
|
+
"comment": "Inventory for product 1 after period 3. 0 = no demand for product 1 in period 3.",
|
|
94
|
+
"formula": "ix2+x3-0"
|
|
95
|
+
},
|
|
96
|
+
"iy3": {
|
|
97
|
+
"comment": "Inventory for product 2 after period 3. 50 = demand for product 2 in period 3.",
|
|
98
|
+
"formula": "iy2+y3-50"
|
|
99
|
+
},
|
|
100
|
+
"iz3": {
|
|
101
|
+
"comment": "Inventory for product 3 after period 3. 0 = no demand for product 3 in period 3.",
|
|
102
|
+
"formula": "iz2+z3-0"
|
|
103
|
+
},
|
|
104
|
+
"hold1": {
|
|
105
|
+
"comment": "Calculate the holding cost for period 1",
|
|
106
|
+
"formula": "IF(ix1>0,ix1*10,0)+IF(iy1>0,iy1*10,0)+IF(iz1>0,iz1*10,0)"
|
|
107
|
+
},
|
|
108
|
+
"hold2": {
|
|
109
|
+
"comment": "Calculate the holding cost for period 2",
|
|
110
|
+
"formula": "IF(ix2>0,ix2*10,0)+IF(iy2>0,iy2*10,0)+IF(iz2>0,iz2*10,0)"
|
|
111
|
+
},
|
|
112
|
+
"hold3": {
|
|
113
|
+
"comment": "Calculate the holding cost for period 3",
|
|
114
|
+
"formula": "IF(ix3>0,ix3*10,0)+IF(iy3>0,iy3*10,0)+IF(iz3>0,iz3*10,0)"
|
|
115
|
+
},
|
|
116
|
+
"purch1": {
|
|
117
|
+
"comment": "Calculate the purchasing costs for period 1",
|
|
118
|
+
"formula": "IF(x1>0,500,0)+IF(y1>0,400,0)+IF(z1>0,300,0)"
|
|
119
|
+
},
|
|
120
|
+
"purch2": {
|
|
121
|
+
"comment": "Calculate the purchasing costs for period 2",
|
|
122
|
+
"formula": "IF(x2>0,500,0)+IF(y2>0,400,0)+IF(z2>0,300,0)"
|
|
123
|
+
},
|
|
124
|
+
"purch3": {
|
|
125
|
+
"comment": "Calculate the purchasing costs for period 3",
|
|
126
|
+
"formula": "IF(x3>0,500,0)+IF(y3>0,400,0)+IF(z3>0,300,0)"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"constraints": {
|
|
130
|
+
"comment": "Ending inventory constraints (9) + Total product purchased constraints (3). Lower bound indicates the minimum inventory amount that must be on hand for each product at the end of each period.",
|
|
131
|
+
"c1": {
|
|
132
|
+
"comment": "Ending inventory for product 1 in period 1.",
|
|
133
|
+
"formula": "ix1",
|
|
134
|
+
"lower": 0
|
|
135
|
+
},
|
|
136
|
+
"c2": {
|
|
137
|
+
"comment": "Ending inventory for product 2 in period 1.",
|
|
138
|
+
"formula": "iy1",
|
|
139
|
+
"lower": 20
|
|
140
|
+
},
|
|
141
|
+
"c3": {
|
|
142
|
+
"comment": "Ending inventory for product 3 in period 1.",
|
|
143
|
+
"formula": "iz1",
|
|
144
|
+
"lower": 0
|
|
145
|
+
},
|
|
146
|
+
"c4": {
|
|
147
|
+
"comment": "Ending inventory for product 1 in period 2.",
|
|
148
|
+
"formula": "ix2",
|
|
149
|
+
"lower": 0
|
|
150
|
+
},
|
|
151
|
+
"c5": {
|
|
152
|
+
"comment": "Ending inventory for product 2 in period 2.",
|
|
153
|
+
"formula": "iy2",
|
|
154
|
+
"lower": 20
|
|
155
|
+
},
|
|
156
|
+
"c6": {
|
|
157
|
+
"comment": "Ending inventory for product 3 in period 2.",
|
|
158
|
+
"formula": "iz2",
|
|
159
|
+
"lower": 0
|
|
160
|
+
},
|
|
161
|
+
"c7": {
|
|
162
|
+
"comment": "Ending inventory for product 1 in period 3.",
|
|
163
|
+
"formula": "ix3",
|
|
164
|
+
"lower": 50
|
|
165
|
+
},
|
|
166
|
+
"c8": {
|
|
167
|
+
"comment": "Ending inventory for product 2 in period 3.",
|
|
168
|
+
"formula": "iy3",
|
|
169
|
+
"lower": 20
|
|
170
|
+
},
|
|
171
|
+
"c9": {
|
|
172
|
+
"comment": "Ending inventory for product 3 in period 3.",
|
|
173
|
+
"formula": "iz3",
|
|
174
|
+
"lower": 100
|
|
175
|
+
},
|
|
176
|
+
"c10": {
|
|
177
|
+
"comment": "Maximum purchased products in period 1 must not exceed 150.",
|
|
178
|
+
"formula": "x1 + y1 + z1",
|
|
179
|
+
"upper": 150
|
|
180
|
+
},
|
|
181
|
+
"c11": {
|
|
182
|
+
"comment": "Maximum purchased products in period 2 must not exceed 150.",
|
|
183
|
+
"formula": "x2 + y2 + z2",
|
|
184
|
+
"upper": 150
|
|
185
|
+
},
|
|
186
|
+
"c12": {
|
|
187
|
+
"comment": "Maximum purchased products in period 3 must not exceed 150.",
|
|
188
|
+
"formula": "x3 + y3 + z3",
|
|
189
|
+
"upper": 150
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"objective": {
|
|
193
|
+
"obj": {
|
|
194
|
+
"comment": "The objective function minimizes the total holding costs + the total purchasing costs.",
|
|
195
|
+
"type": "minimize",
|
|
196
|
+
"finalValue": [],
|
|
197
|
+
"formula": "hold1+hold2+hold3+purch1+purch2+purch3"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "matopExample",
|
|
3
|
+
"modelDescription": "RASON example model uses Frontline's MATOP 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
|
+
|
|
5
|
+
"modelType": "optimization",
|
|
6
|
+
"variables": {
|
|
7
|
+
"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.",
|
|
8
|
+
"x": {
|
|
9
|
+
"comment": "Creates x double array to hold 252 variables (14 * 18). All vars have been given an initial value of 0 using 'initial' 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.",
|
|
10
|
+
"dimensions": [ 14, 18 ],
|
|
11
|
+
"value": 0,
|
|
12
|
+
"lower": 0,
|
|
13
|
+
"finalValue": []
|
|
14
|
+
},
|
|
15
|
+
"y": {
|
|
16
|
+
"comment": "Creates y double array to hold 252 more variables (14 * 18). All vars have been given an initial value of 0 using 'initial', 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. ",
|
|
17
|
+
"dimensions": [ 14, 18 ],
|
|
18
|
+
"value": 0,
|
|
19
|
+
"lower": 0,
|
|
20
|
+
"upper": 1,
|
|
21
|
+
"type": "int",
|
|
22
|
+
"finalValue": []
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"data": {
|
|
26
|
+
"comment": "The data section contains constant parameters utilized in the model to generate the constraints and the objective.",
|
|
27
|
+
"I": {
|
|
28
|
+
"comment": "Creates an array of size 14, all values are set to the value of 1.",
|
|
29
|
+
"dimensions": [ 14 ],
|
|
30
|
+
"value": 1
|
|
31
|
+
},
|
|
32
|
+
"J": {
|
|
33
|
+
"comment": "Creates an array of size 18, all values are set to the value of 1.",
|
|
34
|
+
"dimensions": [ 18 ],
|
|
35
|
+
"value": 1
|
|
36
|
+
},
|
|
37
|
+
"Demand": {
|
|
38
|
+
"comment": "Creates an array of size 18 holding the demand. Array dimension inferred by number of values passed for 'value'.",
|
|
39
|
+
"value": [ 6, 13, 21, 11, 20, 4, 35, 13, 20, 9, 7, 18, 14, 22, 33, 45, 11, 8 ]
|
|
40
|
+
},
|
|
41
|
+
"Supply": {
|
|
42
|
+
"comment": "Creates an array of size 14 holding the supply values. Array dimension inferred by number of values passed for 'value'.",
|
|
43
|
+
"value": [ 21, 19, 24, 10, 27, 25, 10, 16, 17, 38, 22, 33, 22, 26 ]
|
|
44
|
+
},
|
|
45
|
+
"Cost": {
|
|
46
|
+
"comment": "Creates the Cost matrix These are the Transportation costs per mile traveled.",
|
|
47
|
+
"value": [
|
|
48
|
+
[ 4, 4, 10, 3, 4, 9, 10, 9, 3, 10, 5, 10, 9, 10, 5, 8, 9, 8 ],
|
|
49
|
+
[ 7, 1, 7, 4, 6, 7, 7, 1, 4, 4, 10, 1, 7, 5, 8, 3, 3, 1 ],
|
|
50
|
+
[ 10, 10, 4, 10, 3, 2, 3, 8, 3, 7, 1, 5, 5, 6, 1, 8, 3, 8 ],
|
|
51
|
+
[ 7, 1, 1, 1, 10, 1, 7, 6, 6, 2, 5, 5, 7, 9, 6, 3, 3, 5 ],
|
|
52
|
+
[ 4, 10, 2, 1, 7, 8, 1, 2, 4, 5, 9, 2, 8, 7, 2, 8, 5, 3 ],
|
|
53
|
+
[ 3, 7, 4, 10, 8, 10, 9, 9, 6, 8, 9, 5, 5, 6, 1, 4, 9, 5 ],
|
|
54
|
+
[ 2, 7, 10, 10, 4, 10, 6, 8, 6, 6, 6, 8, 2, 3, 6, 9, 7, 5 ],
|
|
55
|
+
[ 1, 7, 10, 1, 7, 3, 1, 10, 10, 6, 2, 9, 1, 6, 5, 8, 6, 5 ],
|
|
56
|
+
[ 10, 7, 4, 1, 1, 1, 8, 4, 4, 3, 2, 4, 6, 6, 8, 3, 6, 6 ],
|
|
57
|
+
[ 4, 7, 1, 3, 3, 1, 3, 3, 5, 9, 9, 2, 6, 8, 2, 4, 3, 6 ],
|
|
58
|
+
[ 4, 1, 1, 2, 1, 4, 6, 8, 2, 4, 2, 5, 5, 8, 7, 4, 6, 9 ],
|
|
59
|
+
[ 7, 4, 1, 3, 10, 3, 1, 5, 2, 5, 1, 5, 6, 6, 3, 9, 9, 3 ],
|
|
60
|
+
[ 4, 7, 1, 10, 3, 8, 2, 9, 9, 6, 6, 9, 7, 7, 9, 1, 3, 10 ],
|
|
61
|
+
[ 6, 4, 8, 1, 2, 3, 4, 9, 9, 2, 6, 2, 5, 7, 8, 10, 10, 2 ]
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"FixedCost": {
|
|
65
|
+
"comment": "Creates the FixedCost matrix. These are the fixed costs that must be applied if a route is selected.",
|
|
66
|
+
"value": [
|
|
67
|
+
[ 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 ],
|
|
68
|
+
[ 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 ],
|
|
69
|
+
[ 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 ],
|
|
70
|
+
[ 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 ],
|
|
71
|
+
[ 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 ],
|
|
72
|
+
[ 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 ],
|
|
73
|
+
[ 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 ],
|
|
74
|
+
[ 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 ],
|
|
75
|
+
[ 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 ],
|
|
76
|
+
[ 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 ],
|
|
77
|
+
[ 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 ],
|
|
78
|
+
[ 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 ],
|
|
79
|
+
[ 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 ],
|
|
80
|
+
[ 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 ]
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"formulas": {
|
|
85
|
+
"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.",
|
|
86
|
+
"xup": {
|
|
87
|
+
"dimensions": [ 14, 18 ],
|
|
88
|
+
"formula": "MATOP(Supply, 'min', '+', transpose(Demand))"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"constraints": {
|
|
92
|
+
"comment": "Contains 18 + 14 + 252 = 284 constraints.",
|
|
93
|
+
"con1": {
|
|
94
|
+
"comment": "Adds up the continuous variable values by row and sets each formula equal to the appropriate demand value (i.e. x(1,1) + x(1,2) + x(1,3) + ... x(1,18) = 6 where 6 is Demand[1].",
|
|
95
|
+
"dimensions": [ 18 ],
|
|
96
|
+
"formula": "transpose(MMULT(transpose(I), x))",
|
|
97
|
+
"equal": "Demand"
|
|
98
|
+
},
|
|
99
|
+
"con2": {
|
|
100
|
+
"comment": "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(14,1) = 21 where 21 is Supply[1].",
|
|
101
|
+
"dimensions": [ 14 ],
|
|
102
|
+
"formula": "MMULT(x, J)",
|
|
103
|
+
"equal": "Supply"
|
|
104
|
+
},
|
|
105
|
+
"fix": {
|
|
106
|
+
"comment": "Formula applied to each element of the matrix, i.e. xup(1,1) * y(1,1) - x (1,1) >= 0. This constraint forces the y variable to 1 if the x variable is 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.",
|
|
107
|
+
"dimensions": [ 14, 18 ],
|
|
108
|
+
"formula": "xup * y - x",
|
|
109
|
+
"lower": 0
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"objective": {
|
|
113
|
+
"obj": {
|
|
114
|
+
"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.",
|
|
115
|
+
"type": "minimize",
|
|
116
|
+
"formula": "sumproduct(Fixedcost, y) + sumproduct(Cost, x)",
|
|
117
|
+
"finalValue": []
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "productMixExample",
|
|
3
|
+
"modelDescription": "Product Mix RASON Optimization Example: Recall that the Product Mix example finds the optimal product mix that a company should manufacture in order to maximize gross profit. Assume a company manufactures TVs, stereos and speakers, using a common parts inventory of power supplies, speaker cones, etc. Parts are in limited supply. Determine the most profitable mix of products to produce. See our Tutorial Online for step-by-step instructions on formulating this linear programming model. This RASON model was converted from a model created in Excel using Analytic Solver.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
|
|
6
|
+
"variables": {
|
|
7
|
+
"comment": "The variables are the number of TVs, stereos, and speakers to build. In the original Excel worksheet, they were located in cells D9:F9 where D9 = the number of TVs to be produced, E9 = the number of Stereos to be produced and F9 = the number of Speakers to be produced.",
|
|
8
|
+
"d9:f9": {
|
|
9
|
+
"comment": "D9 is the number of TVs to produce, E9 is the number of Stereos to produce and F9 is the number of Speakers to produce. The keyword, lower, sets the lower bound of each variable to 0. The keyword, value, sets the initial value of the variable to 1. The keyword, finalValue, returns the final value of each variable in the result.",
|
|
10
|
+
"lower": 0,
|
|
11
|
+
"value": 1,
|
|
12
|
+
"finalValue": []
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
"data": {
|
|
17
|
+
"comment": "This section contains the data used to formulate the constraints and the objective. D17:F17 contains the profit per unit for each TV, Stereo, and Speaker produced. The next 5 arrays contain the number of parts required to produce each TV, Stereo and Speaker: D11:F11 - Number of Chassis required, D12:F12 - Number of LCD Screens required, D13:F13 - Number of Speakers required, D14:F14 - Number of Power Supplies required, D15:F15 - Number of Electronics required.",
|
|
18
|
+
"d17:f17": {
|
|
19
|
+
"comment": "Profit per unit for each [TV, Stereo, Speaker]",
|
|
20
|
+
"value": [
|
|
21
|
+
[ 75, 50, 35 ]
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"d11:f11": {
|
|
25
|
+
"comment": "Number of chassis required for each [TV, Stereo, Speaker]",
|
|
26
|
+
"value": [
|
|
27
|
+
[ 1, 1, 0 ]
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"d12:f12": {
|
|
31
|
+
"comment": "Number of LCD Screens required for each [TV, Stereo, Speaker]",
|
|
32
|
+
"value": [
|
|
33
|
+
[ 1, 0, 0 ]
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"d13:f13": {
|
|
37
|
+
"comment": "Number of Speakers required for each [TV, Stereo, Speaker]",
|
|
38
|
+
"value": [
|
|
39
|
+
[ 2, 2, 1 ]
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"d14:f14": {
|
|
43
|
+
"comment": "Number of Power Supplies required for each [TV, Stereo, Speaker]",
|
|
44
|
+
"value": [
|
|
45
|
+
[ 1, 1, 0 ]
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"d15:f15": {
|
|
49
|
+
"comment": "Number of Electronics required for each [TV, Stereo, Speaker]",
|
|
50
|
+
"value": [
|
|
51
|
+
[ 2, 1, 1 ]
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
"constraints": {
|
|
57
|
+
"comment": "5 Constraints limit the amount of products used, to the amount of parts on hand: Chassis - 450, Screens - 250, Speakers - 800, Power Supplies - 450 and Electronics - 600. Notice the use of the Excel sumproduct function to multiply the variables (D9:F9) by the number of parts required to produce each [TV, Stereo, Speaker]. RASON supports the majority of EXCEL functions in the calculation of constraints and the objective. The keywords, lower and upper, set the lower and upper bounds of each constraint, respectively.",
|
|
58
|
+
"c11": {
|
|
59
|
+
"Comment": "Limits the number of Chassis to 450 =#TVS * 1 + #Stereos * 1 + #Speakers * 0",
|
|
60
|
+
"formula": "sumproduct(d9:f9, d11:f11)",
|
|
61
|
+
"lower": 0,
|
|
62
|
+
"upper": 450
|
|
63
|
+
},
|
|
64
|
+
"c12": {
|
|
65
|
+
"Comment": "Limits the number of Screens to 250 =#TVS * 1 + #Stereos * 0 + #Speakers * 0",
|
|
66
|
+
"formula": "sumproduct(d9:f9, d12:f12)",
|
|
67
|
+
"lower": 0,
|
|
68
|
+
"upper": 250
|
|
69
|
+
},
|
|
70
|
+
"c13": {
|
|
71
|
+
"Comment": "Limits the number of Speakers to 800 =#TVS * 2 + #Stereos * 2 + #Speakers * 1",
|
|
72
|
+
"formula": "sumproduct(d9:f9, d13:f13)",
|
|
73
|
+
"lower": 0,
|
|
74
|
+
"upper": 800
|
|
75
|
+
},
|
|
76
|
+
"c14": {
|
|
77
|
+
"Comment": "Limits the number of Power Supplies to 450 =#TVS * 1 + #Stereos * 1 + #Speakers * 0",
|
|
78
|
+
"formula": "sumproduct(d9:f9, d14:f14)",
|
|
79
|
+
"lower": 0,
|
|
80
|
+
"upper": 450
|
|
81
|
+
},
|
|
82
|
+
"c15": {
|
|
83
|
+
"comment": "Limits the number of Electronics to 600: =#TVS * 2 + #Stereos * 1 + #Speakers * 1",
|
|
84
|
+
"formula": "sumproduct(d9:f9, d15:f15)",
|
|
85
|
+
"lower": 0,
|
|
86
|
+
"upper": 600
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
"objective": {
|
|
91
|
+
"comment": "Calculates the objective function to be maximized: =#TVS * 75 + #Stereos * 50 + #Speakers * 35. The keyword, finalValue, returns the final objective value in the result.",
|
|
92
|
+
"d18": {
|
|
93
|
+
"type": "maximize",
|
|
94
|
+
"formula": "sumproduct(d9:f9, d17:f17)",
|
|
95
|
+
"finalValue": []
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "productMix2Example",
|
|
3
|
+
"modelDescription": "Product Mix RASON Optimization Example 2: Recall that the Product Mix example finds the optimal product mix that a company should manufacture in order to maximize gross profit. In this version of the Product Mix model, the data section now contains 2 arrays, rather than 6: D17:F17 - the profit per unit of each [TV, Stereo, Speaker] produced and D11:F15, a double array, - the number of each product required to produce each [TV, Stereo, Speaker]. In the first example, 6 separate arrays were used to supply the constraint coefficient values, or the number of parts required to produce each product. In this example, all values are passed in 1 array. The variables, constraints and objective sections all remain unchanged.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"variables": {
|
|
6
|
+
"comment": "The variables are the number of [TVs, Stereos, Speakers] to build. This section remains unchanged from the original Product Mix Example.",
|
|
7
|
+
"d9:f9": {
|
|
8
|
+
"comment": "D9 is the number of TVS to produce, E9 is the number of Stereos to produce and F9 is the number of Speakers to produce.",
|
|
9
|
+
"lower": 0,
|
|
10
|
+
"value": 0,
|
|
11
|
+
"finalValue": []
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"data": {
|
|
15
|
+
"comment": "D17:F17 contain the coefficient values (profit per unit produced) for each [TV, Stereo, Speaker].",
|
|
16
|
+
"d17:f17": {
|
|
17
|
+
"value": [
|
|
18
|
+
[ 75, 50, 35 ]
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"d11:f15": {
|
|
22
|
+
"comment": "D11:F15 contains all constraint coefficient values, or the number of parts required to produce each [TV, Stereo, Speaker]. The first row of the array passes the number of chassis required to produce each product, the 2nd, the number of Screens, the 3rd, the number of Speakers, the 4th, the number of Power Supply kits and lastly, the number of Electronic kits required to produce each product.",
|
|
23
|
+
"value": [
|
|
24
|
+
[ 1, 1, 0 ],
|
|
25
|
+
[ 1, 0, 0 ],
|
|
26
|
+
[ 2, 2, 1 ],
|
|
27
|
+
[ 1, 1, 0 ],
|
|
28
|
+
[ 2, 1, 1 ]
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"constraints": {
|
|
33
|
+
"comment": "Five constraints limit the number of parts used to the number of parts in inventory: C11 - Number of chassis used <= 450, C12 - Number of screens used <= 250, C13 = Number of Speakers used <= 800, C14 = Number of Power Supply kits used <= 450 and C15 = Number of Electronic kits used <= 600. The Excel sumproduct function is used to multiply the variables by the amount of products required to produce each product. This section remains unchanged.",
|
|
34
|
+
"c11": {
|
|
35
|
+
"comment": "Limits the number of Chassis to 450 =#TVS * 1 + #Stereos * 1 + #Speakers * 0",
|
|
36
|
+
"formula": "sumproduct(d9:f9, d11:f11)",
|
|
37
|
+
"lower": 0,
|
|
38
|
+
"upper": 450
|
|
39
|
+
},
|
|
40
|
+
"c12": {
|
|
41
|
+
"comment": "Limits the number of Screens to 250 =#TVS * 1 + #Stereos * 0 + #Speakers * 0",
|
|
42
|
+
"formula": "sumproduct(d9:f9, d12:f12)",
|
|
43
|
+
"lower": 0,
|
|
44
|
+
"upper": 250
|
|
45
|
+
},
|
|
46
|
+
"c13": {
|
|
47
|
+
"comment": "Limits the number of Speakers to 800 =#TVS * 2 + #Stereos * 2 + #Speakers * 1",
|
|
48
|
+
"formula": "sumproduct(d9:f9, d13:f13)",
|
|
49
|
+
"lower": 0,
|
|
50
|
+
"upper": 800
|
|
51
|
+
},
|
|
52
|
+
"c14": {
|
|
53
|
+
"comment": "Limits the number of Power Supplies to 450 =#TVS * 1 + #Stereos * 1 + #Speakers * 0",
|
|
54
|
+
"formula": "sumproduct(d9:f9, d14:f14)",
|
|
55
|
+
"lower": 0,
|
|
56
|
+
"upper": 450
|
|
57
|
+
},
|
|
58
|
+
"c15": {
|
|
59
|
+
"comment": "Limits the number of Electronics to 600: =#TVS * 2 + #Stereos * 1 + #Speakers * 1",
|
|
60
|
+
"formula": "sumproduct(d9:f9, d15:f15)",
|
|
61
|
+
"lower": 0,
|
|
62
|
+
"upper": 600
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"objective": {
|
|
66
|
+
"comment": "Calculates the objective function to be maximized: =#TVS * 75 + #Stereos * 50 + #Speakers * 35. This section remains unchanged.",
|
|
67
|
+
"d18": {
|
|
68
|
+
"type": "maximize",
|
|
69
|
+
"formula": "sumproduct(d9:f9, d17:f17)",
|
|
70
|
+
"finalValue": []
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "productMix3Example",
|
|
3
|
+
"modelDescription": "Product Mix RASON Optimization Example 3: Recall that the Product Mix example finds the optimal product mix that a company should manufacture in order to maximize gross profit. In this version of the Product Mix model, sensitivity information is returned in the result. This information lets the user know which constraints are binding or non binding. If a constraint is binding, the left hand side of the constraint is equal to its upper or lower bound or both, in the case of an equality. This means that in order to improve the objective, the constraint(s) must be relaxed or moved away from the upper or lower bound. The Dual Value, or Shadow Price, is the change in the objective value of the optimal solution when the constraint is relaxed by one unit within the allowable increase or decrease.",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"variables": {
|
|
6
|
+
"comment": "If the dualValue keyword is present, the variable's dual values will be returned. The variable dual values in the result will be 0 for TVs, 0 for Stereos and -2.5 for Speakers. The reduced cost of -2.5 for Speakers (F9), indicates that, if forced to produce some Speakers, the objective (Total Profit) would decrease by $2.50 for each Speaker made. This is because the production of an alternate more profitable product would be decreased to make way for Speaker production.",
|
|
7
|
+
"d9:f9": {
|
|
8
|
+
"lower": 0,
|
|
9
|
+
"value": 0,
|
|
10
|
+
"finalValue": [],
|
|
11
|
+
"dualValue": []
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"data": {
|
|
15
|
+
"d17:f17": {
|
|
16
|
+
"comment": "D17:F17 contain the coefficient values (profit per unit produced) for each [TV, Stereo, Speaker].",
|
|
17
|
+
"value": [
|
|
18
|
+
[ 75, 50, 35 ]
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"d11:f15": {
|
|
22
|
+
"comment": "D11:F15 contains all constraint coefficient values, or the number of parts required to produce each [TV, Stereo, Speaker]. The first row of the array passes the number of chassis required to produce each product, the 2nd, the number of Screens, the 3rd, the number of Speakers, the 4th, the number of Power Supply kits and lastly, the number of Electronic kits required to produce each product.",
|
|
23
|
+
"value": [
|
|
24
|
+
[ 1, 1, 0 ],
|
|
25
|
+
[ 1, 0, 0 ],
|
|
26
|
+
[ 2, 2, 1 ],
|
|
27
|
+
[ 1, 1, 0 ],
|
|
28
|
+
[ 2, 1, 1 ]
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"constraints": {
|
|
33
|
+
"comment": "Five constraints are created using the Excel MMULT function, which multiplies matrices. The syntax for the function is: MMULT (array1,array2) where array1 and array2 are the arrays or matrices to be multiplied. The constraint right hand sides are contained in the upper array. The resulting constraints are: Chassis - #Tvs * 1 + #Stereos * 1 + #Speakers * 0 <= 450, Screens - #Tvs * 1 + #Stereos * 0 + #Speakers * 0 <= 250, etc. The constraint dual values will be 0 for 1st, 2nd and 4th constraints, 12.5 for the 3rd constraint (Speakers) and 25 for the last constraint (Electronics). Note that a constraint dual value will only be nonzero if the constraint is equal to it's lower or upper bound. In the optimal solution, all 800 Speakers and 600 Electronics, but not all of the additional components such as Chassis, LCD Screens or Power Supplies, are used. Since all Speakers and Electronics are used in the final solution, these two constraints have non-zero dual values. The dual value for Electronics indicates that if we can obtain one more Electronic kit, our objective function value (total profit) will increase by $25. Similarly, if one more speaker can be obtained in the inventory, the objective final value will increase by $12.50.",
|
|
34
|
+
"c11:c15": {
|
|
35
|
+
"formula": "mmult(d11:f15, transpose(d9:f9))",
|
|
36
|
+
"lower": 0,
|
|
37
|
+
"upper": [ 450, 250, 800, 450, 600 ],
|
|
38
|
+
"dualValue": []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"objective": {
|
|
42
|
+
"comment": "Calculates the objective function to be maximized: =#TVS * 75 + #Stereos * 50 + #Speakers * 35. The keyword, initialValue, returns the initial objective value in the result. Since the initial values for all 3 variables are set to 0, the objective's initialValue will also be 0 (=#Tvs * 0, #Stereos * 0 + #Speakers * 0).",
|
|
43
|
+
"d18": {
|
|
44
|
+
"type": "maximize",
|
|
45
|
+
"formula": "sumproduct(d9:f9, d17:f17)",
|
|
46
|
+
"finalValue": [],
|
|
47
|
+
"initialValue": []
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "productMix4Example",
|
|
3
|
+
"modelDescription": "Product Mix RASON Optimization Example 4: This version of the Product Mix example replaces the Excel range array names with improved readable names such as profits, parts, inventory, etc. Recall that the Product Mix example finds the optimal product mix that a company should manufacture in order to maximize gross profit. ",
|
|
4
|
+
"modelType": "optimization",
|
|
5
|
+
"variables": {
|
|
6
|
+
"comment": "The name, D9:F9, has been replaced with the name, x. The previous name D9:F9 automatically created an array of size 3, since the Excel range contained 3 cells: D9, E9 and F9. Since the name is now being replaced with x, the size of the array must be specified. The dimensions keyword explicitly defines the number of dimensions in the array. Since there are 3 variables, the variable array must be of size 3.",
|
|
7
|
+
"x": {
|
|
8
|
+
"dimensions": [ 3 ],
|
|
9
|
+
"value": 0,
|
|
10
|
+
"lower": 0,
|
|
11
|
+
"finalValue": []
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"data": {
|
|
15
|
+
"comment": "The name D17:F17 has been replaced with profits and D11:F15 has been replaced with parts.",
|
|
16
|
+
"profits": {
|
|
17
|
+
"comment": "This array uses the dimensions property to create an array of size 3. Previously, the name D17:F17 automatically created an array of size 3 since this Excel range contained 3 cells: D17, E17, and F17. Note the 'binding' property which serves two functions, one of which is to allow write access to a table or array outside of the RASON model environment. For example, passing 'binding': 'get' to the profits array allows these values to be modified directly through a REST API call, or from within the Query Parameters section on the Editor page. ",
|
|
18
|
+
"dimensions": [ 3 ],
|
|
19
|
+
"value": [ 75, 50, 35 ],
|
|
20
|
+
"binding": "get",
|
|
21
|
+
"finalValue": []
|
|
22
|
+
},
|
|
23
|
+
"parts": {
|
|
24
|
+
"comment": "This array uses the dimensions property to create a double array of size 5 rows and 3 cols. Previously, the name D11:F15 automatically created an array of this size since this Excel range contained 15 cells in 5 rows and 3 cols.",
|
|
25
|
+
"dimensions": [ 5, 3 ],
|
|
26
|
+
"value": [
|
|
27
|
+
[ 1, 1, 0 ],
|
|
28
|
+
[ 1, 0, 0 ],
|
|
29
|
+
[ 2, 2, 1 ],
|
|
30
|
+
[ 1, 1, 0 ],
|
|
31
|
+
[ 2, 1, 1 ]
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"inventory": {
|
|
35
|
+
"comment": "This new array contains the constraint right hand sides, or the number of parts in inventory. No dimensions property is required as the size of the array is inferred through the number of individual values passed (5): [Chassis, Screens, Speakers, Power Supply, Electronics]",
|
|
36
|
+
"value": [ 450, 250, 800, 450, 600 ]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"constraints": {
|
|
40
|
+
"comment": "5 constraints are created in this section.",
|
|
41
|
+
"num_used": {
|
|
42
|
+
"comment": "The name C11:C15 has been replaced with the name, num_used. The dimensions property is used to set the size of the array to 5. The MMULT Excel function multiplies the parts array by the x array creating 5 constraints. The right hand sides of the constraints are passed in the upper property.",
|
|
43
|
+
"dimensions": [ 5 ],
|
|
44
|
+
"formula": "MMULT(parts, x)",
|
|
45
|
+
"lower": 0,
|
|
46
|
+
"upper": "inventory"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"objective": {
|
|
50
|
+
"comment": "The name D18 has been replaced with total. The sumproduct function multiples two arrays, x and profits, creating the formula: x1 * 75 + x2 * 50 + x3 * 35",
|
|
51
|
+
"total": {
|
|
52
|
+
"formula": "sumproduct(x, profits)",
|
|
53
|
+
"type": "maximize",
|
|
54
|
+
"finalValue": []
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|