ShortExcursionFromFile model

Requirements.Examples.Elementary.Sources.ShortExcursionFromFile  ยท source

Icon of ShortExcursionFromFile

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

NameKindDescription
VelocityReaderblockReads v from a MA-HS-CSV file

Components and variables

NameTypeDescription
readerVelocityReaderThe solver stops at every row
alwaysRequirements.Sources.BooleanConstantCondition, always true
during1Requirements.ChecksInFixedWindow.DuringThe velocity shall be at most 10 m/s
violatedBooleanduring1 has been Violated