Applying a Global Rule

What is a Global Rule?

Note: Global Rules are optional.

Global Rules are rules which are not associated to any measure, and that you define independently.

You can use Global Rules in two different ways:

  • to get a numerical value resulting from operations like addition or subtraction between measures or constants.

    In Speos, Global Rules giving numerical values are considered as numerical variables.

  • to get a boolean result resulting from operations like Equal or Not Equal.

    You can use those rules to perform a boolean check and make sure that several or all rules you create are valid. This is particularly useful for some regulations, when the value of a point can be inadequate and yet, thanks to the values of other points, global criteria can seem valid.

    In Speos, global rules giving a boolean result are considered as boolean variables.

How to create a Global Rule?

To create a rule, you need:

  • a Rule: the Rule corresponds to the rule's name.

  • a Formula.

    A formula can be a constant, an operation, a boolean operation, a function, a variable.

    Note: A variable must always be one of the measures or one of the rules of the table.

    The conventions to write measure variables are Area_name.Magnitude_type.Operator_type.Measure_Type or Area_name.Measure_type. Only Area_name. is mandatory.

    The first convention is best suited when working with a lot of measures on one area as it allows you to precise which value you want to consider for the rule. The second convention is best suited when working with a few measures per area as the first measure (Measure type) encountered in the area is used for the rule.

    For rules, only the rule's name is necessary.

    For more information about the available operators and functions, you can see Operators and Functions for Global Rules.

  1. In the Measure table, select an Area.

  2. Click Add global rule .

  3. In the Rule column, define the name of the rule.

    = automatically appears next to the rule name.

  4. In the Formula column, define the reference formula.

Global Rule examples:

  • Numerical global rule: Global_Rule_1 = Area_1.Flux * 2

    • Rule=Global_Rule_1

    • Formula=Area_1.Flux*2

  • Boolean global rule: Global_Rule_2 = (R3 || R4) && R7

    • Rule=Global_Rule_2

    • Formula=(R3 || R4) && R7

      The Global_Rule_2 verifies the rules (R3 or R4) and R7.

How to analyze a measure with a Rule?

  • If you define a numerical global rule, the value appears behind the rule's name, for example, R9 = 608.525.

  • If you define a boolean global rule that is respected, the line becomes green and (passed) is appended to the rule's name.

  • If you define a boolean global rule that is not respected, the line becomes red and (failed) is appended to the rule's name.

  • If the global rule is not considered, the line is gray. There can be several reasons to this:

    • the rule is not set,

    • the rule includes a syntax error as a missing parenthesis,

    • one or several variables are unknown.

How to delete a Global Rule?

To delete a Global Rule, select the global rule to delete and click Remove area or measure or rule .