nextTimeEvent pure function

Requirements.Internal.CSV.nextTimeEvent  ยท source

Icon of nextTimeEvent

Smallest event time of the file strictly after t (a huge value when there is none)

Extends Modelica.Icons.Function

An event of the file is an instant at which a requested Boolean or Integer column changes, or at which any requested column changes inside a group of rows with the same time; when the file was opened with rowEvents, also every row's time.

The function returns the first such instant strictly after t, or the largest double value (DBL_MAX) when there is none. Sources.PartialSignalsFromFile calls it at initialization and at every event of the file, nextTimeEvent = nextTimeEvent(file, time); the next event is then detected as the state event clock >= pre(nextTimeEvent). The pair (nextTimeEvent, pre(nextTimeEvent)) is passed to the value functions as the event bracket.

Inputs

NameTypeDescription
file inputFileThe file
t inputRealCurrent time

Outputs

NameTypeDescription
tEvent outputRealNext event time > t