Building the Contents of the SubModel

Once you have selected the Solution Type and modules to be used by a SubModel, building the contents of a SubModel is, for the most part, identical to building the contents of a Container.

Like a Container, you enter a SubModel by clicking on the plus sign in the upper left hand corner of the element. SubModels (and their contents) are also displayed in the browser in the same manner as Containers.

You can add elements, Containers, and even other SubModels to a SubModel, just as you would to a Container. Of course, you can also copy elements that are outside of a SubModel and paste them into the SubModel.

   Note: In addition to creating a model manually inside a SubModel, you can also choose to import an existing (standalone) model into a SubModel.

There are several important points to note when building and navigating a SubModel:

   When you are inside a SubModel, the navigation bar at the top of the graphics pane only shows the location with respect to the SubModel.  It does not show the path relative to the parent model:

   Within a SubModel, you cannot reference outputs that exist outside of the SubModel in the same way you would from inside a Container.  That is, by default, the SubModel is a self-contained system (i.e., a separate model) that cannot "see" anything on the outside. In fact, within a SubModel, the Insert Link dialog accessed via the context menu for input fields does not list any elements outside of the SubModel. In order to access outputs from outside the SubModel, you need to take some specific actions (i.e., add the output to the SubModel's input interface).

   Because the SubModel is a self-contained system (i.e., a separate model), elements on the outside cannot directly reference outputs inside the SubModel.  Of course, in order to be of any value, a SubModel must have some way to communicate with (i.e., provide outputs to) the outer model. However, in order to provide outputs from inside the SubModel to elements in the outer model, you need to take some specific actions (i.e., add the outputs to the SubModel's output interface), and the SubModel outputs themselves have added complexity (since they may represent complex results, such as a distribution resulting from a Monte Carlo simulation).

   Results inside a SubModel behave differently than results that have been added to the SubModel’s output interface.  In particular, because a SubModel is a separate simulation (that will typically be carried out multiple times during a simulation of the outer model), results inside of a SubModel are typically overwritten during a simulation of the outer model. As a result, although you can choose to save the results inside of a SubModel, only results from the last simulation of the SubModel (i.e., the last time the SubModel was run) are available for viewing inside the SubModel at the end of your simulation. Note, however, that this does not apply to results that have been added to the SubModel’s output interface. A wide variety of complex results can be accessed via the interface, including various statistics and raw data for all SubModel time histories for all simulations of the SubModel.

Related Topics…

Learn more about: