| Copyright | Copyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com> |
|---|---|
| License | BSD3 |
| Maintainer | David Sorokin <david.sorokin@gmail.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Simulation.Aivika.Trans.Processor.Random
Description
Tested with: GHC 8.0.1
This module defines some useful random processors that hold the current process for the corresponding time interval, when processing every input element.
- randomUniformProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomUniformIntProcessor :: MonadDES m => Int -> Int -> Processor m a a
- randomTriangularProcessor :: MonadDES m => Double -> Double -> Double -> Processor m a a
- randomNormalProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomLogNormalProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomExponentialProcessor :: MonadDES m => Double -> Processor m a a
- randomErlangProcessor :: MonadDES m => Double -> Int -> Processor m a a
- randomPoissonProcessor :: MonadDES m => Double -> Processor m a a
- randomBinomialProcessor :: MonadDES m => Double -> Int -> Processor m a a
- randomGammaProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomBetaProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomWeibullProcessor :: MonadDES m => Double -> Double -> Processor m a a
- randomDiscreteProcessor :: MonadDES m => DiscretePDF Double -> Processor m a a
Documentation
randomUniformProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the minimum time interval |
| -> Double | the maximum time interval |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval distributed uniformly.
randomUniformIntProcessor Source #
Arguments
| :: MonadDES m | |
| => Int | the minimum time interval |
| -> Int | the maximum time interval |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval distributed uniformly.
randomTriangularProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the minimum time interval |
| -> Double | the median of the time interval |
| -> Double | the maximum time interval |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval having the triangular distribution.
randomNormalProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the mean time interval |
| -> Double | the time interval deviation |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval distributed normally.
randomLogNormalProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the mean for a normal distribution which this distribution is derived from |
| -> Double | the deviation for a normal distribution which this distribution is derived from |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval having the lognormal distribution.
randomExponentialProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the mean time interval (the reciprocal of the rate) |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval distributed exponentially with the specified mean (the reciprocal of the rate).
randomErlangProcessor Source #
Arguments
| :: MonadDES m | |
| => Double | the scale (the reciprocal of the rate) |
| -> Int | the shape |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval having the Erlang distribution with the specified scale (the reciprocal of the rate) and shape parameters.
randomPoissonProcessor Source #
When processing every input element, hold the process for a random time interval having the Poisson distribution with the specified mean.
randomBinomialProcessor Source #
When processing every input element, hold the process for a random time interval having the binomial distribution with the specified probability and trials.
Arguments
| :: MonadDES m | |
| => Double | the shape |
| -> Double | the scale (a reciprocal of the rate) |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval having the Gamma distribution with the specified shape and scale.
When processing every input element, hold the process for a random time interval having the Beta distribution with the specified shape parameters (alpha and beta).
randomWeibullProcessor Source #
When processing every input element, hold the process for a random time interval having the Weibull distribution with the specified shape and scale.
randomDiscreteProcessor Source #
Arguments
| :: MonadDES m | |
| => DiscretePDF Double | the discrete probability density function |
| -> Processor m a a |
When processing every input element, hold the process for a random time interval having the specified discrete distribution.