The Equation Editor allows you to build an equation using the variables in your model. After you add input and output variables to your model, you can select them in the Equation Editor, along with common operators, trigonometry functions, and the following logical functions.
if(logical_test, value_if_true, value_if_false)
if(variableA>5, 1, 0)
returns 1 if
variableA is greater than 5, and returns 0 if variableA is less than or
equal to 5and(logical_test1, logical_test2, ...)
and(variableA>5, variableB>7)
returns 1 if variableA is greater than 5 and variableB is greater than
7; returns 0 if either variableA is less than or equal to 5, or if
variableB is less than or equal to 7or(logical_test1, logical_test2, ...)
or(variableA>5, variableB>7)
returns 1 if variableA is greater than 5, or variableB is greater than
7, or both are true; returns 0 if both variableA is less than or equal
to 5, and variableB is less than or equal to 7not(logical_test)
not(variableA>5)
returns 1 if variableA is less than
or equal to 5; returns 0 if variableA is greater than 5