Cloning Containers

In addition to cloning individual elements, you can also clone an entire Container An element that acts like a "box" or a "folder" into which other elements can be placed. It can be used to create hierarchical models.. Before cloning a Container, it must first be localized. Once a Container is cloned, it cannot be globalized.

When you clone a Container, all of its contents are also automatically cloned. Any change you make to any element within one cloned Container is made to all of the clones Sets of elements whose properties change simultaneously when any one member of the set is edited.. In particular,

Several other points regarding cloned Containers should also be noted:

The key to using cloned Containers is to provide unique inputs to them from elements that are outside of them (otherwise, all of the cloned Containers would behave identically and produce exactly the same results). This can be done by placing the cloned Containers within separate localized Containers:

In the example shown above, the two cloned Containers (Clone1 and Clone2) are within two separate localized Containers (L1 and L2). Within the cloned Containers, all the equations and elements are, by definition, identical. In this example, it is assumed that within each cloned Container, an element references Data1. Since the clones are in different localized Containers, however, they each link to a different Data1 element.

The example model CloningContainers.gsm in the General Examples/Containers folder of your GoldSim directory (accessed by selecting File | Open Example... from the main menu) contains an example of the use of cloned Containers.