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 |
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.
- newRandomUniformOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomUniformIntOperation :: MonadDES m => Int -> Int -> Event m (Operation m a a)
- newRandomTriangularOperation :: MonadDES m => Double -> Double -> Double -> Event m (Operation m a a)
- newRandomNormalOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomLogNormalOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomExponentialOperation :: MonadDES m => Double -> Event m (Operation m a a)
- newRandomErlangOperation :: MonadDES m => Double -> Int -> Event m (Operation m a a)
- newRandomPoissonOperation :: MonadDES m => Double -> Event m (Operation m a a)
- newRandomBinomialOperation :: MonadDES m => Double -> Int -> Event m (Operation m a a)
- newRandomGammaOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomBetaOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomWeibullOperation :: MonadDES m => Double -> Double -> Event m (Operation m a a)
- newRandomDiscreteOperation :: MonadDES m => DiscretePDF Double -> Event m (Operation m a a)
- newPreemptibleRandomUniformOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomUniformIntOperation :: MonadDES m => Bool -> Int -> Int -> Event m (Operation m a a)
- newPreemptibleRandomTriangularOperation :: MonadDES m => Bool -> Double -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomNormalOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomLogNormalOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomExponentialOperation :: MonadDES m => Bool -> Double -> Event m (Operation m a a)
- newPreemptibleRandomErlangOperation :: MonadDES m => Bool -> Double -> Int -> Event m (Operation m a a)
- newPreemptibleRandomPoissonOperation :: MonadDES m => Bool -> Double -> Event m (Operation m a a)
- newPreemptibleRandomBinomialOperation :: MonadDES m => Bool -> Double -> Int -> Event m (Operation m a a)
- newPreemptibleRandomGammaOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomBetaOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomWeibullOperation :: MonadDES m => Bool -> Double -> Double -> Event m (Operation m a a)
- newPreemptibleRandomDiscreteOperation :: MonadDES m => Bool -> DiscretePDF Double -> Event m (Operation m a a)
Documentation
newRandomUniformOperation Source #
:: MonadDES m | |
=> Double | the minimum time interval |
-> Double | the maximum time interval |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Int | the minimum time interval |
-> Int | the maximum time interval |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Double | the minimum time interval |
-> Double | the median of the time interval |
-> Double | the maximum time interval |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Double | the mean time interval |
-> Double | the time interval deviation |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> 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 m (Operation m 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 #
:: MonadDES m | |
=> Double | the mean time interval (the reciprocal of the rate) |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Double | the scale (the reciprocal of the rate) |
-> Int | the shape |
-> Event m (Operation m 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 #
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 #
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 #
:: MonadDES m | |
=> Double | the shape |
-> Double | the scale (a reciprocal of the rate) |
-> Event m (Operation m 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 #
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 #
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 #
:: MonadDES m | |
=> DiscretePDF Double | the discrete probability density function |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the minimum time interval |
-> Double | the maximum time interval |
-> Event m (Operation m a a) |
Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.
newPreemptibleRandomUniformIntOperation Source #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Int | the minimum time interval |
-> Int | the maximum time interval |
-> Event m (Operation m a a) |
Create a new operation that holds the process for a random time interval distributed uniformly, when processing every input element.
newPreemptibleRandomTriangularOperation Source #
:: MonadDES m | |
=> 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 m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the mean time interval |
-> Double | the time interval deviation |
-> Event m (Operation m a a) |
Create a new operation that holds the process for a random time interval distributed normally, when processing every input element.
newPreemptibleRandomLogNormalOperation Source #
:: MonadDES m | |
=> 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 m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the mean time interval (the reciprocal of the rate) |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the scale (the reciprocal of the rate) |
-> Int | the shape |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the mean time interval |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the probability |
-> Int | the number of trials |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | the shape |
-> Double | the scale |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | shape (alpha) |
-> Double | shape (beta) |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> Double | shape |
-> Double | scale |
-> Event m (Operation m 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 #
:: MonadDES m | |
=> Bool | whether the operation process can be preempted |
-> DiscretePDF Double | the discrete probability density function |
-> Event m (Operation m 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.