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>
-
-
Field Summary
-
Fields inherited from class nl.tudelft.simulation.dsol.experiment.Replication
END_REPLICATION_EVENT, START_REPLICATION_EVENT, WARMUP_EVENT
-
-
Constructor Summary
Constructors Constructor Description OTSReplication(java.lang.String id, Experiment.TimeDoubleUnit<OTSSimulatorInterface> experiment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OTSReplication
create(java.lang.String id, Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface model)
Create a new OTSReplication.HistoryManager
getHistoryManager(OTSSimulatorInterface simulator)
Returns the history manager.void
setHistoryManager(HistoryManager historyManager)
Set history manager.java.lang.String
toString()
-
Methods inherited from class nl.tudelft.simulation.dsol.experiment.Replication.TimeDoubleUnit
create, getExperiment, getTreatment
-
Methods inherited from class nl.tudelft.simulation.dsol.experiment.Replication
create, getContext, getDescription, getStream, getStreams, reset, setDescription, setStreams
-
-
-
-
Constructor Detail
-
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 Detail
-
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 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
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 classReplication<Time,Duration,SimTimeDoubleUnit,OTSSimulatorInterface>
-
-