Localizing
Containers
In most models, element names are forced to be unique. In some cases, however, you may want to have more than one element with the same name. This requirement usually arises when you have a number of similar subsystems in your model.
For example, suppose that you have developed a subsystem (within a 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.) that calculates the balance in a bank account as a function of the previous balance, interest rate, deposits and withdrawals. Each of these items would be represented by its own element in the Container. After creating these elements, you decide you would like to track ten other accounts.
In such a case, it would be convenient to create ten copies of the Container (one for each of the other ten accounts). If GoldSim allowed you to just make copies of the bank account Container, however, there would be confusion when you referred to an element by name (e.g., in an expression), since GoldSim would have no way of knowing which copy of the element you were referring to.
GoldSim's solution to this problem is to allow you to localize An action that you can apply to a Container that creates a separate scope for the elements in that Container. portions of your model, such that any
element names in the local region are hidden from elements outside of that
region. A local region is referred to as a
The example model LocalizedContainer.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 Localized Containers.