Named variables are nicknames used to represent the trio of <object type | object name | object attribute> (or a doublet for simulation times) that appear in condition clauses of control rules. They allow condition clauses to be written as:
variable relation value
Or:
variable relation variable
Where the variable is defined on a separate line before its first use in a rule using the format:
VARIABLE name = object id attribute
Here is an example of using this feature:
VARIABLE Dabc = NODE abc DEPTH VARIABLE Defg = NODE efg DEPTH VARIABLE P45 = PUMP 45 STATUS RULE 1 IF Dabc > Defg AND P45 = OFF THEN PUMP 45 STATUS = ON RULE 2 IF Dabc < 1 THEN PUMP 45 STATUS = OFF
Note: A variable cannot have the same name as an object attribute.
Named variables are required when using arithmetic expressions in rule condition clauses.
On SOLIDOS (command SWMMCONTROLS) , the variables are created in the table below:
See also: SWMM Rules Controls