Class OtsReplication

All Implemented Interfaces:
Serializable, ReplicationInterface<Duration>, RunControlInterface<Duration>, Contextualized

public class OtsReplication extends SingleReplication<Duration>

Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • OtsReplication

      public OtsReplication(String id, Time startTime, Duration warmupPeriod, Duration runLength) throws 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
      Throws:
      NamingException - when the context for the replication cannot be created
  • Method Details

    • 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
    • getStartTimeAbs

      public Time getStartTimeAbs()
      Return the absolute start time of the simulation.
      Returns:
      Time; the absolute start time of the simulation
    • toString

      public final String toString()
      Overrides:
      toString in class AbstractReplication<Duration>