Package cambio.simulator.export
Class MultiDataPointReporter
java.lang.Object
cambio.simulator.export.MiSimReporter<AsyncMultiColumnReportWriter>
cambio.simulator.export.MultiDataPointReporter
- Direct Known Subclasses:
BucketMultiDataPointReporter
Dynamically-typed data point collector.
- Author:
- Lion Wagner
-
Field Summary
Fields inherited from class cambio.simulator.export.MiSimReporter
datasetsPrefix, model, reportBasePath
-
Constructor Summary
ConstructorsConstructorDescriptionMultiDataPointReporter
(@NotNull desmoj.core.simulator.Model model) MultiDataPointReporter
(@NotNull String datasetsPrefix, @NotNull desmoj.core.simulator.Model model) -
Method Summary
Modifier and TypeMethodDescription<T> void
addDatapoint
(String dataSetName, desmoj.core.simulator.TimeInstant when, T... data) Adds a new datapoint to the given dataset.protected AsyncMultiColumnReportWriter
createWriter
(Path datasetPath, String[] headers) Methods inherited from class cambio.simulator.export.MiSimReporter
checkArgumentsAreNotNull, deregister, finalizeReport, getWriter, registerDefaultHeader, toString
-
Constructor Details
-
MultiDataPointReporter
public MultiDataPointReporter(@NotNull @NotNull desmoj.core.simulator.Model model) -
MultiDataPointReporter
public MultiDataPointReporter(@NotNull @NotNull String datasetsPrefix, @NotNull @NotNull desmoj.core.simulator.Model model)
-
-
Method Details
-
addDatapoint
Adds a new datapoint to the given dataset.- Specified by:
addDatapoint
in classMiSimReporter<AsyncMultiColumnReportWriter>
- Type Parameters:
T
- type of the data that should be logged.- Parameters:
dataSetName
- name of the dataset to which the datapoint should be addedwhen
- point in simulation time to which the datapoint is associated todata
- data that should be logged
-
createWriter
protected AsyncMultiColumnReportWriter createWriter(Path datasetPath, String[] headers) throws IOException - Specified by:
createWriter
in classMiSimReporter<AsyncMultiColumnReportWriter>
- Throws:
IOException
-