RTC Window Editor - Variable Pane

A variable allows you to combine values (from a Range, Table, Logic operator, Variable or constant value) to derive another value.

All variables are set to zero at the beginning of a simulation. Variable values are preserved from timestep to timestep, so you can use them to accumulate statistics. Variable elements are processed in the order in which you enter them.

ClosedShow me

The Variable pane contains the following fields:

Name

An identifier for the variable. This must not be the same name as a range, logic operator or table. However, you can have several variables with the same variable name; the program evaluates them in the order in which they appear in the scenario

Measurement

The type of data being measured

Operator

An operator to determine the way in which values will be combined (see below)

Arguments

The values to be combined (see below)

Operators

The following operators are available:

Operator

Effect

=

Variable = Argument 1

+

Variable = Argument 1 + Argument 2

-

Variable = Argument 1 - Argument 2

/

Variable = Argument 1 / Argument 2

*

Variable = Argument 1 * Argument 2

IF

If Argument 1 is TRUE, Variable = Argument 2
If Argument 1 is FALSE, Variable = Argument 3

TIMER

Sets up the variable as a timer (see below)

Arguments

The Argument fields can contain a number, range name, table name, variable name or logic name, as follows:

Argument type

Value

Number

Number

Range name

Range's current value

Table name

Current value from table

Variable name

Variable value

Logic

0 (FALSE) or 1 (TRUE)

Timer

The Timer operator allows you to set up the variable as a timer. The value of the variable is the number of seconds since it was started (excluding pauses). The operation of the timer is as follows:

Arguments 2 and 3 may be blank.

For an example of how the Variable pane is used in RTC, see RTC Variable Example.