Setting Up a Simulation Model
When setting up a simulation model in the RASON Modeling language, your model will typically contain these essential segments:
- modelName: RASON V2020 supports named and unnamed models. A named model includes the modelName: "name" property in its text. "name" must be a string
that can be URL encoded and must be unique among models within a user's account. It is strongly recommended that a model be named to allow for easy
recognition and retrieval when multiple models, instances and versions exist in a user's account.
See the topic "Using the REST API" for more information on named and unnamed models.
- modelType: A new optional top-level property "modelType"={"optimization", "simulation", "datamining", "calculation"} has been introduced in RASON Decision Services
V2020 for use with decision flows and standalone models. This property defines the model type as optimization, simulation, datamining or calculation within
the RASON script and is used in three ways.
- data: Where arrays to be used in the calculation of uncertain functions and/or uncertain variables will be defined.
- uncertainVariables: Where the uncertain variables will be defined. In this example, we will define two uncertain variables using the Psi
Distribution functions PsiTriangular and PsiIntUniform.
- uncertainFunctions: Where the uncertain functions will be defined. In this example, we define one uncertain function which calculates the expected
(or average) profit.
As mentioned in the previous topic, Setting Up an Optimization Model, within
this overall framework you have a great deal of flexibility in choosing how to define and calculate your uncertain variables and uncertain functions.
For example, the uncertain function will ultimately depend on the uncertain variables, but you don't have to calculate the entire function all at once.
You can use any number of calculations in the data section to compute intermediate results, and use these to calculate the uncertain
function.
The RASON modeling language supports all but a few of Excel's functions which means that you can write a formula easily using Excel's functions such
as SUM, SUMPRODUCT, etc. along with operators such as + and *. You can define arrays and use Excel functions that return vector and matrix results and
access your data from within an Excel worksheet or a database.
Uncertain Variables
In any problem, there are factors or inputs that you can control - for example, the price you set for a product, and factors or
inputs that you cannot control - for example, customer demand, interest rates, etc. Uncertain variables (random
variables in mathematics) are used to represent inputs that are uncertain and beyond your control. (It uses decision variables
to represent factors or inputs that you can control.)
Uncertain Functions
You will also have outputs or results of interest - such as Net Profit - that you can compute, using formulas that depend on the factors influencing
the problem - possibly both decision variables and uncertain variables. We'll use the term uncertain functions for quantities whose calculation
depends on uncertain variables (in mathematics these are called functions of random variables).
|