Class RunControl<T extends Number & Comparable<T>>
- java.lang.Object
-
- nl.tudelft.simulation.dsol.experiment.RunControl<T>
-
- Type Parameters:
T- the simulation time type to be able to implement a comparator on the simulation time.
- All Implemented Interfaces:
Serializable,Treatment<T>
- Direct Known Subclasses:
ExperimentRunControl
public class RunControl<T extends Number & Comparable<T>> extends Object implements Treatment<T>
RunControl is a data object that contains off-line run control information. It can be fed to an Experiment or a Replication to set the run control parameters for a simulation run.Copyright (c) 2021-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Author:
- Alexander Verbraeck relative types are the same.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RunControl(String id, T startTime, T warmupPeriod, T runLength)Construct an object with off-line run control information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetDescription()Return the description of this replication.TgetEndTime()Return the absolute end time of the simulation.StringgetId()Return the id of this replication.RunControl<T>getRunControl()Return the RunControl object that contains the treatment information.TgetStartTime()Return the absolute start time of the simulation.TgetWarmupTime()Return the absolute moment when the warmup event will take place.inthashCode()voidsetDescription(String description)Sets the description of this replication.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.tudelft.simulation.dsol.experiment.Treatment
getRunLength, getWarmupPeriod
-
-
-
-
Constructor Detail
-
RunControl
public RunControl(String id, T startTime, T warmupPeriod, T runLength)
Construct an object with off-line run control information.- Parameters:
id- String; the id of the run control that will be used as the id for the replication; should be unique within the experiment.startTime- T; the start time of the simulationwarmupPeriod- T; the warmup period, included in the runlength (!)runLength- T; 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
-
-
Method Detail
-
getRunControl
public RunControl<T> getRunControl()
Return the RunControl object that contains the treatment information.- Specified by:
getRunControlin interfaceTreatment<T extends Number & Comparable<T>>- Returns:
- RunControl; the RunControl object that contains the treatment information
-
getId
public String getId()
Return the id of this replication.
-
setDescription
public void setDescription(String description)
Sets the description of this replication.- Specified by:
setDescriptionin interfaceTreatment<T extends Number & Comparable<T>>- Parameters:
description- String; the description of this replication
-
getDescription
public String getDescription()
Return the description of this replication.- Specified by:
getDescriptionin interfaceTreatment<T extends Number & Comparable<T>>- Returns:
- String; the description of this replication
-
getStartTime
public T getStartTime()
Return the absolute start time of the simulation.- Specified by:
getStartTimein interfaceTreatment<T extends Number & Comparable<T>>- Returns:
- T; the absolute start time of the simulation
-
getEndTime
public T getEndTime()
Return the absolute end time of the simulation.- Specified by:
getEndTimein interfaceTreatment<T extends Number & Comparable<T>>- Returns:
- T; the absolute end time of the simulation
-
getWarmupTime
public T getWarmupTime()
Return the absolute moment when the warmup event will take place.- Specified by:
getWarmupTimein interfaceTreatment<T extends Number & Comparable<T>>- Returns:
- T; the absolute moment when the warmup event will take place
-
-