simres
is a node.js package to read and write csv files that have been generated by a simulation tool.
Deprecated: This package is no longer actively developed/maintained. Security issues (or any other issues) will not be fixed!
The package is being developed and maintained by the Chair of Automation and Energy Systems at the Saarland University.
simres
is released under the ISC license.
$ npm install simres
The simres
package provides four functions.
- purpose: parse the content of a simulation result file
- arguments:
- (
String
): the content of the simulation result file as plain text - (
Object
): the optional optionsObject
to adjust the way of parsing with the following attributes:columnSeparator
(String
): the character sequence that is used to separate columns (standard value is'\t'
)rowSeparator
(String
): the character sequence that is used to separate rowss (standard value is'\r\n'
)automaticRowEndDetection
(Boolean
): define whether the row ending separator shall be detected automatically (standard value istrue
)
- (
- returns (
Array
): the simulation result as array of timeseries objects (timestamps are a timeseries on their own). Each item in the array is anObject
with the following attributes:label
(String
): the label of the timeseriestype
(String
): the type of the timeseriesunit
(String
): the unit of the timeseriesvalues
(Array
): the values of the timeseries
- purpose: asynchronously read and parse the content of a simulation result file
- arguments:
- (
String
): the path to the csv file - (
Object
): the optional optionsObject
to adjust the way of parsingcolumnSeparator
(String
): the character sequence that is used to separate columns (standard value is'\t'
)rowSeparator
(String
): the character sequence that is used to separate rowss (standard value is'\r\n'
)automaticRowEndDetection
(Boolean
): define whether the row ending separator shall be detected automatically (standard value istrue
)
- (
- returns (
Array
): the simulation result as array of timeseries objects (timestamps are a timeseries on their own). Each item in the array is anObject
with the following attributes:label
(String
): the label of the timeseriestype
(String
): the type of the timeseriesunit
(String
): the unit of the timeseriesvalues
(Array
): the values of the timeseries
- purpose: compose the content of a simulation result file
- arguments:
- (
Array
): the collection of timeseries items with each item being anObject
with the following attributes:label
(String
): the label of the timeseriestype
(String
): the type of the timeseriesunit
(String
): the unit of the timeseriesvalues
(Array
): the values of the timeseries
- (
Object
): the optional optionsObject
to adjust the way of parsing with the following attributes:columnSeparator
(String
): the character sequence that is used to separate columns (standard value is'\t'
)rowSeparator
(String
): the character sequence that is used to separate rowss (standard value is'\r\n'
)
- (
- returns (
String
): the simulation result converted to plain text
- purpose: asynchronously compose the content of a simulation result and write it to a file
- arguments:
- (
String
): the path to file that shall be written - (
Array
): the collection of timeseries items with each item being anObject
with the following attributes:label
(String
): the label of the timeseriestype
(String
): the type of the timeseriesunit
(String
): the unit of the timeseriesvalues
(Array
): the values of the timeseries
- (
Object
): the optional optionsObject
to adjust the way of parsing with the following attributes:columnSeparator
(String
): the character sequence that is used to separate columns (standard value is'\t'
)rowSeparator
(String
): the character sequence that is used to separate rowss (standard value is'\r\n'
)
- (
- returns (
undefined
)