Understanding Containers

A complex model may consist of many hundreds or thousands of individual elements. In order to manage, organize and view such a model it is useful (in fact, essential) to create separate sub-groups or collections of elements.

Such sub-groups are created in GoldSim by placing elements into Containers.  A Container is simply a "box" into which other elements have been 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.

The graphics pane in GoldSim shows the elements inside a single container. When you open a file in GoldSim, you will initially be viewing the inside of the Model Container (also referred to as the Model Root). This is analogous to the top-most directory on your computer.

To create a new sub-group of elements within the Model Root (or any other Container) in your model, you need only insert a Container element.

Containers in a model are easily identified in the graphics pane: they all have a small triangle in their upper left-hand corner:

Click the triangle to "enter" a Container.

You can "enter" a particular Container (view its contents) by clicking on the triangle. You can also enter a Container via a Ctrl+double-click on the element (holding the Ctrl key down while double-clicking the left mouse button).

When you create a new Container element, it is initially empty (it contains no elements or objects of any kind). You place new elements in a Container by entering it and inserting elements, or using the context menu of the Container.  You can also copy and/or move an element between Containers.

Containers can be placed inside other Containers, and any number of levels of containment can be created. This ability to organize model elements into a hierarchy provides a powerful tool for creating "top-down" models, in which the level of detail increases as you "push down" into the containment hierarchy.

The example below shows a system which has been divided into a number of distinct sub-groups.

Chap3/03-100.bmp

The browser shows the containment hierarchy in a manner similar to how a computer's directory hierarchy is shown. You can expand the Container in the browser to show its contents.

You can move through the containment hierarchy using the navigation bar at the top of the graphics pane:

You can also navigate Containers using the following hot-keys:

 

Keys

Action

Alt-Left

Moves back to previously viewed Container.

Alt-Right

Moves forward (only active if you have already moved back).

Alt-Home

Moves up to the Model Root.

Alt-Up or Alt-PgUp

Moves up one level.

   Note: Many modern mice come with additional buttons that are typically used to navigate the history of visited “places” (websites or folders). These buttons are also supported by GoldSim. The Backward and Forward buttons go backward or forward in the visited Container history. Pressing either of these buttons while holding the Ctrl key down goes up one level in the hierarchy. Pressing either of these buttons while holding the Ctrl and Shift keys down goes to the top level of the model.

   Note: If you hold down the Move Back or Move Forward buttons when you click them, a drop list filled with recently visited Containers (in that direction) will be displayed.

Just to the right of the Container navigation buttons is the Container navigation bar:

This shows the full path to the Container you are viewing (in the example above, the “Revenues” Container, which is one level down from the “Model” or highest-level Container is being viewed).

You can use the navigation bar to jump to another Container by clicking on the triangle to the right of any item:

“Earnings” and “Expenses” are Containers at the same level as “Revenues” (the currently viewed Container).  Clicking on either one of those would jump to that Container.

“Consulting”, “Software_Sales” and “Training” are Containers inside “Revenues” (the currently viewed Container).  Clicking on any one of these would jump to that Container.

Right-clicking in the Container navigation bar brings up the following context menu:

Selecting “Copy path to clipboard” copies the current Container path to the clipboard, allowing you to paste it into other documents (e.g., a report describing the model). Selecting “Browse to path from clipboard” immediately jumps to the path Container path currently stored in the clipboard.

While the various images in the graphics pane can be customized by the model author, the small icons in the browser cannot be changed. Hence, Containers in the browser are always indicated by a small box. Expanding the Container in the browser shows all of its contents (all of the elements it contains).

Note that the browser and the graphics pane are synchronized. Hence, if you click on an object in the browser, the Container in which the object resides will be shown in the graphics pane. This provides a convenient way to navigate through the subsystems in the model.

   Note: When you save a GoldSim file, GoldSim remembers the last Container that was being viewed, and that Container is shown the next time the file is opened.

Related Topics…

Learn more about: