DistExponential

class pydsol.core.distributions.DistExponential(stream: StreamInterface, mean: float)[source]

Bases: DistContinuous

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 lambda where mean = 1 / lambda. For more information on this distribution see https://mathworld.wolfram.com/ExponentialDistribution.html.

__init__(stream: StreamInterface, mean: float)[source]

Construct a new exponential distribution. 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 lambda where mean = 1 / lambda.

Parameters:
  • stream (StreamInterface) – the random stream to use for this distribution

  • mean (float) – the mean of the interarrival time. Equal to 1/rate or 1/lambda.

Raises:
  • TypeError – when stream is not implementing StreamInterface:

  • TypeError – when mean is not a float or int:

  • ValueError – when mean <= 0:

draw() float[source]

Draw a value from the Exponential distribution.

probability_density(x: float) float[source]

Returns the probability density value for value x.

property mean: float

Return the parameter value mean

property stream: StreamInterface

Return the current random stream for this distribution.