Episodes model
Requirements.Examples.Elementary.ViolationStatistics.Episodes
ยท source
Five violations against mergeGap and minDuration, and against a property that is applicable half of the time
Extends Modelica.Icons.Example
A property that is Violated on [1, 1.2), [1.3, 2), [5, 5.05), [8, 8.9) and from 9.7 s, and
Satisfied otherwise, into five ViolationStatistics
without margin. At 9.99 s:
| Instance | Settings | nViolations | longest | total |
|---|---|---|---|---|
| plain | — | 5 | 0.9 s from 8 s | 2.14 s |
| merged | mergeGap = 0.2 s | 4: the first two merge across their 0.1 s gap | 1 s from 1 s (gap included) | 2.14 s |
| mergedMin | mergeGap = 0.2 s, minDuration = 0.1 s | 3: [5, 5.05) is too short | 1 s from 1 s | 2.14 s |
| minOnly | minDuration = 0.25 s | 3 (2 at 9.9 s: the running violation counts once it is 0.25 s long) | 0.9 s from 8 s | 2.14 s |
| partly | property Undefined before 5 s | 3 | 0.9 s from 8 s | 1.24 s, 1.24/4.99 of the applicable time |
The filters change the count and the longest episode, never the total.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Components and variables
| Name | Type | Description |
|---|---|---|
violatedTable | Modelica.Blocks.Sources.BooleanTable | true on [1, 1.2), [1.3, 2), [5, 5.05), [8, 8.9) and from 9.7 s |
p | Property | Violated while the table is true |
q | Property | The same, not applicable before 5 s |
plain | Requirements.Verify.ViolationStatistics | Every violation an episode |
merged | Requirements.Verify.ViolationStatistics | A violation within 0.2 s of the previous one continues its episode |
mergedMin | Requirements.Verify.ViolationStatistics | Merged, and episodes under 0.1 s not counted |
minOnly | Requirements.Verify.ViolationStatistics | Episodes under 0.25 s not counted |
partly | Requirements.Verify.ViolationStatistics | Applicable from 5 s only |