ShortExcursionFromFile model
Requirements.Examples.Elementary.Sources.ShortExcursionFromFile
ยท source
Example for rowEvents: a 10 ms excursion above a limit, between two solver steps
Extends Modelica.Icons.Example
Resources/Data/ShortExcursion.csv holds a velocity that rises to 9.9 at 0.585 s, peaks at 10.04 at
0.59 s and falls back to 9.9 at 0.595 s: above the 10 m/s limit for about 3 ms. Read with the default
rowEvents=false, nothing makes the solver stop there. The model has no physical state, and a
tool may take one step from before the excursion to after it. The check then never sees v <= 10
become false. This happened in Modelon Impact on a co-simulation trace of an oscillator (2026-12-02). With
rowEvents=false it happens here in OpenModelica 1.27.1 too: no output point (every 4 ms) falls inside
the excursion, and the assertion fails.
With rowEvents=true the solver stops at every row, and so at the row where the excursion peaks: the check
is Violated in every tool. The model asserts this at the end of the run.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| VelocityReader | block | Reads v from a MA-HS-CSV file |
Components and variables
| Name | Type | Description |
|---|---|---|
reader | VelocityReader | The solver stops at every row |
always | Requirements.Sources.BooleanConstant | Condition, always true |
during1 | Requirements.ChecksInFixedWindow.During | The velocity shall be at most 10 m/s |
violated | Boolean | during1 has been Violated |