Package org.opentrafficsim.core.dsol
Class OTSReplication
- java.lang.Object
-
- nl.tudelft.simulation.dsol.experiment.AbstractReplication<T>
-
- nl.tudelft.simulation.dsol.experiment.SingleReplication<Duration>
-
- org.opentrafficsim.core.dsol.OTSReplication
-
- All Implemented Interfaces:
Serializable
,ReplicationInterface<Duration>
,RunControlInterface<Duration>
,Contextualized
public class OTSReplication extends SingleReplication<Duration>
Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$,
initial version Aug 15, 2014
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class nl.tudelft.simulation.dsol.experiment.AbstractReplication
context, runControl
-
Fields inherited from interface nl.tudelft.simulation.dsol.experiment.ReplicationInterface
END_REPLICATION_EVENT, START_REPLICATION_EVENT, WARMUP_EVENT
-
-
Constructor Summary
Constructors Constructor Description OTSReplication(String id, Time startTime, Duration warmupPeriod, Duration runLength)
Create a new OTSReplication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoryManager
getHistoryManager(OTSSimulatorInterface simulator)
Returns the history manager.Time
getStartTimeAbs()
Return the absolute start time of the simulation.void
setHistoryManager(HistoryManager historyManager)
Set history manager.String
toString()
-
Methods inherited from class nl.tudelft.simulation.dsol.experiment.SingleReplication
getRunControl, removeFromContext, setContext
-
Methods inherited from class nl.tudelft.simulation.dsol.experiment.AbstractReplication
getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.tudelft.simulation.dsol.experiment.ReplicationInterface
getDescription, getEndSimTime, getId, getStartSimTime, getWarmupSimTime, setDescription
-
Methods inherited from interface nl.tudelft.simulation.dsol.experiment.RunControlInterface
getEndTime, getRunLength, getStartTime, getWarmupPeriod, getWarmupTime
-
-
-
-
Constructor Detail
-
OTSReplication
public OTSReplication(String id, Time startTime, Duration warmupPeriod, Duration runLength) throws NamingException
Create a new OTSReplication.- Parameters:
id
- String; id of the new OTSReplicationstartTime
- Time; the start time of the new OTSReplicationwarmupPeriod
- Duration; the warmup period of the new OTSReplicationrunLength
- Duration; the run length of the new OTSReplication- Throws:
NamingException
- when the context for the replication cannot be created
-
-
Method Detail
-
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 classAbstractReplication<Duration>
-
-