Class OTSReplication

    • Constructor Detail

      • OTSReplication

        public OTSReplication​(java.lang.String id,
                              Experiment.TimeDoubleUnit<OTSSimulatorInterface> experiment)
                       throws javax.naming.NamingException
        Parameters:
        id - String; the id of the Replication.
        experiment - Experiment.TimeDoubleUnit<OTSSimulatorInterface>; Experiment
        Throws:
        javax.naming.NamingException - when the context for the replication cannot be created
    • Method Detail

      • create

        public static OTSReplication create​(java.lang.String id,
                                            Time startTime,
                                            Duration warmupPeriod,
                                            Duration runLength,
                                            OTSModelInterface model)
                                     throws javax.naming.NamingException
        Create a new OTSReplication.
        Parameters:
        id - String; id of the new OTSReplication
        startTime - Time; the start time of the new OTSReplication
        warmupPeriod - Duration; the warmup period of the new OTSReplication
        runLength - Duration; the run length of the new OTSReplication
        model - OTSModelInterface; the model
        Returns:
        the created replication
        Throws:
        javax.naming.NamingException - when the context for the replication cannot be created
      • getHistoryManager

        public HistoryManager getHistoryManager​(OTSSimulatorInterface simulator)
        Returns the history manager. If none was set, one is created coupled to the simulator using 0s of history and 10s clean-up time.
        Parameters:
        simulator - OTSSimulatorInterface; simulator
        Returns:
        HistoryManager; history manager
      • setHistoryManager

        public void setHistoryManager​(HistoryManager historyManager)
        Set history manager.
        Parameters:
        historyManager - HistoryManager; history manager to set