implies function
Requirements.LogicalFunctions.implies
ยท source
Returns check as long as the condition is true, otherwise returns true
Extends Modelica.Icons.Function
Syntax
implies(condition, check);
Description
If condition is true, the function returns check. Otherwise, it returns true.
This is the Boolean (2-valued) logical implication condition => check,
i.e., not condition or check. A false condition makes the result true, so
the function cannot distinguish "not applicable" from "satisfied". If this distinction
is needed, use during, which
returns a Property that is Undefined
while the condition is false.
Example
The property is demonstrated with the following example calling the function as:
property = implies(condition,check)
![]() | |
| simulation result |
Inputs
| Name | Type | Description |
|---|---|---|
condition input | Boolean | Condition under which check must hold |
check input | Boolean | Value that must be true while condition is true |
Outputs
| Name | Type | Description |
|---|---|---|
result output | Boolean | = check, if condition is true, otherwise true (logical implication condition => check) |
