Defining a Process > Defining Model Elements and Advanced Elements > Variables

Variables

Variables are of two types: global and local. Global variables are place holders defined by the user to represent changing numeric values. Local variables are place holders which are available only within the logic that declared them. Variables can contain either RealCollapsed or IntegerCollapsed numbers, and are typically used for decision making or recording information.

 

A global variable can be referenced anywhere numeric expressions are allowed in a model. If a variable is needed only in a single block of logic, it is easier to define a local variable right inside the logic block.

 

Global variables are defined in the Model Elements dialog, and have the following options:

Variable names must be alpha-numeric, or may contain underscores. No other special characters are allowed such as %, $, !, etc.

Statistics   You can choose to collect no statistics, time-weighted statistics, or observation based statistics for the variable.

Variable Observation Record Value Time in Hours

Observation 1
Observation 2
Observation 3
Observation 4

6
5
6
5
1
2
3
4
Total 22 10

Time-weighted collects information on the percentage of time the variable was at a specific value. As shown in the above table, the average value of the variable is:

(6 x 1) + (6 x 3) + (5 x 2) + (5 x 4) = 5.4
10
6 + 5 + 6 + 5 = 5.5
4

Local variables are defined with the Local Variable statement in the Logic Builder.


© 2014 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com