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 :: Double -> Double -> Event (Operation a a)
- newRandomUniformIntOperation :: Int -> Int -> Event (Operation a a)
- newRandomTriangularOperation :: Double -> Double -> Double -> Event (Operation a a)
- newRandomNormalOperation :: Double -> Double -> Event (Operation a a)
- newRandomLogNormalOperation :: Double -> Double -> Event (Operation a a)
- newRandomExponentialOperation :: Double -> Event (Operation a a)
- newRandomErlangOperation :: Double -> Int -> Event (Operation a a)
- newRandomPoissonOperation :: Double -> Event (Operation a a)
- newRandomBinomialOperation :: Double -> Int -> Event (Operation a a)
- newRandomGammaOperation :: Double -> Double -> Event (Operation a a)
- newRandomBetaOperation :: Double -> Double -> Event (Operation a a)
- newRandomWeibullOperation :: Double -> Double -> Event (Operation a a)
- newRandomDiscreteOperation :: DiscretePDF Double -> Event (Operation a a)
- newPreemptibleRandomUniformOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomUniformIntOperation :: Bool -> Int -> Int -> Event (Operation a a)
- newPreemptibleRandomTriangularOperation :: Bool -> Double -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomNormalOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomLogNormalOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomExponentialOperation :: Bool -> Double -> Event (Operation a a)
- newPreemptibleRandomErlangOperation :: Bool -> Double -> Int -> Event (Operation a a)
- newPreemptibleRandomPoissonOperation :: Bool -> Double -> Event (Operation a a)
- newPreemptibleRandomBinomialOperation :: Bool -> Double -> Int -> Event (Operation a a)
- newPreemptibleRandomGammaOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomBetaOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomWeibullOperation :: Bool -> Double -> Double -> Event (Operation a a)
- newPreemptibleRandomDiscreteOperation :: Bool -> DiscretePDF Double -> Event (Operation a a)

# Documentation

newRandomUniformOperation Source #

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 #

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 #

:: 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 #

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

newRandomLogNormalOperation Source #

:: 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.

newRandomExponentialOperation Source #

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.

newRandomErlangOperation Source #

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.

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.

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.

newRandomGammaOperation Source #

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.

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.

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.

newRandomDiscreteOperation Source #

:: 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.

newPreemptibleRandomUniformOperation Source #

:: 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 #

:: Bool | whether the operation process can be preempted |

-> Int | the minimum time interval |

-> Int | the maximum time interval |

-> Event (Operation a a) |

newPreemptibleRandomTriangularOperation Source #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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 #

:: 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.