Package repast.simphony.data2
Interface DataSetManager
- All Known Implementing Classes:
AbstractDataSetManager,BatchRunDataSetManager,SingleRunDataSetManager
public interface DataSetManager
Interface for classes that manage the lifecycle of DataSets.
- Author:
- Nick Collier
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataSet(DataSet dataSet, ScheduleParameters scheduleParams, boolean atEnd) Adds a DataSet to this DataSetManager.voidaddDataSetBuilder(DataSetBuilder<?> builder) Adds a DataSetBuilder to this DataSetManager.voidNotifies this DataSetManager that the set of batch runs has ended.voidNotifies this DataSetManager that the set of batch runs has started.voidClears all the DataSetBuilder-s from this DataSetManager.voidflush()Notifies the DataSets managed by this DataSetManager to tell their DataSinks to flush any buffered data.Gets the default data source for returning the current batch run number, or null if not currently in batch run mode.Gets the named DataSetBuilder.Gets the default data source for returning the current random seed.Gets the default data source for returning the tick count.booleanisBatch()Gets whether or not this is a batch run.voidRemoves the specified DataSetBuilder.voidNotifies this DataSetManager that an individual run has ended.voidrunStarted(RunState runState, Object contextId, Parameters parameters) Notifies this DataSetManager that an individual run has started.
-
Method Details
-
getTickCountDataSource
TickCountDataSource getTickCountDataSource()Gets the default data source for returning the tick count.- Returns:
- the default data source for returning the tick count.
-
getRandomSeedDataSource
RandomSeedDataSource getRandomSeedDataSource()Gets the default data source for returning the current random seed.- Returns:
- the default data source for returning the current random seed.
-
getBatchRunDataSource
BatchRunDataSource getBatchRunDataSource()Gets the default data source for returning the current batch run number, or null if not currently in batch run mode.- Returns:
- the default data source for returning the current batch run number, or null if not currently in batch run mode.
-
flush
void flush()Notifies the DataSets managed by this DataSetManager to tell their DataSinks to flush any buffered data. -
addDataSet
Adds a DataSet to this DataSetManager.- Parameters:
dataSet- the DataSet to addscheduleParams- the scheduling info for recording this datasetwhether- or not to record the data at the end of the sim
-
batchStarted
void batchStarted()Notifies this DataSetManager that the set of batch runs has started. -
batchEnded
void batchEnded()Notifies this DataSetManager that the set of batch runs has ended. -
runStarted
Notifies this DataSetManager that an individual run has started.- Parameters:
runState- the current RunState -- run number etc can be retrieved from thatparameters- the current model parameters
-
runEnded
Notifies this DataSetManager that an individual run has ended.- Parameters:
runState- the RunState of the run that just ended.
-
isBatch
boolean isBatch()Gets whether or not this is a batch run.- Returns:
- true if this is batch run otherwise false.
-
addDataSetBuilder
Adds a DataSetBuilder to this DataSetManager.- Parameters:
builder-
-
removeDataSetbuilder
Removes the specified DataSetBuilder.- Parameters:
id- the id of the DataSetBuilder to remove.
-
clearDataSetBuilders
void clearDataSetBuilders()Clears all the DataSetBuilder-s from this DataSetManager. -
getDataSetBuilder
Gets the named DataSetBuilder.- Parameters:
id-- Returns:
- the named DataSetBuilder.
-