Package org.opentrafficsim.core.dsol
Class OTSReplication
java.lang.Object
nl.tudelft.simulation.dsol.experiment.Replication<Time,Duration,SimTimeDoubleUnit,S>
nl.tudelft.simulation.dsol.experiment.Replication.TimeDoubleUnit<OTSSimulatorInterface>
org.opentrafficsim.core.dsol.OTSReplication
- All Implemented Interfaces:
java.io.Serializable
public class OTSReplication extends Replication.TimeDoubleUnit<OTSSimulatorInterface>
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision: 6010 $, $LastChangedDate: 2020-01-23 11:14:19 +0100 (Thu, 23 Jan 2020) $, by $Author: averbraeck $,
initial version Aug 15, 2014
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.tudelft.simulation.dsol.experiment.Replication
Replication.CalendarDouble<S extends SimulatorInterface.CalendarDouble>, Replication.CalendarFloat<S extends SimulatorInterface.CalendarFloat>, Replication.CalendarLong<S extends SimulatorInterface.CalendarLong>, Replication.TimeDouble<S extends SimulatorInterface.TimeDouble>, Replication.TimeDoubleUnit<S extends SimulatorInterface.TimeDoubleUnit>, Replication.TimeFloat<S extends SimulatorInterface.TimeFloat>, Replication.TimeFloatUnit<S extends SimulatorInterface.TimeFloatUnit>, Replication.TimeLong<S extends SimulatorInterface.TimeLong> -
Constructor Summary
Constructors Constructor Description OTSReplication(java.lang.String id, Experiment.TimeDoubleUnit<OTSSimulatorInterface> experiment) -
Method Summary
Modifier and Type Method Description static OTSReplicationcreate(java.lang.String id, Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface model)Create a new OTSReplication.HistoryManagergetHistoryManager(OTSSimulatorInterface simulator)Returns the history manager.voidsetHistoryManager(HistoryManager historyManager)Set history manager.java.lang.StringtoString()Methods inherited from class nl.tudelft.simulation.dsol.experiment.Replication.TimeDoubleUnit
create, getExperiment, getTreatmentMethods inherited from class nl.tudelft.simulation.dsol.experiment.Replication
create, getContext, getDescription, getStream, getStreams, reset, setDescription, setStreams
-
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.NamingExceptionCreate 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 OTSReplicationmodel- OTSModelInterface; the model- Returns:
- the created replication
- Throws:
javax.naming.NamingException- when the context for the replication cannot be created
-
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
-
toString
public final java.lang.String toString()- Overrides:
toStringin classReplication<Time,Duration,SimTimeDoubleUnit,OTSSimulatorInterface>
-