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, vector) and dimensions (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, 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 are actually locally available properties belonging to the Model Container:

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).

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).

Related Topics…

Learn more about: