aivika-2.1: A multi-paradigm simulation library

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

Simulation.Aivika.Dynamics.Random

Description

Tested with: GHC 7.8.3

This module defines the random functions that always return the same values in the integration time points within a single simulation run. The values for another simulation run will be regenerated anew.

For example, the computations returned by these functions can be used in the equations of System Dynamics.

Also it is worth noting that the values are generated in a strong order starting from starttime with step dt. This is how the memo0Dynamics function actually works.

Synopsis

Documentation

memoRandomUniformDynamics Source

Arguments

:: Dynamics Double

minimum

-> Dynamics Double

maximum

-> Simulation (Dynamics Double) 

Computation that generates random numbers distributed uniformly and memoizes them in the integration time points.

memoRandomUniformIntDynamics Source

Arguments

:: Dynamics Int

minimum

-> Dynamics Int

maximum

-> Simulation (Dynamics Int) 

Computation that generates random integer numbers distributed uniformly and memoizes them in the integration time points.

memoRandomNormalDynamics Source

Arguments

:: Dynamics Double

mean

-> Dynamics Double

deviation

-> Simulation (Dynamics Double) 

Computation that generates random numbers distributed normally and memoizes them in the integration time points.

memoRandomExponentialDynamics Source

Arguments

:: Dynamics Double

the mean (the reciprocal of the rate)

-> Simulation (Dynamics Double) 

Computation that generates exponential random numbers with the specified mean (the reciprocal of the rate) and memoizes them in the integration time points.

memoRandomErlangDynamics Source

Arguments

:: Dynamics Double

the scale (the reciprocal of the rate)

-> Dynamics Int

the shape

-> Simulation (Dynamics Double) 

Computation that generates the Erlang random numbers with the specified scale (the reciprocal of the rate) and integer shape but memoizes them in the integration time points.

memoRandomPoissonDynamics Source

Arguments

:: Dynamics Double

the mean

-> Simulation (Dynamics Int) 

Computation that generats the Poisson random numbers with the specified mean and memoizes them in the integration time points.

memoRandomBinomialDynamics Source

Arguments

:: Dynamics Double

the probability

-> Dynamics Int

the number of trials

-> Simulation (Dynamics Int) 

Computation that generates binomial random numbers with the specified probability and trials but memoizes them in the integration time points.