Name | Description |
---|---|
AssertEquality | Assert when condition is violated |
AssertInequality | Assert when condition is violated |
BaseClasses | Library with base classes to diagnose model errors |
Model that triggers an assert if |u1-u2| > threShold and t > t0.
Extends from BaseClasses.PartialInputCheck (Assert when condition is violated).
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 ... |
Type | Name | Description |
---|---|---|
input RealInput | u1 | Value to check, equal to 0 if unconnected |
input RealInput | u2 | Value to check, equal to 0 if unconnected |
block AssertEquality "Assert when condition is violated" extends BaseClasses.PartialInputCheck(message = "Inputs differ by more than threShold"); equation when (time > t0) then assert(abs(u1 - u2) < threShold, message + "\n" + " u1 = " + realString(u1) + "\n" + " u2 = " + realString(u2) + "\n" + " abs(u1-u2) = " + realString(abs(u1-u2)) + "\n" + " threShold = " + realString(threShold)); end when; end AssertEquality;
Model that triggers an assert if u1 > u2 - threShold and t > t0.
Extends from BaseClasses.PartialInputCheck (Assert when condition is violated).
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 ... |
Type | Name | Description |
---|---|---|
input RealInput | u1 | Value to check, equal to 0 if unconnected |
input RealInput | u2 | Value to check, equal to 0 if unconnected |
block AssertInequality "Assert when condition is violated" extends BaseClasses.PartialInputCheck(message = "Inputs differ by more than threShold", threShold = 0); equation when (time > t0) then assert(u1 > u2 - threShold, message + "\n" + " u1 = " + realString(u1) + "\n" + " u2 = " + realString(u2) + "\n" + " abs(u1-u2) = " + realString(abs(u1-u2)) + "\n" + " threShold = " + realString(threShold)); end when; end AssertInequality;