Duration model

Requirements.Examples.Elementary.Margin.Duration  ยท source

Icon of Duration

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

NameTypeDescription
conditionModelica.Blocks.Sources.BooleanTabletrue on [1, 4)
checkModelica.Blocks.Sources.BooleanTabletrue on [1.5, 3)
minDurationRequirements.ChecksInFixedWindow.MinDurationcheck must be true for at least 1 s per condition phase, tolerance 0.5 s
maxDurationRequirements.ChecksInFixedWindow.MaxDurationcheck may be true for at most 1 s per condition phase, tolerance 0.5 s
bandDurationRequirements.ChecksInFixedWindow.BandDurationcheck must be true for between 0.5 s and 2 s per condition phase, tolerance 0.5 s