Referencing Time in GoldSim

In a dynamic simulation, it is often necessary for you to explicitly reference time in a mathematical expression that you enter as an input to an element (i.e., you might want an input to take on different values at different times).

Within GoldSim, you can reference the elapsed time since the simulation began as ETime. For example, the input to the following Expression element takes on a value of 10 for times less than 1 year, and 20 afterward:

The if function is one of the built-in functions provided by GoldSim. This function has three arguments and can be written in two ways:

If(A then B else C) or If(A,B,C)

The above would be interpreted as "If A is a true condition, the expression is equal to B, otherwise it is equal to C".

GoldSim also allows you to begin your simulation at a specific date/time (e.g., January 1, 2005) and reference the calendar (as opposed to elapsed) simulation time (as DateTime):

Both ETime and DateTime are actually special model outputs referred to as Run Properties.

   Note: When you place the cursor over an element, an input or an output prior to running a simulation, GoldSim displays a tool-tip showing the object's current (expected) value. If the object is a function of ETime, by default this calculation assumes a value of 0s. You can modify the value used in such a calculation by editing Time to use for Edit Mode updates in the Advanced Time Settings dialog (accessed from the Advanced… button on the Time tab of the Simulation Settings dialog).

Related Topics…

Learn more about: