Class SingleReplication<T extends Number & Comparable<T>>
- java.lang.Object
-
- nl.tudelft.simulation.dsol.experiment.Replication<T>
-
- nl.tudelft.simulation.dsol.experiment.SingleReplication<T>
-
- Type Parameters:
T- the time type, e.g., Double, Long, Duration
- All Implemented Interfaces:
Serializable,Treatment<T>,Contextualized
public class SingleReplication<T extends Number & Comparable<T>> extends Replication<T>
A single replication that is executed outside of an Experiment.Copyright (c) 2002-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
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 SingleReplication(String id, T startTime, T warmupPeriod, T runLength)construct a stand-alone replication.SingleReplication(RunControl<T> runControl)Construct a stand-alone replication using a RunControl to store the run information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremoveFromContext()Remove the context for this replication.protected voidsetContext()Set the context for this replication.StringtoString()-
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 Detail
-
SingleReplication
public SingleReplication(String id, T startTime, T warmupPeriod, T runLength)
construct a stand-alone replication.- Parameters:
id- String; the id of the replication; should be unique within the experiment.startTime- T; the start time of the simulation.warmupPeriod- R; the warmup period, included in the runlength (!)runLength- R; the total length of the run, including the warm-up period.- Throws:
NullPointerException- when id, startTime, warmupPeriod or runLength is nullIllegalArgumentException- when warmup period is negative, or run length is zero or negative, or when the warmup time is longer than or equal to the runlength, or when a context for the replication cannot be created
-
SingleReplication
public SingleReplication(RunControl<T> runControl)
Construct a stand-alone replication using a RunControl to store the run information.- Parameters:
runControl- RunControlInterface; the run control for the replication- Throws:
NullPointerException- when runControl is null
-
-
Method Detail
-
setContext
protected void setContext()
Set the context for this replication.- Throws:
IllegalArgumentException- in case a context for the replication cannot be created
-
removeFromContext
public void removeFromContext()
Remove the context for this replication.
-
-