Class SimulationResponseDataCollector

  • All Implemented Interfaces:
    ObserverIfc, GetNameIfc, IdentityIfc

    public class SimulationResponseDataCollector
    extends ModelElementObserver
    The purpose of this class is to store within replication and across replication summary statistics for post processing. This class should be attached to the simulation Model prior to running the simulation in order to observe the data. For each replication, for each response variable the within replication summary statistics are captured. In addition, the summary statistics across all the replications is captured. If the user needs to collect the statistics across multiple experiments of the same model, then use setClearAfterExpFlag(true). In this situation, make sure that the experiments have unique names before running the simulation. The data for each run will be stored based on the name of the experiment.
    • Constructor Detail

      • SimulationResponseDataCollector

        public SimulationResponseDataCollector​(Model m)
      • SimulationResponseDataCollector

        public SimulationResponseDataCollector​(Model m,
                                               java.lang.String name)
    • Method Detail

      • getClearBeforeExpFlag

        public final boolean getClearBeforeExpFlag()
      • setClearBeforeExpFlag

        public final void setClearBeforeExpFlag​(boolean flag)
      • getAllWithinReplicationStatistics

        public java.util.List<java.util.Map<java.lang.String,​WeightedStatistic>> getAllWithinReplicationStatistics​(java.lang.String expName)
        Returns a list of maps. Each map represents the within replication statistics for each response variable in the model for a replication. The keys to the map are the names of the response variables. Each element of the list is a different replication. The 0th element is the first replication
        Parameters:
        expName - the name of the experiment
        Returns:
        Returns a list of maps.
      • getAcrossReplicationStatistics

        public java.util.Map<java.lang.String,​Statistic> getAcrossReplicationStatistics​(java.lang.String expName)
        The map represents the across replication statistics for each response variable in the model. The keys to the map are the names of the response variables.
        Parameters:
        expName - the name of the experiment
        Returns:
        the map of across replication statistics for each response
      • clearAllResponseData

        public void clearAllResponseData()
        Clears all saved data