modelFileWriter
Partial model for writing results to a .csv file
Extends from Modelica.Blocks.Icons.DiscreteBlock (Graphical layout of discrete block component icon).
Information
Base class for a file writer. See extending classes.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin | Number of inputs | |
| String | fileName | getInstanceName() + ".csv" | File name, including extension |
| Modelica.Units.SI.Time | samplePeriod | Sample period: equidistant interval for which the inputs are saved | |
| Advanced | |||
| String | delimiter | "\t" | Delimiter for csv file |
| Boolean | writeHeader | true | =true, to write header with variable names, otherwise no header will be written |
| String | headerNames | {"col" + String(i) for i in 1:nin} | Header names, indices by default |
| Integer | significantDigits | 6 | Number of significant digits that are used for converting inputs into string format |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealVectorInput | u | Variables that are saved |
Contents
| Name | Description |
|---|---|
| Prepend a string to an existing text file |
Revisions
-
October 17, 2019 by Filip Jorissen:
Avoiding overflow of string buffer in dymola. See #1219. -
October 8, 2018 by Filip Jorissen:
Added implementation for the parametersignificantDigits. See #1041. -
September 6, 2018 by Filip Jorissen:
Improved comment ofsamplePeriod. See #1010. -
May 10, 2018 by Filip Jorissen:
First implementation. See #924.