Seeq Team Chris Harp Posted July 19 Seeq Team Share Posted July 19 I am trying to create a composite condition that requires multiple criteria to be met simultaneously. Specifically, I have three separate conditions: Condition A, Condition B, and Condition C. I want to generate a new condition that is true only when all three of these conditions are true. However, the Composite Condition tool only allows combining two conditions at a time, which forces me to create two separate composite conditions to achieve my goal. Is there a more efficient way to combine more than two conditions into a single composite condition? Link to comment Share on other sites More sharing options...
Seeq Team Solution Chris Harp Posted July 19 Author Seeq Team Solution Share Posted July 19 (edited) When creating a composite condition with more than 2 conditions, you can achieve this by using formula. To create a composite condition that is true only when all three conditions (Condition A, Condition B, and Condition C) are true simultaneously, we can use the logical and operator. This allows us to combine multiple conditions into a single condition that is true only when all input conditions are true. Example: // Combine Condition A, Condition B, and Condition C using the logical and operator $finalCondition = $conditionA and $conditionB and $conditionC // Output the final composite condition $finalCondition There are various logical operators that we can use within formula to achieve the desired composite condition. Logical Operators in Seeq's Formula Language and: Logical AND operator. True if both conditions are true. Same as using .intersect() or: Logical OR operator. True if at least one condition is true. Same as using .union() not: Logical NOT operator. Inverts the condition. Same as using .inverse() Be cautious using not or .inverse() without properly bounding your condition which can cause data to not be be display when conditions must be properly bounded. Use .setMaximumDuration() or .removeLongerThan() or .intersection(past()) or .within(past()) >: Greater than operator. True if the left operand is greater than the right operand. Same as using .isGreaterThan() >=: Greater than or equal to operator. True if the left operand is greater than or equal to the right operand. Same as using .isGreaterThanOrEqualTo() <: Less than operator. True if the left operand is less than the right operand. Same as using .isLessThan() =: Less than or equal to operator. True if the left operand is less than or equal to the right operand. Same as .isLessThanOrEqualTo() ==: Equal to operator. True if both operands are equal. Same as .isEqualTo() !=: Not equal to operator. True if both operands are not equal. Same as .isNotEqualTo() // Example of using logical operators to create a condition $conditionA = $signal1 > 10 $conditionB = $signal2 < 20 $conditionC = $signal3 == 30 // Combine conditions using logical operators $finalCondition = ($conditionA or $conditionB) and (not $conditionC).intersect(past()) // Output the final composite condition $finalCondition Edited July 19 by Chris Harp grammar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now