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-2024 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:
  • Constructor Details

    • 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 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, 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 Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object