module Simulation.Aivika.Trans.Net.Random
(randomUniformNet,
randomUniformIntNet,
randomTriangularNet,
randomNormalNet,
randomLogNormalNet,
randomExponentialNet,
randomErlangNet,
randomPoissonNet,
randomBinomialNet,
randomGammaNet,
randomBetaNet,
randomWeibullNet,
randomDiscreteNet) where
import Simulation.Aivika.Trans.DES
import Simulation.Aivika.Trans.Generator
import Simulation.Aivika.Trans.Process
import Simulation.Aivika.Trans.Process.Random
import Simulation.Aivika.Trans.Net
randomUniformNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomUniformNet #-}
randomUniformNet :: Double -> Double -> Net m a a
randomUniformNet Double
min Double
max =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomUniformProcess_ Double
min Double
max
randomUniformIntNet :: MonadDES m
=> Int
-> Int
-> Net m a a
{-# INLINABLE randomUniformIntNet #-}
randomUniformIntNet :: Int -> Int -> Net m a a
randomUniformIntNet Int
min Int
max =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Int -> Int -> Process m ()
forall (m :: * -> *). MonadDES m => Int -> Int -> Process m ()
randomUniformIntProcess_ Int
min Int
max
randomTriangularNet :: MonadDES m
=> Double
-> Double
-> Double
-> Net m a a
{-# INLINABLE randomTriangularNet #-}
randomTriangularNet :: Double -> Double -> Double -> Net m a a
randomTriangularNet Double
min Double
median Double
max =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Double -> Process m ()
randomTriangularProcess_ Double
min Double
median Double
max
randomNormalNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomNormalNet #-}
randomNormalNet :: Double -> Double -> Net m a a
randomNormalNet Double
mu Double
nu =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomNormalProcess_ Double
mu Double
nu
randomLogNormalNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomLogNormalNet #-}
randomLogNormalNet :: Double -> Double -> Net m a a
randomLogNormalNet Double
mu Double
nu =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomLogNormalProcess_ Double
mu Double
nu
randomExponentialNet :: MonadDES m
=> Double
-> Net m a a
{-# INLINABLE randomExponentialNet #-}
randomExponentialNet :: Double -> Net m a a
randomExponentialNet Double
mu =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Process m ()
forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomExponentialProcess_ Double
mu
randomErlangNet :: MonadDES m
=> Double
-> Int
-> Net m a a
{-# INLINABLE randomErlangNet #-}
randomErlangNet :: Double -> Int -> Net m a a
randomErlangNet Double
beta Int
m =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Int -> Process m ()
forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomErlangProcess_ Double
beta Int
m
randomPoissonNet :: MonadDES m
=> Double
-> Net m a a
{-# INLINABLE randomPoissonNet #-}
randomPoissonNet :: Double -> Net m a a
randomPoissonNet Double
mu =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Process m ()
forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomPoissonProcess_ Double
mu
randomBinomialNet :: MonadDES m
=> Double
-> Int
-> Net m a a
{-# INLINABLE randomBinomialNet #-}
randomBinomialNet :: Double -> Int -> Net m a a
randomBinomialNet Double
prob Int
trials =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Int -> Process m ()
forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomBinomialProcess_ Double
prob Int
trials
randomGammaNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomGammaNet #-}
randomGammaNet :: Double -> Double -> Net m a a
randomGammaNet Double
kappa Double
theta =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomGammaProcess_ Double
kappa Double
theta
randomBetaNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomBetaNet #-}
randomBetaNet :: Double -> Double -> Net m a a
randomBetaNet Double
alpha Double
beta =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomBetaProcess_ Double
alpha Double
beta
randomWeibullNet :: MonadDES m
=> Double
-> Double
-> Net m a a
{-# INLINABLE randomWeibullNet #-}
randomWeibullNet :: Double -> Double -> Net m a a
randomWeibullNet Double
alpha Double
beta =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomWeibullProcess_ Double
alpha Double
beta
randomDiscreteNet :: MonadDES m
=> DiscretePDF Double
-> Net m a a
{-# INLINABLE randomDiscreteNet #-}
randomDiscreteNet :: DiscretePDF Double -> Net m a a
randomDiscreteNet DiscretePDF Double
dpdf =
Process m () -> Net m a a
forall (m :: * -> *) a. MonadDES m => Process m () -> Net m a a
withinNet (Process m () -> Net m a a) -> Process m () -> Net m a a
forall a b. (a -> b) -> a -> b
$
DiscretePDF Double -> Process m ()
forall (m :: * -> *).
MonadDES m =>
DiscretePDF Double -> Process m ()
randomDiscreteProcess_ DiscretePDF Double
dpdf