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 random signals of events, which are useful for describing the input of the model.

- newRandomSignal :: Parameter (Double, a) -> Composite (Signal (Arrival a))
- newRandomUniformSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomUniformIntSignal :: Int -> Int -> Composite (Signal (Arrival Int))
- newRandomTriangularSignal :: Double -> Double -> Double -> Composite (Signal (Arrival Double))
- newRandomNormalSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomLogNormalSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomExponentialSignal :: Double -> Composite (Signal (Arrival Double))
- newRandomErlangSignal :: Double -> Int -> Composite (Signal (Arrival Double))
- newRandomPoissonSignal :: Double -> Composite (Signal (Arrival Int))
- newRandomBinomialSignal :: Double -> Int -> Composite (Signal (Arrival Int))
- newRandomGammaSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomBetaSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomWeibullSignal :: Double -> Double -> Composite (Signal (Arrival Double))
- newRandomDiscreteSignal :: DiscretePDF Double -> Composite (Signal (Arrival Double))

# Signal of Random Events

:: Parameter (Double, a) | compute a pair of the delay and event of type |

-> Composite (Signal (Arrival a)) | the computation that returns a signal emitting the delayed events |

Return a signal of random events that arrive with the specified delay.

newRandomUniformSignal Source #

:: Double | the minimum delay |

-> Double | the maximum delay |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Create a new signal with random delays distributed uniformly.

newRandomUniformIntSignal Source #

:: Int | the minimum delay |

-> Int | the maximum delay |

-> Composite (Signal (Arrival Int)) | the computation of signal emitting random events with the delays generated |

Create a new signal with integer random delays distributed uniformly.

newRandomTriangularSignal Source #

:: Double | the minimum delay |

-> Double | the median of the delay |

-> Double | the maximum delay |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Create a new signal with random delays having the triangular distribution.

newRandomNormalSignal Source #

:: Double | the mean delay |

-> Double | the delay deviation |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Create a new signal with random delays distributed normally.

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

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Create a new signal with random delays having the lognormal distribution.

newRandomExponentialSignal Source #

:: Double | the mean delay (the reciprocal of the rate) |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays distibuted exponentially with the specified mean (the reciprocal of the rate).

newRandomErlangSignal Source #

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

-> Int | the shape |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the Erlang distribution with the specified scale (the reciprocal of the rate) and shape parameters.

newRandomPoissonSignal Source #

:: Double | the mean delay |

-> Composite (Signal (Arrival Int)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the Poisson distribution with the specified mean.

newRandomBinomialSignal Source #

:: Double | the probability |

-> Int | the number of trials |

-> Composite (Signal (Arrival Int)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the binomial distribution with the specified probability and trials.

:: Double | the shape |

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

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the Gamma distribution by the specified shape and scale.

:: Double | the shape (alpha) |

-> Double | the shape (beta) |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the Beta distribution by the specified shape parameters (alpha and beta).

newRandomWeibullSignal Source #

:: Double | shape |

-> Double | scale |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the Weibull distribution by the specified shape and scale.

newRandomDiscreteSignal Source #

:: DiscretePDF Double | the discrete probability density function |

-> Composite (Signal (Arrival Double)) | the computation of signal emitting random events with the delays generated |

Return a new signal with random delays having the specified discrete distribution.