Copyright | Copyright (c) 2009-2016, 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 servers that hold the current process for the corresponding random time interval, when processing every input element.

- newRandomUniformServer :: Double -> Double -> Simulation (Server () a a)
- newRandomUniformIntServer :: Int -> Int -> Simulation (Server () a a)
- newRandomTriangularServer :: Double -> Double -> Double -> Simulation (Server () a a)
- newRandomNormalServer :: Double -> Double -> Simulation (Server () a a)
- newRandomLogNormalServer :: Double -> Double -> Simulation (Server () a a)
- newRandomExponentialServer :: Double -> Simulation (Server () a a)
- newRandomErlangServer :: Double -> Int -> Simulation (Server () a a)
- newRandomPoissonServer :: Double -> Simulation (Server () a a)
- newRandomBinomialServer :: Double -> Int -> Simulation (Server () a a)
- newRandomGammaServer :: Double -> Double -> Simulation (Server () a a)
- newRandomBetaServer :: Double -> Double -> Simulation (Server () a a)
- newRandomWeibullServer :: Double -> Double -> Simulation (Server () a a)
- newRandomDiscreteServer :: DiscretePDF Double -> Simulation (Server () a a)
- newPreemptibleRandomUniformServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomUniformIntServer :: Bool -> Int -> Int -> Simulation (Server () a a)
- newPreemptibleRandomTriangularServer :: Bool -> Double -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomNormalServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomLogNormalServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomExponentialServer :: Bool -> Double -> Simulation (Server () a a)
- newPreemptibleRandomErlangServer :: Bool -> Double -> Int -> Simulation (Server () a a)
- newPreemptibleRandomPoissonServer :: Bool -> Double -> Simulation (Server () a a)
- newPreemptibleRandomBinomialServer :: Bool -> Double -> Int -> Simulation (Server () a a)
- newPreemptibleRandomGammaServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomBetaServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomWeibullServer :: Bool -> Double -> Double -> Simulation (Server () a a)
- newPreemptibleRandomDiscreteServer :: Bool -> DiscretePDF Double -> Simulation (Server () a a)

# Documentation

newRandomUniformServer Source #

:: Double | the minimum time interval |

-> Double | the maximum time interval |

-> Simulation (Server () 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 #

:: Int | the minimum time interval |

-> Int | the maximum time interval |

-> Simulation (Server () 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 #

:: Double | the minimum time interval |

-> Double | the median of the time interval |

-> Double | the maximum time interval |

-> Simulation (Server () 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 #

:: Double | the mean time interval |

-> Double | the time interval deviation |

-> Simulation (Server () a a) |

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

newRandomLogNormalServer 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 |

-> Simulation (Server () a a) |

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

newRandomExponentialServer Source #

:: Double | the mean time interval (the reciprocal of the rate) |

-> Simulation (Server () 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.

newRandomErlangServer Source #

:: Double | the scale (the reciprocal of the rate) |

-> Int | the shape |

-> Simulation (Server () 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.

newRandomPoissonServer Source #

:: Double | the mean time interval |

-> Simulation (Server () 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.

newRandomBinomialServer Source #

:: Double | the probability |

-> Int | the number of trials |

-> Simulation (Server () 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.

:: Double | the shape |

-> Double | the scale (a reciprocal of the rate) |

-> Simulation (Server () 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.

:: Double | shape (alpha) |

-> Double | shape (beta) |

-> Simulation (Server () 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.

newRandomWeibullServer Source #

:: Double | shape |

-> Double | scale |

-> Simulation (Server () 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.

newRandomDiscreteServer Source #

:: DiscretePDF Double | the discrete probability density function |

-> Simulation (Server () 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.

newPreemptibleRandomUniformServer Source #

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

-> Double | the minimum time interval |

-> Double | the maximum time interval |

-> Simulation (Server () a a) |

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

newPreemptibleRandomUniformIntServer Source #

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

-> Int | the minimum time interval |

-> Int | the maximum time interval |

-> Simulation (Server () a a) |

newPreemptibleRandomTriangularServer Source #

:: 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 (Server () 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 #

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

-> Double | the mean time interval |

-> Double | the time interval deviation |

-> Simulation (Server () a a) |

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

newPreemptibleRandomLogNormalServer Source #

:: 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 (Server () 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 #

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

-> Double | the mean time interval (the reciprocal of the rate) |

-> Simulation (Server () 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 #

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

-> Double | the scale (the reciprocal of the rate) |

-> Int | the shape |

-> Simulation (Server () 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 #

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

-> Double | the mean time interval |

-> Simulation (Server () 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 #

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

-> Double | the probability |

-> Int | the number of trials |

-> Simulation (Server () 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 #

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

-> Double | the shape |

-> Double | the scale (a reciprocal of the rate) |

-> Simulation (Server () 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 #

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

-> Double | shape (alpha) |

-> Double | shape (beta) |

-> Simulation (Server () 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 #

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

-> Double | shape |

-> Double | scale |

-> Simulation (Server () 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 #

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

-> DiscretePDF Double | the discrete probability density function |

-> Simulation (Server () 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.