@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,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"flowName": "simDMWorkflow",
|
|
3
|
+
"flowDescription": "Simulation/DataScience workflow example: This decision flow includes two stages: a simulation stage (simStage) and a data science stage (kMeansStage). The first stage runs a simulation, then uses the simulation trial results as data for a clustering algorithm in the 2nd stage. To solve the decision flow, you must first POST the example by clicking the POST icon (cloud icon) on the Editor tab ribbon. Afterwards, click the down arrow next to the play icon and click Solve. This example uses no outside data source files. ",
|
|
4
|
+
"modelType": "flow",
|
|
5
|
+
"simStage": {
|
|
6
|
+
"comment": "Simulation Stage: This first stage solves the original Yield Management Model (YieldManagement(Sim).json downloadable from RASON Examples -- Simulation. Recall that the original example simulated the number of tix sold for a flight. Imagine that the price for a flight ticet from SFO to SEA is $200. Each plane can hold no more than 100 passengers. To protect against loss of revenue from no-shows, the airline would like to sell more than 100 tickets for each flight. Federal regulations require that any ticketed customer who is unable to board the plane due to overbooking is entitled to compensation of 125% of the ticket value paid by the customer. Any no-show customer is refunded 50% of the ticket value paid by the customer. The number of no-shows is randomly distributed with a Lognormal distribution with mean of 10% of the Number of Tickets Sold and standard deviation of 6% of the Number of Tickets Sold. In this stage, the only uncertainty, noShows, depends on the parameter sold. (The ROUND function rounds the fractional value to a whole number.) The number of tickets sold, sold, is set to 110. The uncertain function, revenue - which calculates the total revenue, is a random quantity, since it depends on the number of no-shows. The distribution of Revenue will change with the Number of Tickets Sold.",
|
|
7
|
+
"modelName": "simModel",
|
|
8
|
+
"modelSettings": {
|
|
9
|
+
"comment": "The option, numSimulations, sets the number of simulations to 1 and numTrials, sets the number of trials to 100.",
|
|
10
|
+
"numSimulations": 1,
|
|
11
|
+
"numTrials": 100
|
|
12
|
+
},
|
|
13
|
+
"engineSettings": {
|
|
14
|
+
"comment": "Setting the random number seed to a nonzero value (any number of your choice is OK) ensures that the same sequence of random numbers is used for each simulation. When the seed is zero, the random number generator is initialized from the system clock, so the sequence of random numbers will be different in each simulation. If you need the results from one simulation to another to be strictly comparable, you should set the seed.",
|
|
15
|
+
"randomSeed": 1
|
|
16
|
+
},
|
|
17
|
+
"data": {
|
|
18
|
+
"comment": "Use the data section to organize the constant data parameters in the model.",
|
|
19
|
+
"price": {
|
|
20
|
+
"comment": "Price of a plane ticket.",
|
|
21
|
+
"value": 200
|
|
22
|
+
},
|
|
23
|
+
"capacity": {
|
|
24
|
+
"comment": "# of seats on the plane.",
|
|
25
|
+
"value": 100
|
|
26
|
+
},
|
|
27
|
+
"sold": {
|
|
28
|
+
"comment": "# of tix sold.",
|
|
29
|
+
"value": 110
|
|
30
|
+
},
|
|
31
|
+
"refundNoShows": {
|
|
32
|
+
"comment": "Percent refund for a no-show.",
|
|
33
|
+
"value": 0.5
|
|
34
|
+
},
|
|
35
|
+
"refundOverbook": {
|
|
36
|
+
"comment": "Percent compensation for overbooking.",
|
|
37
|
+
"value": 1.25
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"uncertainVariables": {
|
|
41
|
+
"comment": "Enter all uncertain variables into the uncertainVariables section of the RASON model.",
|
|
42
|
+
"noShows": {
|
|
43
|
+
"comment": "This uncertain variable models the number of people who do not show up for the flight, after they have purchased a ticket.",
|
|
44
|
+
"formula": "PsiLogNormal(0.1*sold, 0.06*sold)",
|
|
45
|
+
"trials": []
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"formulas": {
|
|
49
|
+
"comment": "Use the formulas section to organize the intermediate formulas which can be used as uncertain functions.",
|
|
50
|
+
"showUps": {
|
|
51
|
+
"comment": "Calculates the number of ticketed passengers who actually show up for the flight.",
|
|
52
|
+
"formula": "sold - Round(noShows, 0)"
|
|
53
|
+
},
|
|
54
|
+
"overbook": {
|
|
55
|
+
"comment": "Calculates the number of ticketed passengers who have been 'bumped' from the flight.",
|
|
56
|
+
"formula": "Max(0, showUps - capacity)"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"uncertainFunctions": {
|
|
60
|
+
"comment": "Enter all uncertain functions into the uncertainFunctions section.",
|
|
61
|
+
"revenue": {
|
|
62
|
+
"comment": "This uncertain function calculates the revenue generated by the flight taking into account the number of no-shows and overbookings.",
|
|
63
|
+
"formula": "price*(sold - refundNoShows*Round(noShows, 0) - refundOverbook*overbook)"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"kMeansStage": {
|
|
68
|
+
"comment": "Clustering: k-means stage: This stage accepts all 100 trial values for noShows, or the number of ticketed passengers who fail to appear for the flight, this is the uncertain variable in stage 1. All 100 trial values are imported to myData.",
|
|
69
|
+
"modelName": "kmeansModel",
|
|
70
|
+
"inputParameters": {
|
|
71
|
+
"myData": {
|
|
72
|
+
"value": "simStage.noShows.trials"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"estimator": {
|
|
76
|
+
"comment": "Use the estimator section to create an estimator(s) and set it's options.",
|
|
77
|
+
"kmeansEstimator": {
|
|
78
|
+
"comment": "The estimator, kmeansEstimator, is a k Means clustering estimator. The options set for the estimator are: numClusters, maxIterations, numStarts and randomSeed. For more information on all options for k Means Clustering, see the RASON Reference Guide downloadable from the Help tab on RASON.com.",
|
|
79
|
+
"type": "clustering",
|
|
80
|
+
"algorithm": "kMeans",
|
|
81
|
+
"parameters": {
|
|
82
|
+
"numClusters": 3,
|
|
83
|
+
"maxIterations": 10,
|
|
84
|
+
"numStarts": 5,
|
|
85
|
+
"randomSeed": 123
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"actions": {
|
|
90
|
+
"comment": "Use the actions to perform any type of model fitting or to score new data.",
|
|
91
|
+
"kmeansModel": {
|
|
92
|
+
"comment": "This action, kmeansModel, uses the kmeansEstimator estimator to fit a k Means clustering model to the 100 trial values from the noShow uncertain variable from stage 1. The following output is asked to be returned in the results: cluster centers, inter-cluster distances and the random centers summary. For more information on all evaluations for the k Means Clustering algorith, see the RASON Reference Guide.",
|
|
93
|
+
"trainData": "myData",
|
|
94
|
+
"estimator": "kmeansEstimator",
|
|
95
|
+
"action": "fit",
|
|
96
|
+
"evaluations": [ "clusterCenters", "interClusterDistances", "randomCentersSummary" ]
|
|
97
|
+
},
|
|
98
|
+
"clusteredTrials": {
|
|
99
|
+
"comment": "This action, clusteredTrials, uses the model fit to kmeansModel to score the data imported in myData (i.e. all 100 trial values for the noShows uncertain variable from stage 1) The following output is asked to be returned in the results: predicted values, distance to each cluster for all predicted values, cluster summary information. For more information on all evaluations for the k Means Clustering algorith, see the RASON Reference Guide.",
|
|
100
|
+
"data": "myData",
|
|
101
|
+
"fittedModel": "kmeansModel",
|
|
102
|
+
"action": "predict",
|
|
103
|
+
"evaluations": [ "prediction", "recordToClusterDistance", "clustersSummary" ]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"flowName": "simsimWorkflow",
|
|
3
|
+
"flowDescription": "This decision flow contains two stages. Each stage runs a simulation. The first stage runs a simulation, then second stage uses the mean value from the 1st stage as an input to a formula in the 2nd stage. To see the contents of the decision flow, click the Show RASON model editor icon at the top, right of the grid. To solve, first POST the decision flow by clicking the POST (cloud) icon, then solve by clicking the down arrow next to the play icon and select Solve. For more information on posting and solving decision flows, click the Help tab.",
|
|
4
|
+
"modelType": "flow",
|
|
5
|
+
"simStage1": {
|
|
6
|
+
"comment": "Simulation stage - This first stage is similiar to the ProjectSelect example found under Optimization - Optimization with Uncertainty. This stage simulates the expected cash flow from 8 projects that a company is looking to invest in. The company will select the largest expected cash flows. The company would like to stay within it's budget of $1.5M. ",
|
|
7
|
+
"modelName": "simModel1",
|
|
8
|
+
"modelSettings": {
|
|
9
|
+
"comment": "The option numSimulations sets the number of simulations to 1. the option numTrials sets the number of trials per simulation to 100.",
|
|
10
|
+
"numSimulations": 1,
|
|
11
|
+
"numTrials": 100
|
|
12
|
+
},
|
|
13
|
+
"engineSettings": {
|
|
14
|
+
"comment": "Setting the random number seed to a nonzero value (any number of your choice is OK) ensures that the same sequence of random numbers is used for each simulation. When the seed is zero, the random number generator is initialized from the system clock, so the sequence of random numbers will be different in each simulation. If you need the results from one simulation to another to be strictly comparable, you should set the seed. You can specify a random seed for each uncertain variable if you wish (in the uncertainVariables section) by including the PsiSeed() property function as an argument to the PSI Distribution function formula for that variable. The seed value you set using the model option randomSeed affects only uncertain variables that do not have PsiSeed() property functions.",
|
|
15
|
+
"randomSeed": 1
|
|
16
|
+
},
|
|
17
|
+
"uncertainVariables": [
|
|
18
|
+
{
|
|
19
|
+
"comment": "These are the uncertain variables in the model. There are 16: 8 C varaibles and 8 d variables. The 8 c variables contain the probable cash flow from each investment. The 8 d variables use the PsiBinomial distribution to model the investments chance of success which will be 0 or 100%. Since the 8 c variables all use a different distribution, they must be entered individually.",
|
|
20
|
+
"name": "c",
|
|
21
|
+
"dimensions": [ 8 ]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #1.",
|
|
25
|
+
"name": "c[1]",
|
|
26
|
+
"formula": "PsiTriangular(400000, 500000, 900000)"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #2.",
|
|
30
|
+
"name": "c[2]",
|
|
31
|
+
"formula": "PsiTriangular(500000, 750000, 1250000)"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #3.",
|
|
35
|
+
"name": "c[3]",
|
|
36
|
+
"formula": "PsiTriangular(500000, 1000000,1500000)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #4.",
|
|
40
|
+
"name": "c[4]",
|
|
41
|
+
"formula": "PsiTriangular(400000, 600000, 900000)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #5.",
|
|
45
|
+
"name": "c[5]",
|
|
46
|
+
"formula": "PsiTriangular(250000, 500000, 750000)"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #6.",
|
|
50
|
+
"name": "c[6]",
|
|
51
|
+
"formula": "PsiTriangular(300000, 500000, 600000)"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #7.",
|
|
55
|
+
"name": "c[7]",
|
|
56
|
+
"formula": "PsiTriangular(200000, 450000, 700000)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"comment": "Uses the PsiTriangular distribution to model the expected cash flow for investment project #8.",
|
|
60
|
+
"name": "c[8]",
|
|
61
|
+
"formula": "PsiTriangular(400000, 500000, 700000)"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"comment": "Creates the d array of size 8. This array contains the uncertain variables that model each project's success. Since each element is the same, all can be supplied at one time using the formula property.",
|
|
65
|
+
"name": "d",
|
|
66
|
+
"dimensions": [ 8 ],
|
|
67
|
+
"formula": "PsiBinomial(1, 0.9)"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"data": {
|
|
71
|
+
"comment": "Use the data section to organize the constant data parameters in the model",
|
|
72
|
+
"f": {
|
|
73
|
+
"comment": "These are the initial investements for each of the 8 projects.",
|
|
74
|
+
"value": [ 325000, 450000, 550000, 300000, 150000, 250000, 150000, 325000 ]
|
|
75
|
+
},
|
|
76
|
+
"x": {
|
|
77
|
+
"comment": "These constants correspond to the projects that have been selected to be completed in the next year. A 1 indicates that the project will be completed. This array indicates that projects 1, 3, 4, 6 and 8 have been selected.",
|
|
78
|
+
"value": [ 1, 0, 1, 1, 0, 1, 0, 1 ]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"uncertainFunctions": {
|
|
82
|
+
"comment": "There is 1 uncertain function in this model which calculates the expected cash flow from each project. For example cash = (c[1] * d[1] - 325000) * x[1] + c[2] * d[2] - 450000 + c[3] * d[3] - 550000 + ... All the trials as well as the function's mean, min and max statistics will be returned. However, to see them in the final result you must set keep-intermediate-results to True by clicking Select Query Parameters in the Properties pane.",
|
|
83
|
+
"cash": {
|
|
84
|
+
"formula": "sumproduct(c * d - f, x)",
|
|
85
|
+
"trials": [],
|
|
86
|
+
"percentiles": [],
|
|
87
|
+
"mean": [],
|
|
88
|
+
"min": [],
|
|
89
|
+
"max": []
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"simStage2": {
|
|
94
|
+
"comment": "The second stage accepts all trial values for the uncertain function as inputs. ",
|
|
95
|
+
"modelName": "simModel2",
|
|
96
|
+
"modelSettings": {
|
|
97
|
+
"numSimulations": 1,
|
|
98
|
+
"numTrials": 5
|
|
99
|
+
},
|
|
100
|
+
"engineSettings": {
|
|
101
|
+
"numThreads": 1,
|
|
102
|
+
"randomSeed": 1
|
|
103
|
+
},
|
|
104
|
+
"inputParameters": {
|
|
105
|
+
"coef": {
|
|
106
|
+
"value": "simStage1.cash.trials"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"formulas": {
|
|
110
|
+
"c": {
|
|
111
|
+
"comment": "This formula simply takes the average of all 100 trial values for the uncertain function in stage 1.",
|
|
112
|
+
"formula": "average(coef)"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"uncertainVariables": {
|
|
116
|
+
"v": {
|
|
117
|
+
"comment": "3 new uncertain variables are created. All use the PsiBinomial distribution. ",
|
|
118
|
+
"dimensions": [ 3 ],
|
|
119
|
+
"formula": "PsiBinomial(1, 0.9)",
|
|
120
|
+
"mean": [],
|
|
121
|
+
"min": [],
|
|
122
|
+
"max": []
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"uncertainFunctions": {
|
|
126
|
+
"comment": "This uncertain function simply multiplies the mean of the uncertain function's trials from stage 1 with the three new uncertain varaibles, f=c * v[1] + c * v[2] + c * v[3]",
|
|
127
|
+
"sum(i in 1..3)": {
|
|
128
|
+
"f": {
|
|
129
|
+
"formula": "c * v[i]",
|
|
130
|
+
"mean": [],
|
|
131
|
+
"min": [],
|
|
132
|
+
"max": []
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|