Class OTSReplication

All Implemented Interfaces:
java.io.Serializable

public class OTSReplication
extends Replication.TimeDoubleUnit<OTSSimulatorInterface>

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

Version:
$Revision: 5717 $, $LastChangedDate: 2019-11-14 14:36:06 +0100 (Thu, 14 Nov 2019) $, by $Author: averbraeck $, initial version Aug 15, 2014
Author:
Alexander Verbraeck
See Also:
Serialized Form
  • Constructor Details

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

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

      public final java.lang.String toString()
      Overrides:
      toString in class Replication<Time,​Duration,​SimTimeDoubleUnit,​OTSSimulatorInterface>