Class AbstractExporter
-
-
Field Summary
Fields Modifier and Type Field Description public final static Double
DEFAULT_INTERVAL
private final List<Extractor<?>>
dataExtractors
-
Constructor Summary
Constructors Constructor Description AbstractExporter(Double samplingInterval)
-
Method Summary
Modifier and Type Method Description final List<Extractor<?>>
getDataExtractors()
The List of Extractor used to export simulations data. final Unit
bindDataExtractors(List<Extractor<?>> dataExtractors)
Assign the list of dataExtractors to the selected Exporter. final Unit
bindVariables(Map<String, ?> variables)
Assign the map of variables to the selected Exporter. final Unit
update(Environment<T, P> environment, Actionable<T> reaction, Time time, Long step)
Every step of the simulation check if is time to export data depending on the sampling interval. abstract Unit
exportData(Environment<T, P> environment, Actionable<T> reaction, Time time, Long step)
Delegates the concrete implementation of this method to his subclasses. -
-
Constructor Detail
-
AbstractExporter
AbstractExporter(Double samplingInterval)
- Parameters:
samplingInterval
- the sampling time, defaults to DEFAULT_INTERVAL.
-
-
Method Detail
-
getDataExtractors
final List<Extractor<?>> getDataExtractors()
The List of Extractor used to export simulations data.
-
bindDataExtractors
final Unit bindDataExtractors(List<Extractor<?>> dataExtractors)
Assign the list of dataExtractors to the selected Exporter.
-
bindVariables
final Unit bindVariables(Map<String, ?> variables)
-
update
final Unit update(Environment<T, P> environment, Actionable<T> reaction, Time time, Long step)
Every step of the simulation check if is time to export data depending on the sampling interval. Converts the division of the current time and the interval to Long in order to export data only when the difference between steps is as big as the sampling interval.
-
exportData
abstract Unit exportData(Environment<T, P> environment, Actionable<T> reaction, Time time, Long step)
Delegates the concrete implementation of this method to his subclasses.
-
-
-
-