blockAssertEquality
Assert when condition is violated
Extends from BaseClasses.PartialInputCheck (Assert when condition is violated).
Information
Model that triggers an assert if |u1-u2| > threShold and t > t0.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | startTime (from PartialInputCheck) | 0 | Start time for activating the assert |
| Real | threShold (from PartialInputCheck) | 1E-2 | Threshold for equality comparison |
| String | message (from PartialInputCheck) | "Inputs differ by more than threShold" |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | u1 (from PartialInputCheck) | Value to check | |
| Modelica.Blocks.Interfaces.RealInput | u2 (from PartialInputCheck) | Value to check |
Revisions
-
October 10, 2013, by Michael Wetter:
Reformulated model to avoid an event iteration. -
September 10, 2013, by Michael Wetter:
Addedtimein print statement as OpenModelica, in its error message, does not output the time when the assert is triggered. -
January 23, 2013, by Michael Wetter:
Replacedwhentest withiftest as equations within awhensection are only evaluated when the condition becomes true. This fixes issue 72. -
April 17, 2008, by Michael Wetter:
First implementation.