What Can I Do With a SubModel?

Before describing the details of how SubModels are created and used, it is worthwhile to first discuss why you might want to use a SubModel

Recall that a SubModel is a complete "inner" model that has been embedded in an "outer" model. The inner model and the outer model can take on a number of forms (e.g., static/dynamic, deterministic/Monte Carlo, simulation/optimization). This provides a wide variety of potential uses.  The most common are summarized below.

Manipulation of Monte Carlo Statistics.  In some cases, after carrying out a Monte Carlo simulation, you may want to carry out further calculations using the statistical outputs of the simulation.  For example, you may want to carry out a calculation that is some function of the mean and the 95th percentile of a particular output in a Monte Carlo simulation.  Without the use of SubModels, the only way to accomplish this is by exporting results from a Monte Carlo simulation manually to another application (e.g., a spreadsheet or a separate GoldSim model).  With SubModels, this is easily accomplished within a single GoldSim model by inserting a SubModel (that performs a Monte Carlo simulation) into an outer model (that is static and simply manipulates the statistical outputs of the inner model).

Explicit Separation of Variability from Uncertainty. Many models have uncertain parameters as well as randomly variable parameters.  An uncertain parameter represents ignorance that can theoretically (but perhaps not practically) be reduced through investigation (e.g., the mean failure time for a batch of light bulbs).  Variability is inherent in many systems (e.g., the distribution of failure times for a batch of light bulbs) and cannot be reduced.  It is often valuable to explicitly separate variability from uncertainty in a model.  With SubModels, this is accomplished by inserting a SubModel (e.g., a dynamic Monte Carlo simulation) within an outer model (e.g., a static Monte Carlo simulation).  This is referred to as "nested" Monte Carlo simulation. In the example above, the outer model would sample a probability distribution that represents the uncertainty in the mean lifetime of a light bulb, and the inner model would simulate the performance of a number of random light bulbs (whose lifetime is sampled from a distribution with the mean specified by the outer model). The result of this type of analysis is a probability of probabilities.

Probabilistic Optimization.  If you wish to optimize a probabilistic (uncertain) system, the objective function to be optimized cannot be a single deterministic output.  Rather, it must be a statistic.  That is, if X was an output of a probabilistic model (and hence was output as a probability distribution), optimizing X itself would be meaningless.  Rather, you would need to optimize a particular statistic (e.g., the mean or 50th percentile) of the output X. With SubModels, this is accomplished by inserting a SubModel (e.g., a dynamic Monte Carlo simulation) within an outer model (e.g., a static optimization).

Dynamic Optimization During a Simulation.  Imagine a situation where you were simulating the operation of a facility over a period of one year.  Every month, the operators make a decision based on the current state of the system.  This decision is based on a simple optimization analysis using currently available data (i.e., at every month during the simulation). The optimization chooses the optimum values of a few control variables that they will use for the next month.  With SubModels, you could simulate this by inserting a SubModel (e.g., a static optimization) within an outer model (e.g., a dynamic simulation).

Example files describing all four of these applications (SubModel1.gsm, SubModel2.gsm, SubModel3.gsm, and SubModel4.gsm) can be found in the General Examples folder of your GoldSim directory (accessed by selecting File | Open Example... from the main menu) in the subfolder named SubModels.

Related Topics…

Learn more about: