module Simulation.Aivika.Trans.Activity.Random
(newRandomUniformActivity,
newRandomUniformIntActivity,
newRandomTriangularActivity,
newRandomNormalActivity,
newRandomLogNormalActivity,
newRandomExponentialActivity,
newRandomErlangActivity,
newRandomPoissonActivity,
newRandomBinomialActivity,
newRandomGammaActivity,
newRandomBetaActivity,
newRandomWeibullActivity,
newRandomDiscreteActivity,
newPreemptibleRandomUniformActivity,
newPreemptibleRandomUniformIntActivity,
newPreemptibleRandomTriangularActivity,
newPreemptibleRandomNormalActivity,
newPreemptibleRandomLogNormalActivity,
newPreemptibleRandomExponentialActivity,
newPreemptibleRandomErlangActivity,
newPreemptibleRandomPoissonActivity,
newPreemptibleRandomBinomialActivity,
newPreemptibleRandomGammaActivity,
newPreemptibleRandomBetaActivity,
newPreemptibleRandomWeibullActivity,
newPreemptibleRandomDiscreteActivity) where
import Simulation.Aivika.Trans.DES
import Simulation.Aivika.Trans.Generator
import Simulation.Aivika.Trans.Simulation
import Simulation.Aivika.Trans.Process
import Simulation.Aivika.Trans.Process.Random
import Simulation.Aivika.Trans.Activity
newRandomUniformActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomUniformActivity #-}
newRandomUniformActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomUniformActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomUniformActivity Bool
False
newRandomUniformIntActivity :: MonadDES m
=> Int
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomUniformIntActivity #-}
newRandomUniformIntActivity :: forall (m :: * -> *) a.
MonadDES m =>
Int -> Int -> Simulation m (Activity m () a a)
newRandomUniformIntActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Int -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomUniformIntActivity Bool
False
newRandomTriangularActivity :: MonadDES m
=> Double
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomTriangularActivity #-}
newRandomTriangularActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Double -> Simulation m (Activity m () a a)
newRandomTriangularActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool
-> Double -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomTriangularActivity Bool
False
newRandomNormalActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomNormalActivity #-}
newRandomNormalActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomNormalActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomNormalActivity Bool
False
newRandomLogNormalActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomLogNormalActivity #-}
newRandomLogNormalActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomLogNormalActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomLogNormalActivity Bool
False
newRandomExponentialActivity :: MonadDES m
=> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomExponentialActivity #-}
newRandomExponentialActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Simulation m (Activity m () a a)
newRandomExponentialActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomExponentialActivity Bool
False
newRandomErlangActivity :: MonadDES m
=> Double
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomErlangActivity #-}
newRandomErlangActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Int -> Simulation m (Activity m () a a)
newRandomErlangActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomErlangActivity Bool
False
newRandomPoissonActivity :: MonadDES m
=> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomPoissonActivity #-}
newRandomPoissonActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Simulation m (Activity m () a a)
newRandomPoissonActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomPoissonActivity Bool
False
newRandomBinomialActivity :: MonadDES m
=> Double
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomBinomialActivity #-}
newRandomBinomialActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Int -> Simulation m (Activity m () a a)
newRandomBinomialActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomBinomialActivity Bool
False
newRandomGammaActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomGammaActivity #-}
newRandomGammaActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomGammaActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomGammaActivity Bool
False
newRandomBetaActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomBetaActivity #-}
newRandomBetaActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomBetaActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomBetaActivity Bool
False
newRandomWeibullActivity :: MonadDES m
=> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomWeibullActivity #-}
newRandomWeibullActivity :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Simulation m (Activity m () a a)
newRandomWeibullActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomWeibullActivity Bool
False
newRandomDiscreteActivity :: MonadDES m
=> DiscretePDF Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newRandomDiscreteActivity #-}
newRandomDiscreteActivity :: forall (m :: * -> *) a.
MonadDES m =>
DiscretePDF Double -> Simulation m (Activity m () a a)
newRandomDiscreteActivity =
forall (m :: * -> *) a.
MonadDES m =>
Bool -> DiscretePDF Double -> Simulation m (Activity m () a a)
newPreemptibleRandomDiscreteActivity Bool
False
newPreemptibleRandomUniformActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomUniformActivity #-}
newPreemptibleRandomUniformActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomUniformActivity Bool
preemptible Double
min Double
max =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomUniformProcess_ Double
min Double
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomUniformIntActivity :: MonadDES m
=> Bool
-> Int
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomUniformIntActivity #-}
newPreemptibleRandomUniformIntActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Int -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomUniformIntActivity Bool
preemptible Int
min Int
max =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *). MonadDES m => Int -> Int -> Process m ()
randomUniformIntProcess_ Int
min Int
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomTriangularActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomTriangularActivity #-}
newPreemptibleRandomTriangularActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool
-> Double -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomTriangularActivity Bool
preemptible Double
min Double
median Double
max =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Double -> Process m ()
randomTriangularProcess_ Double
min Double
median Double
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomNormalActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomNormalActivity #-}
newPreemptibleRandomNormalActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomNormalActivity Bool
preemptible Double
mu Double
nu =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomNormalProcess_ Double
mu Double
nu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomLogNormalActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomLogNormalActivity #-}
newPreemptibleRandomLogNormalActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomLogNormalActivity Bool
preemptible Double
mu Double
nu =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomLogNormalProcess_ Double
mu Double
nu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomExponentialActivity :: MonadDES m
=> Bool
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomExponentialActivity #-}
newPreemptibleRandomExponentialActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomExponentialActivity Bool
preemptible Double
mu =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomExponentialProcess_ Double
mu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomErlangActivity :: MonadDES m
=> Bool
-> Double
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomErlangActivity #-}
newPreemptibleRandomErlangActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomErlangActivity Bool
preemptible Double
beta Int
m =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomErlangProcess_ Double
beta Int
m
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomPoissonActivity :: MonadDES m
=> Bool
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomPoissonActivity #-}
newPreemptibleRandomPoissonActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomPoissonActivity Bool
preemptible Double
mu =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomPoissonProcess_ Double
mu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomBinomialActivity :: MonadDES m
=> Bool
-> Double
-> Int
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomBinomialActivity #-}
newPreemptibleRandomBinomialActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Int -> Simulation m (Activity m () a a)
newPreemptibleRandomBinomialActivity Bool
preemptible Double
prob Int
trials =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomBinomialProcess_ Double
prob Int
trials
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomGammaActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomGammaActivity #-}
newPreemptibleRandomGammaActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomGammaActivity Bool
preemptible Double
kappa Double
theta =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomGammaProcess_ Double
kappa Double
theta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomBetaActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomBetaActivity #-}
newPreemptibleRandomBetaActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomBetaActivity Bool
preemptible Double
alpha Double
beta =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomBetaProcess_ Double
alpha Double
beta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomWeibullActivity :: MonadDES m
=> Bool
-> Double
-> Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomWeibullActivity #-}
newPreemptibleRandomWeibullActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> Double -> Double -> Simulation m (Activity m () a a)
newPreemptibleRandomWeibullActivity Bool
preemptible Double
alpha Double
beta =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomWeibullProcess_ Double
alpha Double
beta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomDiscreteActivity :: MonadDES m
=> Bool
-> DiscretePDF Double
-> Simulation m (Activity m () a a)
{-# INLINABLE newPreemptibleRandomDiscreteActivity #-}
newPreemptibleRandomDiscreteActivity :: forall (m :: * -> *) a.
MonadDES m =>
Bool -> DiscretePDF Double -> Simulation m (Activity m () a a)
newPreemptibleRandomDiscreteActivity Bool
preemptible DiscretePDF Double
dpdf =
forall (m :: * -> *) a b.
MonadDES m =>
Bool -> (a -> Process m b) -> Simulation m (Activity m () a b)
newPreemptibleActivity Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do forall (m :: * -> *).
MonadDES m =>
DiscretePDF Double -> Process m ()
randomDiscreteProcess_ DiscretePDF Double
dpdf
forall (m :: * -> *) a. Monad m => a -> m a
return a
a