ViolationStatistics package
Requirements.Examples.Elementary.ViolationStatistics
ยท source
Examples of Verify.ViolationStatistics: how often, how long and how badly a requirement was violated, asserted against closed-form values
Extends Modelica.Icons.ExamplesPackage
Examples of Verify.ViolationStatistics and of the
statistics option of the requirement blocks. Sine, Episodes and Gating assert every
output against closed-form values; RequirementLog shows the log and the summary; the Year* models
run a year with hourly output, as an annual building simulation does, and measure what the two worst-margin methods cost.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| Sine | model | A sine against a limit: four episodes of 10/3 s each, the worst margin -2 between two output points | |
| Episodes | model | Five violations against mergeGap and minDuration, and against a property that is applicable half of the time | |
| Gating | model | A MinDuration check: its provisional margin while Undecided does not count, the worst decided margin is 0 | |
| RequirementLog | model | Verify.Requirement with computeStatistics: the statistics are logged beside the verdict and printed in the summary | |
| PartialYear | partial model | A year of a room temperature against a comfort band, hourly output | |
| YearRippleNoStatistics | model | A year with a 10-minute ripple, no statistics: the reference for the cost of the statistics | |
| YearRippleContinuous | model | A year with a 10-minute ripple, continuous method: one event per local extremum of the margin | |
| YearRippleRatchet | model | A year with a 10-minute ripple, ratchet method: an event only at a new low |