getReal pure function
Requirements.Internal.CSV.getReal
ยท source
Value of the i-th Real column at time t (linear between rows; the event bracket picks the side of an event)
Extends Modelica.Icons.Function
The derivative annotation names getRealDer
(the slope of the linear segment), as Modelica.Blocks.Sources.CombiTimeTable does for its table
function, so der(reader.x) — a SignalAnalysis.ExactDerivative on a reader output — translates.
The column is addressed by its index column (1-based, an index into realNames; an index out of
range is an error). The value is interpolated linearly between the rows around t. At the time of a group of rows with the same
time (an event of the file), the event bracket decides the side: before the block's when-clause has updated
nextTimeEvent at the event instant (nextTimeEvent == preNextTimeEvent) the value of the group's first
row is returned, afterwards that of its last row. Outside the file's time range the first or last row is held, or an error is
raised if the file was opened with extrapolateHold = false. An extending block of
Sources.PartialSignalsFromFile uses it in the
declaration equation of each Real output.
Inputs
| Name | Type | Description |
|---|---|---|
file input | File | The file |
column input | Integer | Index into the realNames the file was opened with |
t input | Real | Current time |
nextTimeEvent input | Real | The block's nextTimeEvent |
preNextTimeEvent input | Real | pre(nextTimeEvent) |
Outputs
| Name | Type | Description |
|---|---|---|
y output | Real | Value of the column at time t |