Duration model
Requirements.Examples.Elementary.Margin.Duration
ยท source
Min/Max/BandDuration on one condition phase: the margin is the running duration against its limit, piecewise linear
Extends Modelica.Icons.Example
One condition phase [1, 4) s in which the check is true on [1.5, 3) s, 1.5 s in total, against
MinDuration(durationMin = 1), MaxDuration(durationMax = 1) and
BandDuration(0.5, 2), all with scale = 0.5. The blocks' new output duration
is the running accumulated duration of the phase (0, then t − 1.5, then 1.5, frozen after the phase),
and the margins are (duration − 1)/0.5, (1 − duration)/0.5 and the band's
minimum, asserted in closed form away from the event instants. MinDuration turns Satisfied at t = 2.5 s where its
margin crosses zero, MaxDuration Violated there; at the end the verdicts are Satisfied / Violated / Satisfied with
margins 1 / −1 / 1. While a duration block is still Undecided its margin is provisional (negative for
MinDuration until the minimum is reached), which is why a consumer takes the worst value over the decided
points only.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Components and variables
| Name | Type | Description |
|---|---|---|
condition | Modelica.Blocks.Sources.BooleanTable | true on [1, 4) |
check | Modelica.Blocks.Sources.BooleanTable | true on [1.5, 3) |
minDuration | Requirements.ChecksInFixedWindow.MinDuration | check must be true for at least 1 s per condition phase, tolerance 0.5 s |
maxDuration | Requirements.ChecksInFixedWindow.MaxDuration | check may be true for at most 1 s per condition phase, tolerance 0.5 s |
bandDuration | Requirements.ChecksInFixedWindow.BandDuration | check must be true for between 0.5 s and 2 s per condition phase, tolerance 0.5 s |