UPC scenario conversion notes
UPC Scenario items can be imported into Control Data for use as UPC Scripts. See the Updating Control Data from a UPC Scenario topic for details.
This topic describes the conversion of UPC Scenario control definitions into UPC Script Language.
Ranges
A Range in the UPC Scenario with a defined minimum and/or maximum is converted into a COND[ITION] in the UPC Script:
COND range name = Type and Location >= Minimum AND Type and Location < Maximum
A Range in the UPC Scenario without a defined minimum or maximum is converted into a VAR[IABLE] in the UPC Script.
UPC Range Attribute | Mapping | |
---|---|---|
Name |
Name |
|
Type and Location |
Z - head |
NODE <node id> HEAD |
DZ - change in head |
NODE <node id> DHDT |
|
P - pressure |
NODE <node id> PRESSURE |
|
Q - flow |
LINK <link id> FLOW |
|
REG - regulator state |
VALVE <valve id> OPENING |
|
PUMP pump state |
PST <pst id> PUMP STATE |
|
VAR - variable value |
<variable name> |
|
T - time |
RUN DATETIME (Date is specified in ISO Standard format: YYYY-MM-DD HH:MM) |
|
TR - time repeat |
RUN TIME (Time is specified as HH:MM) Please Note
Time Repeat attributes are converted into Daily times. Day of the week settings are not imported. |
|
Minimum |
>= |
|
Maximum |
< |
Logic
A Logic dependent in the UPC Scenario is converted into a COND[ITION] in the UPC Script:
UPC Scenario Attribute | Mapping |
---|---|
Name |
Name |
Operator and Dependent Conditions |
Expression using operator and dependent conditions |
Rule
A Rule in a UPC Scenario is converted into a RULE in the UPC Script.
The following table details the conversion of rules from a UPC Scenario to a Global UPC Script. If a rule is imported into a local UPC Script, references to valve and pump station IDs are omitted.
UPC Rule Type |
UPC Scenario Attribute |
Mapping |
---|---|---|
Ctrl |
|
IF <condition> THEN NODE/LINK <controller sensor node/link id> <attribute> USING UPSTREAM/DOWNSTREAM VALVE/PST <valve/pst id> ENDIF If the rule is imported into a local UPC script, 'VALVE/PST <valve.pst id>' is replaced by 'REGULATOR' |
POS |
|
Valve RegulatorIF <condition> THEN VALVE <valve id> OPENING = <setpoint value> ENDIF PST RegulatorIF <condition> THEN PST <pst id> SPEED = <setpoint value> ENDIF |
ON |
|
IF <condition> THEN PST <pst id> PUMP 1 = ON ENDIF |
OFF |
|
IF <condition> THEN PST <pst id> PUMP 1 = OFF ENDIF |
Variable
Most Variables in a UPC Scenario are converted into a VAR[IABLE] in the UPC Script.
A Timer variable in a UPC Scenario is converted into a TIMER in the UPC Script.
UPC Variable Operator |
Import |
---|---|
Equals |
VAR <variable name> = <Argument 1> |
Plus Minus Times Divide |
VAR <variable name> = <Argument 1> <operator> <Argument 2> |
IF |
VAR <variable name> = <Argument 2> IF <Argument 1> ELSE <Argument 3> |
TIMER |
TIMER <variable name> START <Argument 1> RESET <Argument 2> [PAUSE <Argument 3>] |
Table
A Table in a UPC Scenario is converted into a TABLE in the UPC Script:
TABLE <name> IN <input range> OUT <measurement> TYPE STEP/LINEAR
Input range mappings are as for Ranges.
Comment
Comments are imported as Comments into the UPC Script.
For example:
COMMENT Logical Rule for controlling Pump Station KCH2PMP
Override Other Control
If the Override Other Control box is unchecked for a regulator in the UPC Scenario; on import to a local UPC Script, the Disable UPC setting in the Control Data for that regulator will be turned on.
Initialise
Initial settings in the UPC Scenario are imported as INITIALISE statements in the UPC Script.
For example:
INITIALISE OPENING = 75