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 RealA real number is any number ranging from 1.7 X 10 -308 to 1.7 X 10 +308, including decimals. Real values may not include commas. As such, the number 5,380.5 should be entered as 5380.5. or IntegerAn integer number is a whole number ranging from -2,147,483,648 to 2,147,483,647. Integer values may not include commas. Therefore, the number 5,380 should be entered as 5380. 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.


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