Courses: Introduction to GoldSim:

Unit 9 - Building Hierarchical Models

Lesson 10 - Unit 9 Summary

Models that are used to represent real systems typically consist of hundreds or even thousands of individual elements. In this Unit, we showed how Containers are used organize and manage such models.

All of your models will use Containers, as they are necessary to build anything beyond the simple models we have viewed so far. In fact, because without them the size and complexity of your models would be severely limited, Containers are arguably the most important element in GoldSim.

The key points that we covered were as follows:

  • A Container is simply a "box" into which other elements can be placed. In a sense, it is like a directory folder on your computer. Containers can be placed inside other Containers, and any number of levels of containment can be created.
  • Containers allow you to organize your models into small coherent “chunks” of structured information. 
  • Containers also facilitate the reuse of “sub-systems”. That is, you can create a complex sub-system, and then document and save it, such that a subsequent user could simply drop the sub-system into a new model. Alternatively, you could reuse that sub-system multiple times within the same model (e.g., if you were modeling five different companies, or four different ponds, all which had very similar structures and equations, but different inputs). This facilitates the creation of a library of documented and verified sub-systems. Such a library could be used to quickly and efficiently build complex models.
  • You enter a Container (view its contents) by clicking on the arrow in the upper left-hand corner of the Container. You can also enter a Container via a Crtl+double-click on the element.
  • You can navigate between Containers using buttons in the navigation bar at the top of the graphics pane. You can move elements between Containers by dragging them into visible Containers or right-clicking on the element and selecting the Move to… option.
  • The contents of a Container can be viewed in the browser by expanding the tree under a Container. The browser is synchronized with the graphics pane. That is, if you click on an element in the browser, the Container in which the object resides will be shown in the graphics pane.
  • GoldSim provides a number of tools for navigating and viewing hierarchical models. This includes the Function Of… and Affects… options in element context menus, Influence property dialogs, and the appearance of input and output ports (which show a dot to indicate a link external to the current Container).
  • By default, all element names in a GoldSim model must be unique (i.e., they are “global” variables).  However, by localizing a Container, you can create local variables, and hence build models which have elements with non-unique names. GoldSim provides a mechanism for exposing these local variables so they can be referenced outside the Container.
  • Containers have many optional advanced features, and these are activated via the Container Properties dialog.  When you first get started with GoldSim, you generally do not need be concerned with these advanced features. But as you become more experienced with GoldSim, you will likely take advantage of some of these advanced features.
  • In some cases, you may want to protect the contents of a Container from being modified.  For example, if multiple people are editing a model, you may want to ensure that parts of the model are not inadvertently modified.  Or once a part of a model has be tested and ensured for quality, you may want to prevent any future changes from being made. GoldSim provides two options (sealing and locking) for doing so.  
  • In their simplest form, the use of Containers does not have any impact on how the model does its calculations.  That is, if Containers are simply used to organize and structure models, where an element is within the model hierarchy has no impact on how the calculations are carried out (and hence the results that are computed).  However, some of a Container’s advanced features (e.g., localization) can in fact have an impact on how model calculations are carried out.