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

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

# Signal of Random Events

:: MonadDES m | |

=> Parameter m (Double, a) | compute a pair of the delay and event of type |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the minimum delay |

-> Double | the maximum delay |

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

Create a new signal with random delays distributed uniformly.

newRandomUniformIntSignal Source #

:: MonadDES m | |

=> Int | the minimum delay |

-> Int | the maximum delay |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the minimum delay |

-> Double | the median of the delay |

-> Double | the maximum delay |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the mean delay |

-> Double | the delay deviation |

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

Create a new signal with random delays distributed normally.

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

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the mean delay (the reciprocal of the rate) |

-> Composite m (Signal m (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 #

:: MonadDES m | |

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

-> Int | the shape |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the mean delay |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | the probability |

-> Int | the number of trials |

-> Composite m (Signal m (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.

:: MonadDES m | |

=> Double | the shape |

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

-> Composite m (Signal m (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.

:: MonadDES m | |

=> Double | the shape (alpha) |

-> Double | the shape (beta) |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> Double | shape |

-> Double | scale |

-> Composite m (Signal m (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 #

:: MonadDES m | |

=> DiscretePDF Double | the discrete probability density function |

-> Composite m (Signal m (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.