Understanding Locally Available
Properties
Locally available properties are special attributes of some elements in GoldSim. Locally available properties are similar to element outputs in that they have a data type (e.g., value, condition), order (e.g., scalar An output consisting of a single value or condition., vector A one-dimensional array.) and dimensions An output attribute for an element that defines the dimensionality (in terms of Length, Time and other fundamental dimensions) of the output. (i.e., units). However, they do not appear as outputs of the element to which they belong. Rather, they are only visible in browsers (the main browser An alternative view of a GoldSim model, in which elements are displayed in a tree, and organized either hierarchically, or by type., or the Insert Link browser).
Note: Locally available properties are only shown in the main browser if you choose to Show element subitems (accessed via the browser context menu by right-clicking in the browser).
Locally available properties derive their name from the fact that they may only be available, or they may take on different values (i.e., be over-ridden), in "locally available" parts of your model (e.g., within particular Containers).
Containers are often providers of locally available properties. In fact, the Run Properties A set of fundamental properties that track the progress of the simulation (e.g., Time, Realization) and can be referenced like outputs in expressions. are actually locally available properties belonging to the Model 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.:
These properties are "broadcast" to the entire model. A Run Property (like ETime) is an example of a type of locally available property that is available throughout a model, but can take on different values in different parts of the model. In particular, some of the Run Properties can be over-ridden locally if a Container is defined to have an internal clock (a local timestep A discrete interval of time used in dynamic simulations.).
In such a case, the Container with the internal clock also possesses Run Properties:
If you define an internal clock for a Container, and then within that Container, reference ETime, GoldSim will automatically connect to the "locally available" ETime (the ETime in the Container), rather than the global ETime (the ETime associated with the "root" or Model Container). Hence, the actual locally available property that it linked to is a function of where it is referenced from.
Some locally available properties are only available in specific locations. A good example of this is the loop count for a Looping Container.
Within the looping Container itself (or in its property dialog), it is often necessary to reference the loop count. However, this variable has no meaning whatsoever outside of the looping Container. As a result, it can only be referenced inside the Container (including in its property dialog). If you right-click in an input field within the looping Container and select Insert Link to view the Insert Link browser, the loop count will appear in an Available Properties folder:
If you invoke the Insert Link browser from outside of the Container, however, the loop count is not visible and cannot be referenced.
Locally available properties are referenced in expression by adding the ~ prefix. For example, when you insert the loop count for a looping Container into a field, it appears as follows:
Note: Run Properties represent a special instance of locally available properties that do not require the "~" prefix. These properties can be referenced directly (e.g., as ETime, or DayofWeek).
Learn more
- Creating Links Using the Link Cursor
- Deleting Links and Influences
- Displaying Link Suggestions in Input Fields
- Divide By Zero Errors in Input Fields
- Editing an Element's Name, Description and Appearance
- Editing an Element's Properties and Creating Links
- Entering and Editing Expressions in Input Fields
- Entering Mathematical Expressions into Element Input
- Error Checking in Input Fields
- Input Field Context Menu
- Input Field Tool-Tips
- Referencing Outputs of Other Elements (Creating Links)
- Specifying the Contents of an Input Field
- Understanding Locally Available Properties