Copyright | Copyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 8.0.1
This module defines some useful predefined servers that hold the current process for the corresponding random time interval, when processing every input element.
Synopsis
- newRandomUniformServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomUniformIntServer :: MonadDES m => Int -> Int -> Simulation m (Server m () a a)
- newRandomTriangularServer :: MonadDES m => Double -> Double -> Double -> Simulation m (Server m () a a)
- newRandomNormalServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomLogNormalServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomExponentialServer :: MonadDES m => Double -> Simulation m (Server m () a a)
- newRandomErlangServer :: MonadDES m => Double -> Int -> Simulation m (Server m () a a)
- newRandomPoissonServer :: MonadDES m => Double -> Simulation m (Server m () a a)
- newRandomBinomialServer :: MonadDES m => Double -> Int -> Simulation m (Server m () a a)
- newRandomGammaServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomBetaServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomWeibullServer :: MonadDES m => Double -> Double -> Simulation m (Server m () a a)
- newRandomDiscreteServer :: MonadDES m => DiscretePDF Double -> Simulation m (Server m () a a)
- newPreemptibleRandomUniformServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomUniformIntServer :: MonadDES m => Bool -> Int -> Int -> Simulation m (Server m () a a)
- newPreemptibleRandomTriangularServer :: MonadDES m => Bool -> Double -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomNormalServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomLogNormalServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomExponentialServer :: MonadDES m => Bool -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomErlangServer :: MonadDES m => Bool -> Double -> Int -> Simulation m (Server m () a a)
- newPreemptibleRandomPoissonServer :: MonadDES m => Bool -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomBinomialServer :: MonadDES m => Bool -> Double -> Int -> Simulation m (Server m () a a)
- newPreemptibleRandomGammaServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomBetaServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomWeibullServer :: MonadDES m => Bool -> Double -> Double -> Simulation m (Server m () a a)
- newPreemptibleRandomDiscreteServer :: MonadDES m => Bool -> DiscretePDF Double -> Simulation m (Server m () a a)
Documentation
newRandomUniformServer Source #
:: MonadDES m | |
=> Double | the minimum time interval |
-> Double | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed uniformly, when processing every input element.
By default, it is assumed that the server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomUniformIntServer Source #
:: MonadDES m | |
=> Int | the minimum time interval |
-> Int | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed uniformly, when processing every input element.
By default, it is assumed that the server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomTriangularServer Source #
:: MonadDES m | |
=> Double | the minimum time interval |
-> Double | the median of the time interval |
-> Double | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomNormalServer Source #
:: MonadDES m | |
=> Double | the mean time interval |
-> Double | the time interval deviation |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed normally, when processing every input element.
By default, it is assumed that the server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomLogNormalServer 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 |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomExponentialServer Source #
:: MonadDES m | |
=> Double | the mean time interval (the reciprocal of the rate) |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomErlangServer Source #
:: MonadDES m | |
=> Double | the scale (the reciprocal of the rate) |
-> Int | the shape |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomPoissonServer Source #
:: MonadDES m | |
=> Double | the mean time interval |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomBinomialServer Source #
:: MonadDES m | |
=> Double | the probability |
-> Int | the number of trials |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
:: MonadDES m | |
=> Double | the shape |
-> Double | the scale (a reciprocal of the rate) |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
:: MonadDES m | |
=> Double | shape (alpha) |
-> Double | shape (beta) |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomWeibullServer Source #
:: MonadDES m | |
=> Double | shape |
-> Double | scale |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newRandomDiscreteServer Source #
:: MonadDES m | |
=> DiscretePDF Double | the discrete probability density function |
-> Simulation m (Server m () a a) |
Create a new server 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 server process cannot be preempted, because the handling of possible task preemption is rather costly operation.
newPreemptibleRandomUniformServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the minimum time interval |
-> Double | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed uniformly, when processing every input element.
newPreemptibleRandomUniformIntServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Int | the minimum time interval |
-> Int | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed uniformly, when processing every input element.
newPreemptibleRandomTriangularServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the minimum time interval |
-> Double | the median of the time interval |
-> Double | the maximum time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the triangular distribution, when processing every input element.
newPreemptibleRandomNormalServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the mean time interval |
-> Double | the time interval deviation |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval distributed normally, when processing every input element.
newPreemptibleRandomLogNormalServer Source #
:: MonadDES m | |
=> Bool | whether the server 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 |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the lognormal distribution, when processing every input element.
newPreemptibleRandomExponentialServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the mean time interval (the reciprocal of the rate) |
-> Simulation m (Server m () a a) |
Create a new server 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.
newPreemptibleRandomErlangServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the scale (the reciprocal of the rate) |
-> Int | the shape |
-> Simulation m (Server m () a a) |
Create a new server 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.
newPreemptibleRandomPoissonServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the mean time interval |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the Poisson distribution with the specified mean, when processing every input element.
newPreemptibleRandomBinomialServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the probability |
-> Int | the number of trials |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the binomial distribution with the specified probability and trials, when processing every input element.
newPreemptibleRandomGammaServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | the shape |
-> Double | the scale (a reciprocal of the rate) |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the Gamma distribution with the specified shape and scale, when processing every input element.
newPreemptibleRandomBetaServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | shape (alpha) |
-> Double | shape (beta) |
-> Simulation m (Server m () a a) |
Create a new server 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.
newPreemptibleRandomWeibullServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> Double | shape |
-> Double | scale |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the Weibull distribution with the specified shape and scale, when processing every input element.
newPreemptibleRandomDiscreteServer Source #
:: MonadDES m | |
=> Bool | whether the server process can be preempted |
-> DiscretePDF Double | the discrete probability density function |
-> Simulation m (Server m () a a) |
Create a new server that holds the process for a random time interval having the specified discrete distribution, when processing every input element.