Class AbstractDataSetManager

java.lang.Object
repast.simphony.data2.AbstractDataSetManager
All Implemented Interfaces:
DataSetManager, RunListener
Direct Known Subclasses:
BatchRunDataSetManager, SingleRunDataSetManager

public abstract class AbstractDataSetManager extends Object implements DataSetManager, RunListener
Abstract implementation of a DataSetManager. This does scheduling and data collection on the master context.
Author:
Nick Collier
  • Field Details

  • Constructor Details

    • AbstractDataSetManager

      public AbstractDataSetManager()
  • Method Details

    • removeDataSetbuilder

      public void removeDataSetbuilder(String id)
      Description copied from interface: DataSetManager
      Removes the specified DataSetBuilder.
      Specified by:
      removeDataSetbuilder in interface DataSetManager
      Parameters:
      id - the id of the DataSetBuilder to remove.
    • clearDataSetBuilders

      public void clearDataSetBuilders()
      Description copied from interface: DataSetManager
      Clears all the DataSetBuilder-s from this DataSetManager.
      Specified by:
      clearDataSetBuilders in interface DataSetManager
    • getBatchRunDataSource

      public BatchRunDataSource getBatchRunDataSource()
      Gets the BatchRunDataSource that this manager will auto update with the current run number.
      Specified by:
      getBatchRunDataSource in interface DataSetManager
      Returns:
      the BatchRunDataSource that this manager will auto update with the current run number.
    • getTickCountDataSource

      public TickCountDataSource getTickCountDataSource()
      Description copied from interface: DataSetManager
      Gets the default data source for returning the tick count.
      Specified by:
      getTickCountDataSource in interface DataSetManager
      Returns:
      the default data source for returning the tick count.
    • getRandomSeedDataSource

      public RandomSeedDataSource getRandomSeedDataSource()
      Description copied from interface: DataSetManager
      Gets the default data source for returning the current random seed.
      Specified by:
      getRandomSeedDataSource in interface DataSetManager
      Returns:
      the default data source for returning the current random seed.
    • addDataSet

      public void addDataSet(DataSet dataSet, ScheduleParameters scheduleParams, boolean atEnd)
      Description copied from interface: DataSetManager
      Adds a DataSet to this DataSetManager.
      Specified by:
      addDataSet in interface DataSetManager
      Parameters:
      dataSet - the DataSet to add
      scheduleParams - the scheduling info for recording this dataset
    • flush

      public void flush()
      Notifies the DataSets managed by this DataSetManager to tell their DataSinks to flush any buffered data.
      Specified by:
      flush in interface DataSetManager
    • clearDataSets

      public void clearDataSets()
      Clears this data set manager of any added datasets.
    • runStarted

      public void runStarted(RunState runState, Object contextId, Parameters parameters)
      Description copied from interface: DataSetManager
      Notifies this DataSetManager that an individual run has started.
      Specified by:
      runStarted in interface DataSetManager
      Parameters:
      runState - the current RunState -- run number etc can be retrieved from that
      parameters - the current model parameters
    • runEnded

      public void runEnded(RunState runState, Object contextId)
      Description copied from interface: DataSetManager
      Notifies this DataSetManager that an individual run has ended.
      Specified by:
      runEnded in interface DataSetManager
      Parameters:
      runState - the RunState of the run that just ended.
    • addDataSetBuilder

      public void addDataSetBuilder(DataSetBuilder<?> builder)
      Description copied from interface: DataSetManager
      Adds a DataSetBuilder to this DataSetManager.
      Specified by:
      addDataSetBuilder in interface DataSetManager
    • getDataSetBuilder

      public DataSetBuilder<?> getDataSetBuilder(String id)
      Description copied from interface: DataSetManager
      Gets the named DataSetBuilder.
      Specified by:
      getDataSetBuilder in interface DataSetManager
      Returns:
      the named DataSetBuilder.
    • stopped

      public void stopped()
      Description copied from interface: RunListener
      Invoked when the current run has been stopped.
      Specified by:
      stopped in interface RunListener
    • paused

      public void paused()
      Description copied from interface: RunListener
      Invoked when the current run has been paused.
      Specified by:
      paused in interface RunListener
    • started

      public void started()
      Description copied from interface: RunListener
      Invoked when the current run has been started.
      Specified by:
      started in interface RunListener
    • restarted

      public void restarted()
      Description copied from interface: RunListener
      Invoked when the current run has been restarted after a pause.
      Specified by:
      restarted in interface RunListener