SubModel Example: Probabilistic
Optimization
Another common use of SubModels is to optimize a probabilistic model. 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 A mathematical representation of the relative likelihood of a variable having certain specific values. It can be expressed as a PDF (or a PMF for discrete variables), CDF or CCDF.), 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 A specialized element that allows you embed one complete GoldSim model within another GoldSim model. This facilitates, among other things, probabilistic optimization, explicit separation of uncertainty from variability, and manipulation of Monte Carlo statistics. (e.g., a dynamic Monte Carlo simulation A method for propagating (translating) uncertainties in model inputs into uncertainties in model results.) within an outer model (e.g., a static optimization).
Example model ProbabilisticOptimization.gsm in the General Examples/SubModel folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu) provides a simple illustration of such an application. In this model, the SubModel is a Monte Carlo simulation containing a single Stochastic. The outer model is an optimization. The variable being optimized is a function of another element in the outer model and a statistic (the 95th percentile) of the Stochastic in the SubModel.