SWMM - Control Rules - Arithmetic Expressions


In addition to a simple condition placed in a single variable, a control condition clause can also contain an arithmetic expression consisting of several variables whose value is compared. Thus, the format of a condition clause can be extended as follows:

 EXPRESSION  relation   value   

Or:

 EXPRESSION  relation   variable

Where the expression is defined on a separate line before its first use in a rule using the format:

EXPRESSION  name = f(variable1, variable2, ...)

The f(...) function can be any well-formed mathematical expression containing one or more named variables, as well as any of the following (case-insensitive) mathematical functions and operators:

Here is an example of using this feature:

VARIABLE  P1_flow = LINK 1 FLOW
VARIABLE  P2_flow = LINK 2 FLOW
VARIABLE  O3_flow = Link 3 FLOW

EXPRESSION Net_Inflow = (P1_flow + P2_flow)/2 - O3_flow
EXPRESSION Test =  asin( sin(P1_flow) +  sin(P2_flow)))/2 - O3_flow

RULE 1
IF   Net_Inflow > 0.1
THEN ORIFICE 3 SETTING = 1
ELSE ORIFICE 3 SETTING = 0.5

On SOLIDOS (command SWMMCONTROLS) , the expressions are created in the table below:


Veja também: Regras Controles do SWMM