Cloning
Elements
In some situations, you may wish to have elements in your model that always have identical definitions. You could accomplish this by copying an element to various locations in your model, but if you ever needed to change the definition of the element, you would need to make the change to all the copies, and this could be time-consuming and error-prone.
GoldSim addresses this issue by allowing you to create
multiple
Clones are often used in conjunction with localized Containers. For example, suppose that you wished to model the salmon populations in each of ten streams. To do this, you might create ten parallel (adjacent) localized Containers, each of which represented a different stream. Although the inputs differ, let's assume that the basic algorithm used to compute the salmon population as a function of time was the same for each of the ten streams.
One way to build this model would be to create the elements representing the algorithm and copy them to each of the ten Containers. If, however, you were expecting to frequently change and modify the algorithm (e.g., as more data became available), it would become cumbersome (and error-prone) to edit the elements in all ten Containers whenever you wanted to make a change.
Clones provide an easier way to build and maintain such a model: You would simply create ten sets of clones (rather than copies) of the elements defining the algorithm and place them in each of the ten localized Containers. Then if you wanted to modify the algorithm, you would need only to change the elements in one of the Containers and the corresponding clones of those elements would automatically be changed in all of the others.
Note that use of clones does not imply that all clones produce the same output result; it only implies that they have the same definition. For example, a cloned Expression element A function element that produces a single output by calculating user-specified mathematical expressions. might have the definition 2*A. All clones of the element would indeed have the same definition, but if the clones were each located in a different localized 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., then A in one Container could have a different value than A in another Container (i.e., each localized Container could have its own element A). As a result, the output of the Expression would be different in each Container.
- Cloning Elements
- Copying, Moving, and Deleting Elements
- Creating Elements
- Editing an Element's Name, Description and Appearance
- Editing an Element's Properties and Creating Links
- Editing the Appearance of Elements
- Element Inputs and Outputs
- Element Tool-Tips
- Finding Elements
- GoldSim Element Types
- Linking Elements to a Database
- Overview of GoldSim Element Types
- Understanding Output Attributes
- Using Dimensions and Units
- Viewing Element Dependencies