Rules
- Last UpdatedAug 11, 2025
- 8 minute read

Schedules can be built by applying rules to particular assets. Schedule then generates activities based on the rules you have created.
The Rules page shows the rules that are included in the scheduling case.
Note: When a rule is deleted, activities previously generated by the rule are not removed.
Add rules
To add a rule, click Add in the Rules group of the Home ribbon tab. The Add Rule dialog window opens.
-
Enter name, description and availability

Fill the Name and Description text fields. Select the Available check box if you want the rule to be available for applying and attaching in the schedule.
You can later edit these settings from the Rules page.
-
Choose asset

From the Asset list select the asset on which to apply the rule. Choosing different asset types results in different options available for defining the rule, as described in the following steps.
-
Choose evaluation order

When multiple rules are applicable at the same time, the Evaluation Order value establishes the order in which the rules are applied. For example, a rule with evaluation order 1 is applied before a rule with evaluation order 2, and so on. Later rules in the evaluation order can overwrite configurations from earlier ones.
-
Choose condition
The next part of rule configuration involves defining the precise behavior of the rule: what triggers it, the action that is performed when the rule is triggered, what causes the action to stop. You can define several behaviors, each corresponding to a row of the table in the lower half of the Add Rule dialog box.
First you must define a Condition, which is a logical statement defining when the behavior is triggered. Click the
icon in the Condition column to open the Edit Condition dialog. See Edit Condition for more information on how to define logical conditions in this dialog.
-
Choose action
Choose the Action that is executed when the condition is fulfilled. The following choices are available:
-
Transfer To: Create a transfer activity to an asset specified in the Target column.
-
Update Parameter: Update a configuration parameter of the Target asset. The parameter and its new value are chosen in the Parameter and Value columns, respectively.
-
Transfer From: Create a transfer activity from an asset specified in the Target column.
Note: Rules do not support filling a tank at the same time as it is being drawn, or vice versa, even when the tank is set to be running gauge.
As a workaround, you can insert a manifold between the tank and the source or destination of the transfer. You can then define the rule on the source-to-manifold or manifold-to-destination transfer.
-
-
Choose target assets

Select the target assets from the list in the Asset column:
-
If you have chosen Update Parameter as action, you can select a single target.
-
If you have chosen Transfer To or Transfer From as action, you can select multiple candidate targets. Select the check box next to each target you want to include.
When selecting multiple targets, you can use the Asset Filter and Asset Selector columns to choose the actual target of the transfer activity.
In the Asset Filter column you can define a condition to further filter the list of candidate targets. Click the
icon to open the Edit Target Filter dialog, which works in the same way as the Edit Condition dialog.

In the Asset Selector column you define a condition to choose the target asset of the transfer activity from the list of candidates. Click the
icon to open the Edit Target Selector dialog, which works in the same way as the Edit Condition dialog.

Typical conditions to choose an asset are the following:
-
[Destination] Equals Has Most Ullage: Transfers the material to the tank which has the most free space.
-
[Destination] Equals Has Best Ullage: Transfers the material to the tank whose free space most closely matches the parcel size.
Note: While defining a target filter is optional, you must define a target selector for the rule to be valid.
-
-
Choose rate
Optionally, define a rate for the transfer in the Rate column.

Click the option button corresponding to your choice:
-
Default: Uses the default transfer rate for the selected asset.
-
Fixed Rate: Sets the target transfer rate to the specified value.
-
Calculation: Sets the target transfer rate to the result of the specified calculation. If you want to use this option, you must have a calculation giving a result in flow units.
-
-
Choose parameter and value

This steps applies only if you have chosen Update Parameter as action. Select the parameter to update and its new value from the Parameter and Value columns, respectively.
Depending on the type of parameter you are setting, the Value choice could be from a simple list or from something more complex. For example, if you are setting the Manifold Routes parameter for a manifold, you will be presented with the same interface as in the manifold Configuration Inspector (see: Manifold Targeting).

-
Define end condition

Here you define a condition that, when satisfied, will stop the activity from being executed. Click the
icon to open the Edit End Condition dialog, which works in the same way as the Edit Condition dialog.
Typical end conditions to stop a transfer are the following:
-
[Compartment] Equals Empty: Stop the transfer when the compartment is empty.
-
[Destination Inventory] Equals Working Max: Stop the transfer when the destination inventory reaches its working maximum.
-
-
Set delay
Optionally, you can set a Delay value, measured in hours, between the condition being fulfilled and the action taking place.
-
Add more conditions and actions
You can add more rows to the table in the bottom half of the Add Rule dialog box, to define further actions governed by conditions. For each new row you add, follow steps 5 to 10 above.
-
Check and save rule
Check the Valid column in the table. A warning icon
means that there is an error on the corresponding row. Hover your mouse pointer on
the icon to show a tooltip with more information on the error.
Once you have corrected all errors, click OK to save the rule definition and close the Add Rule dialog box. The new rule is now listed in the Rules page.
Edit condition

The Edit Condition dialog allows the rules to be defined using logical operators. When activities meet the conditions as defined in the Edit Condition dialog then the rule is invoked and applied to the schedule, either for the allocated timespan or the allocated activity.
A condition is made of a series of statements (also called conditions) linked by logical operators.
All words in the condition formula are active links. Click any word to display a menu with alternative choices for that part of the statement.
A condition is made of three parts:
-
Subject. This is the variable that is going to be tested by the condition. Typical values are the following:
-
A property name, such as API.
-
Feedstock, which represent the feedstocks held in a vessel or a tank, or flowing through a pipe.
-
-
Relational operator. Typical values are the following:
-
Equals. The subject value must be equal to the following value.
-
Is greater than, Is less than etc. Used with numerical values.
-
Is any of. The subject value must be any of a list of values. Typically used with Feedstock.
-
-
Value. The value the subject is compared against. It can be a hard-coded number or, for inventories and property values, the result of a calculation. It can also be a list of items, for example when you want your feedstock to be any of a list of crudes. When your value is defined as a list of items, click the
and
icons at the end of the row to add and remove items, respectively.
Taking the condition [Feedstock] Is any of (Arab Light, Arab Medium) as an example:
-
[Feedstock] is the subject.
-
Is any of is the relational operator.
-
(Arab Light, Arab Medium) is the value.
Conditions, and group of conditions, are linked by logical operators. The available logical operators are the following:
-
And: sets the children of the operator as logical ANDs so that all conditions must be true for the rule to be invoked.
-
Or: sets the children of the operator as logical ORs so that if any condition is true then the rule is invoked.
Clicking a logical operator also shows the Add Condition option to add a new condition.