implies function

Requirements.LogicalFunctions.implies  ยท source

Icon of implies

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

NameTypeDescription
condition inputBooleanCondition under which check must hold
check inputBooleanValue that must be true while condition is true

Outputs

NameTypeDescription
result outputBoolean= check, if condition is true, otherwise true (logical implication condition => check)