Package org.opentrafficsim.core.dsol
Class OtsReplication
java.lang.Object
nl.tudelft.simulation.dsol.experiment.Replication<T>
nl.tudelft.simulation.dsol.experiment.SingleReplication<org.djunits.value.vdouble.scalar.Duration>
org.opentrafficsim.core.dsol.OtsReplication
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.dsol.experiment.Treatment<org.djunits.value.vdouble.scalar.Duration>
,nl.tudelft.simulation.naming.context.Contextualized
public class OtsReplication
extends nl.tudelft.simulation.dsol.experiment.SingleReplication<org.djunits.value.vdouble.scalar.Duration>
Copyright (c) 2013-2024 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:
-
Field Summary
Fields inherited from class nl.tudelft.simulation.dsol.experiment.Replication
END_REPLICATION_EVENT, START_REPLICATION_EVENT, WARMUP_EVENT
-
Constructor Summary
ConstructorDescriptionOtsReplication
(String id, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength) Create a new OTSReplication. -
Method Summary
Modifier and TypeMethodDescriptiongetHistoryManager
(OtsSimulatorInterface simulator) Returns the history manager.org.djunits.value.vdouble.scalar.Time
Return the absolute start time of the simulation.void
setHistoryManager
(HistoryManager historyManager) Set history manager.final String
toString()
Methods inherited from class nl.tudelft.simulation.dsol.experiment.SingleReplication
removeFromContext, setContext
Methods inherited from class nl.tudelft.simulation.dsol.experiment.Replication
getContext, getRunControl, setContext
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.Treatment
getDescription, getEndTime, getId, getRunLength, getStartTime, getWarmupPeriod, getWarmupTime, setDescription
-
Constructor Details
-
OtsReplication
public OtsReplication(String id, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.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 Details
-
getHistoryManager
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
Set history manager.- Parameters:
historyManager
- HistoryManager; history manager to set
-
getStartTimeAbs
public org.djunits.value.vdouble.scalar.Time getStartTimeAbs()Return the absolute start time of the simulation.- Returns:
- Time; the absolute start time of the simulation
-
toString
- Overrides:
toString
in classnl.tudelft.simulation.dsol.experiment.SingleReplication<org.djunits.value.vdouble.scalar.Duration>
-