aivika-4.0.1: A multi-paradigm simulation library

CopyrightCopyright (c) 2009-2015, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.Server.Random

Description

Tested with: GHC 7.8.3

This module defines some useful predefined servers that hold the current process for the corresponding random time interval, when processing every input element.

Synopsis

Documentation

newRandomUniformServer Source

Arguments

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

Arguments

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

newRandomNormalServer Source

Arguments

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

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

Arguments

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

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

Arguments

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

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

Arguments

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

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

Arguments

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

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

Arguments

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

Arguments

:: Bool

whether the server process can be preempted

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

newPreemptibleRandomNormalServer Source

Arguments

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

newPreemptibleRandomExponentialServer Source

Arguments

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

Arguments

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

Arguments

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

Arguments

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