Class DistExponential

All Implemented Interfaces:
Serializable

public class DistExponential extends DistContinuous
The Exponential distribution. For more information on this distribution see https://mathworld.wolfram.com/ExponentialDistribution.html
The exponential distribution describes the interarrival times of entities to a system that occur randomly at a constant rate. The exponential distribution here is characterized by the mean interarrival time, but can also be characterized by this rate parameter λ; mean = 1 / λ.

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:
Peter Jacobs , Alexander Verbraeck
See Also:
  • Constructor Details

    • DistExponential

      public DistExponential(StreamInterface stream, double mean)
      constructs a new exponential function. The exponential distribution describes the interarrival times of entities to a system that occur randomly at a constant rate. The exponential distribution can also be characterized by this rate parameter λ; mean = 1 / λ.
      Parameters:
      stream - StreamInterface; the random number stream
      mean - double; the mean (mean > 0) value of the exponential distribution. The exponential distribution can also be characterized by the rate parameter λ; mean = 1 / λ
      Throws:
      IllegalArgumentException - in case mean <= 0
  • Method Details

    • draw

      public double draw()
      draws the next stream value according to the probability of this this distribution.
      Specified by:
      draw in class DistContinuous
      Returns:
      the next double value drawn.
    • getProbabilityDensity

      public double getProbabilityDensity(double x)
      returns the probability density value of a value x.
      Specified by:
      getProbabilityDensity in class DistContinuous
      Parameters:
      x - double; the value for which the density function needs to be calculated
      Returns:
      double; the probability density for value x
    • getMean

      public double getMean()
      Returns:
      mean
    • toString

      public String toString()
      Overrides:
      toString in class Object