Variable types
- Last UpdatedAug 11, 2025
- 7 minute read
Many variable types are available for use in calculations.
To define a variable, click the
button in the Formula tab of the Create New Calculation dialog box and choose a variable type from the menu. The corresponding Variable Editor dialog opens, in which you can enter the information needed to define the variable.
For each variable you can define a name, a description and a symbol. You can also choose a unit of measure from the UoM drop-down list. Most variable types require you to enter additional information, which is described in the remainder of this section.
The available variable types are the following:
-
Supply: Equals the average flow of a particular Supply during a given Period. You can also choose the Current period or the Total flow across all periods.
-
Supply Property: Equals the value of a Property in a particular Supply during a given Period. You can also choose the Current period.
-
Demand: Equals the average flow of a particular Demand during a given Period. You can also choose the Current period or the Total flow across all periods.
-
Demand Property: Equals the value of a Property in a particular Demand during a given Period. You can also choose the Current period.
-
Terminal Inventory Opening Amount: Equals the opening amount of a terminal Inventory, during a specified Period or during the Current period.
-
Terminal Inventory Closing Amount: Equals the closing amount of a terminal Inventory, during a specified Period or during the Current period.
-
Node Input Flow: Equals the flow of a Traded Material, and optionally of a specific Grade, into a network Node during a given Period. You can also choose the Current period or the Total flow across all periods.
-
Node Output Flow: Equals the flow of a Traded Material, and optionally of a specific Grade, out of a network Node during a given Period. You can also choose the Current period or the Total flow across all periods.
-
Plant Operating Parameter: Equals the value of an Operating Parameter from the Model of a Process Unit, in a particular Mode, coming from a Plant associated with the case. The value can refer to a given Period, or to the Current period.
-
Plant Global Parameter: Equals the value of a global Parameter for a Plant associated with the case, in a given Period or during the Current period. The Type of the parameter value defaults to Time Averaged for global parameters of Time Averaged type. For parameters of Multi-Period type, you can choose between Opening and Closing. See Global Parameters for more information.
-
Plant Blend Matrix Component: Equals the flow of a blend Component into a blend Product for a Blender of a Plant associated with the case, in a given Period or during the Current period. In other words, this value equals a value from the Blending Matrix of the plant case.
-
Plant Pipe Flow: Equals the flow of material through a Pipe in or out of an Asset of a Plant associated with the case, in a particular Mode and during a given Period. You can also choose the Current period. Note that you must first choose the correct Asset Type before you can select the desired asset. You can choose among the Total Flow in the pipe, the flow of a particular Feedstock or the flow of a particular Traded Material.
-
Plant Pipe Property: Equals the value of a Property in the flow of material through a Pipe in or out of an Asset of a Plant associated with the case, in a particular Mode and during a given Period. You can also choose the Current period. Note that you must first choose the correct Asset Type before you can select the desired asset.
-
Plant Opening Inventory: Equals the opening value of an Inventory from a Plant associated with the case, in a given Period or during the Current period. See Inventories Summary for more information on inventories.
-
Plant Closing Inventory: Equals the closing value of an Inventory from a Plant associated with the case, in a given Period or during the Current period. See Inventories Summary for more information on inventories.
-
Network Global Parameter: Equals the value of a Network Global Parameter listed on the Constraints and Alerts page, during a given Period or during the Current period. You also have to set the Type of the parameter value: for Time Averaged global parameters, the only choice is Time Averaged, since the parameter has the same value throughout the period. For Multi-Period global parameters, you can choose between the Opening and Closing value of the parameter in the chosen period.
-
Period Duration: Equals the duration of a particular Period, or of the Current period.
-
Transport Link Arriving: Equals the flow of a Traded Material flowing through a Transport Link to the destination node during a given Period or during the Current period. You can set the variable to the flow of All traded materials.
-
Transport Link Departing: Equals the flow of a Traded Material flowing through a Transport Link out of the origin node during a given Period or during the Current period. You can set the variable to the flow of All traded materials.
-
Group: Equals the flow of a Group of a particular Type, during a given Period or during the Current period. You can choose among groups of supplies, demands, exchanges, terminal inventories, transport links and terminal operations.
-
Group Property: Equals the weighted average of a Property for a Group of a particular Type, during a given Period or during the Current period. You can choose among groups of supplies, demands, exchanges, terminal inventories, transport links and terminal operations.
-
Economic Objective: Equals the value of the economic objective function. This represents the profit or loss of your model. It is determined by running the optimizer solution as a simulation, and calculating the difference between the sale of materials and the purchase of feedstocks, along with any other costs such as utilities.
Variable symbols
When creating a variable, you may enter a Name and Description in the corresponding text fields of the Variable Editor. You must also enter a Symbol, which is the label that identifies the variable in your formula. Variable symbols must follow stricter rules than names and descriptions:
-
Symbols are case sensitive. Unit_Capacity and unit_capacity are different symbols representing different variables.
-
Symbols cannot contain spaces. Unit Capacity is not a valid symbol. Either use underscores for spaces, or use CamelCase for names: Unit_Capacity or UnitCapacity.
-
Symbols must start with a letter, not a number, but can have numbers anywhere else within their names. 2Unit_Capacity is not valid, but Unit2_Capacity is valid.
-
Symbols cannot contain special characters or mathematic operators, including *, \, /, +, -, =, <, >, [, ], (, ), @, &, !, ?, ", '.
-
Symbols can only contain characters from the standard ASCII character set. Characters such as à, ç or ß are not supported.
Input flow
Take care when building calculations referring to flows which may be different in different periods. If an incorrect variable is chosen for the required flow, a calculation formulation may lead to unexpected optimization behavior or cause the problem to be infeasible.
When choosing calculation variables, pay attention to whether the calculation driving values are intra-period or inter-period, that is, whether the values are bounded within a single period, or allowed to span (with different values) across several periods.
Example: A typical intra-period value might be a particular crude purchase flow at a specific
location with a specific price. For the crude Arab Heavy you might have one supply
available only in Period A with a price of 101 $/bbl. This supply is bounded within
Period A and so the flow is only valid here.
A typical inter-period value might be a terminal inventory. For gasoline RBOB you
might have an inventory which is available in both Period A and Period B. The inventory
crosses both periods and so has a valid value in each period, and may have a different
final value in each period.
Flow in current period

Selecting a supply and choosing Current as the period definition shows the flow of the supply in each period where the supply is used. If the supply spans more than one period, for each period the flow in that period is shown. If the supply is boxed within a single period, results are only shown for the period where the supply is available.
In the above example the supply is available in any period, and so the Current period variable type results in the flow in each period being returned by the calculation.
Flow in bounded period

If the flow is bounded within a period, Current only returns a value for the period in which the flow is available.

It is possible to restrict calculations to specific time ranges by defining the Start Period and End Period. The calculation is only evaluated within this range.
Flow in specific period

If the flow is bounded within a period and the matching period is selected for the flow variable, the amount is available for calculation in each period, even where the flow is not present.