Understanding and Referencing Run Properties

Within a simulation model, you often need to reference within input expressions internal model variables like the elapsed time, the date/time, and the realization number.  To facilitate this, GoldSim provides a number of special reserved names, referred to as Run Properties, that can be directly referenced in expressions. The most commonly used Run Properties are ETime (the simulated elapsed time) and DateTime (the simulated calendar date-time).

In addition to ETime and DateTime, GoldSim also provides many additional Run Properties that can be referenced in your model.

You can enter the names of the Run Properties directly when creating expressions (just as you would enter the name of an output), or you can insert them into an expression using the Insert Link dialog (accessed by right-clicking in an input field and selecting Insert Link… from the menu). 

As can be seen above, at the top of the dialog is a folder labeled “Run Properties”.  If you expand this folder, you will see that all of the Run Properties are organized into four categories (Calendar Time, Elapsed Time, Simulation and Reporting Periods).

Expanding any particular category folder lists all of the Run Properties in that category:

As can be seen, the icon for the various Run Properties is different than that used for element outputs.  This is because the Run Properties don’t actually represent the output of any particular element.  They are special model properties that are “broadcast” throughout the model and can be referenced anywhere.

   Note: The color of the symbol changes if the Run Property is actually being referenced in a model.  If it is not being referenced, it is gray.  Otherwise, it is blue.  In the example above, the Run Property “Month” is being referenced.

   Note: Run Properties are an instance of a class of variables called Locally Available Properties.  Locally Available Properties derive their name from the fact that in specialized cases, they may only be available, or may take on different values (i.e., be over-ridden), in “local” parts of your model (e.g., within particular Containers).  In the case of Run Properties, they are always available throughout the model, but some of these properties are overridden locally if a Container is defined to have an internal clock (a local timestep).

   Note: All the Run Properties are protected names, so, for example, you cannot create an element named “ETime” or “DateTime”.

   Note: You cannot directly save a time history of a Run Property, or reference it in a Result element. If you wish to do so, link it to an Expression and save or reference the Expression element in the Result element.

The four categories of Run Properties are discussed in the topics below.

Related Topics…

Learn more about: