Class RunControl<T extends Number & Comparable<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 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 simulation
        warmupPeriod - 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 null
        IllegalArgumentException - 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:
        getRunControl in interface Treatment<T extends Number & Comparable<T>>
        Returns:
        RunControl; the RunControl object that contains the treatment information
      • setDescription

        public void setDescription​(String description)
        Sets the description of this replication.
        Specified by:
        setDescription in interface Treatment<T extends Number & Comparable<T>>
        Parameters:
        description - String; the description of this replication
      • getStartTime

        public T getStartTime()
        Return the absolute start time of the simulation.
        Specified by:
        getStartTime in interface Treatment<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:
        getEndTime in interface Treatment<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:
        getWarmupTime in interface Treatment<T extends Number & Comparable<T>>
        Returns:
        T; the absolute moment when the warmup event will take place
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object