blockAssertCondition

Assert that input u is true

Extends from Modelica.Blocks.Interfaces.partialBooleanSI (Partial block with 1 input Boolean signal).

Information

This block asserts that the Boolean input u is true. If u is false, the simulation will either abort with an error (if assertionLevel is set to error), or issue a warning and continue (if assertionLevel is set to warning). The message will be reported in either case. For further information, refer to the documentation of ModelicaReference.Operators.'assert()' – an operator which this block is based on.

Typically, this block is used by connecting a (possibly) time varying outside condition and the input u to abort the simulation if the condition fails.

Parameters

TypeNameDefaultDescription
Stringmessage"Assert block failed"Assertion message to be displayed if the input u is false; please adapt
AssertionLevelassertionLevelAssertionLevel.errorAssertion level

Connectors

TypeNameDefaultDescription
Blocks.Interfaces.BooleanInputu (from partialBooleanSI)Connector of Boolean input signal