Equation Editor in simulations

You can use the Equation Editor to build equations in the Monte Carlo simulation tool.

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
Checks whether a condition is met and returns one value if true and another value if false.
  • Syntax: if(logical_test, value_if_true, value_if_false)
  • Example: if(variableA>5, 1, 0) returns 1 if variableA is greater than 5, and returns 0 if variableA is less than or equal to 5
And
Checks whether all the conditions are true. Returns true if all conditions are met and false otherwise. It is often useful to use the "and" function as the first argument of an "if" function, for example, if(and(logical_test1, logical_test2, ...), 1, 0).
  • Syntax: and(logical_test1, logical_test2, ...)
  • Example: 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 7
Or
Checks whether any of the conditions are true. Returns true if at least one condition is met and false otherwise. It is often useful to use the "or" function as the first argument of an "if" function, for example, if(or(logical_test1, logical_test2, ...), 1, 0).
  • Syntax: or(logical_test1, logical_test2, ...)
  • Example: 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 7
Not
Changes false to true or true to false. Used to negate a logical condition.
  • Syntax: not(logical_test)
  • Example: not(variableA>5) returns 1 if variableA is less than or equal to 5; returns 0 if variableA is greater than 5
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy