aivika-6.1: A multi-method simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Operation.Random

Description

Tested with: GHC 8.0.1

This module defines some useful predefined operations that hold the current process for the corresponding random time interval, when processing every input element.

Synopsis

Documentation

newRandomUniformOperation Source #

Arguments

:: Double

the minimum time interval

-> Double

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomUniformIntOperation Source #

Arguments

:: Int

the minimum time interval

-> Int

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomTriangularOperation Source #

Arguments

:: Double

the minimum time interval

-> Double

the median of the time interval

-> Double

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the triangular distribution, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomNormalOperation Source #

Arguments

:: Double

the mean time interval

-> Double

the time interval deviation

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed normally, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomLogNormalOperation Source #

Arguments

:: Double

the mean of a normal distribution which this distribution is derived from

-> Double

the deviation of a normal distribution which this distribution is derived from

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the lognormal distribution, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomExponentialOperation Source #

Arguments

:: Double

the mean time interval (the reciprocal of the rate)

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed exponentially with the specified mean (the reciprocal of the rate), when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomErlangOperation Source #

Arguments

:: Double

the scale (the reciprocal of the rate)

-> Int

the shape

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Erlang distribution with the specified scale (the reciprocal of the rate) and shape parameters, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomPoissonOperation Source #

Arguments

:: Double

the mean time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Poisson distribution with the specified mean, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomBinomialOperation Source #

Arguments

:: Double

the probability

-> Int

the number of trials

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the binomial distribution with the specified probability and trials, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomGammaOperation Source #

Arguments

:: Double

the shape

-> Double

the scale (a reciprocal of the rate)

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Gamma distribution with the specified shape and scale, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomBetaOperation Source #

Arguments

:: Double

shape (alpha)

-> Double

shape (beta)

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Beta distribution with the specified shape parameters (alpha and beta), when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomWeibullOperation Source #

Arguments

:: Double

shape

-> Double

scale

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Weibull distribution with the specified shape and scale, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newRandomDiscreteOperation Source #

Arguments

:: DiscretePDF Double

the discrete probability density function

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the specified discrete distribution, when processing every input element.

By default, it is assumed that the operation process cannot be preempted, because the handling of possible task preemption is rather costly.

newPreemptibleRandomUniformOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the minimum time interval

-> Double

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.

newPreemptibleRandomUniformIntOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Int

the minimum time interval

-> Int

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.

newPreemptibleRandomTriangularOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the minimum time interval

-> Double

the median of the time interval

-> Double

the maximum time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the triangular distribution, when processing every input element.

newPreemptibleRandomNormalOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the mean time interval

-> Double

the time interval deviation

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed normally, when processing every input element.

newPreemptibleRandomLogNormalOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the mean of a normal distribution which this distribution is derived from

-> Double

the deviation of a normal distribution which this distribution is derived from

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the lognormal distribution, when processing every input element.

newPreemptibleRandomExponentialOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the mean time interval (the reciprocal of the rate)

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval distributed exponentially with the specified mean (the reciprocal of the rate), when processing every input element.

newPreemptibleRandomErlangOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the scale (the reciprocal of the rate)

-> Int

the shape

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Erlang distribution with the specified scale (the reciprocal of the rate) and shape parameters, when processing every input element.

newPreemptibleRandomPoissonOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the mean time interval

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Poisson distribution with the specified mean, when processing every input element.

newPreemptibleRandomBinomialOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the probability

-> Int

the number of trials

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the binomial distribution with the specified probability and trials, when processing every input element.

newPreemptibleRandomGammaOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

the shape

-> Double

the scale

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Gamma distribution with the specified shape and scale, when processing every input element.

newPreemptibleRandomBetaOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

shape (alpha)

-> Double

shape (beta)

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Beta distribution with the specified shape parameters (alpha and beta), when processing every input element.

newPreemptibleRandomWeibullOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> Double

shape

-> Double

scale

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the Weibull distribution with the specified shape and scale, when processing every input element.

newPreemptibleRandomDiscreteOperation Source #

Arguments

:: Bool

whether the operation process can be preempted

-> DiscretePDF Double

the discrete probability density function

-> Event (Operation a a) 

Create a new operation that holds the process for a random time interval having the specified discrete distribution, when processing every input element.