Buildings.Utilities.Diagnostics
Library with models to diagnose model errors
Information
This package contains component models for run-time diagnostics. The models in this package can be used to stop a simulation if a test is violated.
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
Name | Description |
---|---|
AssertEquality | Assert when condition is violated |
AssertInequality | Assert when condition is violated |
CheckEquality | Check equality between inputs up to a threshold |
Validation | Collection of models that validate the diagnostics models |
BaseClasses | Package with base classes for Buildings.Utilities.Diagnostics |
Buildings.Utilities.Diagnostics.AssertEquality
Assert when condition is violated
Information
Model that triggers an assert if |u1-u2| > threShold and t > t0.
Extends from BaseClasses.PartialInputCheck (Assert when condition is violated).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | startTime | 0 | Start time for activating the assert [s] |
Real | threShold | 1E-2 | Threshold for equality comparison |
String | message | "Inputs differ by more than ... |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Value to check |
input RealInput | u2 | Value to check |
Modelica definition
Buildings.Utilities.Diagnostics.AssertInequality
Assert when condition is violated
Information
Model that triggers an assert if u1 > u2 - threShold and t > t0.
Extends from BaseClasses.PartialInputCheck (Assert when condition is violated).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | startTime | 0 | Start time for activating the assert [s] |
Real | threShold | 0 | Threshold for equality comparison |
String | message | "Inputs differ by more than ... |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Value to check |
input RealInput | u2 | Value to check |
Modelica definition
Buildings.Utilities.Diagnostics.CheckEquality
Check equality between inputs up to a threshold
Information
Block that outputs 0 if the difference |u1-u2| < threShold, or else it outputs u2-u1.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | threShold | 1e-2 | Threshold for equality comparison |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Value to check |
input RealInput | u2 | Value to check |
output RealOutput | y | Error |