module Simulation.Aivika.Server.Random
(newRandomUniformServer,
newRandomUniformIntServer,
newRandomTriangularServer,
newRandomNormalServer,
newRandomLogNormalServer,
newRandomExponentialServer,
newRandomErlangServer,
newRandomPoissonServer,
newRandomBinomialServer,
newRandomGammaServer,
newRandomBetaServer,
newRandomWeibullServer,
newRandomDiscreteServer,
newPreemptibleRandomUniformServer,
newPreemptibleRandomUniformIntServer,
newPreemptibleRandomTriangularServer,
newPreemptibleRandomNormalServer,
newPreemptibleRandomLogNormalServer,
newPreemptibleRandomExponentialServer,
newPreemptibleRandomErlangServer,
newPreemptibleRandomPoissonServer,
newPreemptibleRandomBinomialServer,
newPreemptibleRandomGammaServer,
newPreemptibleRandomBetaServer,
newPreemptibleRandomWeibullServer,
newPreemptibleRandomDiscreteServer) where
import Simulation.Aivika.Generator
import Simulation.Aivika.Simulation
import Simulation.Aivika.Process
import Simulation.Aivika.Process.Random
import Simulation.Aivika.Server
newRandomUniformServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomUniformServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomUniformServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomUniformServer Bool
False
newRandomUniformIntServer :: Int
-> Int
-> Simulation (Server () a a)
newRandomUniformIntServer :: forall a. Int -> Int -> Simulation (Server () a a)
newRandomUniformIntServer =
forall a. Bool -> Int -> Int -> Simulation (Server () a a)
newPreemptibleRandomUniformIntServer Bool
False
newRandomTriangularServer :: Double
-> Double
-> Double
-> Simulation (Server () a a)
newRandomTriangularServer :: forall a. Double -> Double -> Double -> Simulation (Server () a a)
newRandomTriangularServer =
forall a.
Bool -> Double -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomTriangularServer Bool
False
newRandomNormalServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomNormalServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomNormalServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomNormalServer Bool
False
newRandomLogNormalServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomLogNormalServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomLogNormalServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomLogNormalServer Bool
False
newRandomExponentialServer :: Double
-> Simulation (Server () a a)
newRandomExponentialServer :: forall a. Double -> Simulation (Server () a a)
newRandomExponentialServer =
forall a. Bool -> Double -> Simulation (Server () a a)
newPreemptibleRandomExponentialServer Bool
False
newRandomErlangServer :: Double
-> Int
-> Simulation (Server () a a)
newRandomErlangServer :: forall a. Double -> Int -> Simulation (Server () a a)
newRandomErlangServer =
forall a. Bool -> Double -> Int -> Simulation (Server () a a)
newPreemptibleRandomErlangServer Bool
False
newRandomPoissonServer :: Double
-> Simulation (Server () a a)
newRandomPoissonServer :: forall a. Double -> Simulation (Server () a a)
newRandomPoissonServer =
forall a. Bool -> Double -> Simulation (Server () a a)
newPreemptibleRandomPoissonServer Bool
False
newRandomBinomialServer :: Double
-> Int
-> Simulation (Server () a a)
newRandomBinomialServer :: forall a. Double -> Int -> Simulation (Server () a a)
newRandomBinomialServer =
forall a. Bool -> Double -> Int -> Simulation (Server () a a)
newPreemptibleRandomBinomialServer Bool
False
newRandomGammaServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomGammaServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomGammaServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomGammaServer Bool
False
newRandomBetaServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomBetaServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomBetaServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomBetaServer Bool
False
newRandomWeibullServer :: Double
-> Double
-> Simulation (Server () a a)
newRandomWeibullServer :: forall a. Double -> Double -> Simulation (Server () a a)
newRandomWeibullServer =
forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomWeibullServer Bool
False
newRandomDiscreteServer :: DiscretePDF Double
-> Simulation (Server () a a)
newRandomDiscreteServer :: forall a. DiscretePDF Double -> Simulation (Server () a a)
newRandomDiscreteServer =
forall a. Bool -> DiscretePDF Double -> Simulation (Server () a a)
newPreemptibleRandomDiscreteServer Bool
False
newPreemptibleRandomUniformServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomUniformServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomUniformServer Bool
preemptible Double
min Double
max =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomUniformProcess_ Double
min Double
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomUniformIntServer :: Bool
-> Int
-> Int
-> Simulation (Server () a a)
newPreemptibleRandomUniformIntServer :: forall a. Bool -> Int -> Int -> Simulation (Server () a a)
newPreemptibleRandomUniformIntServer Bool
preemptible Int
min Int
max =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Int -> Int -> Process ()
randomUniformIntProcess_ Int
min Int
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomTriangularServer :: Bool
-> Double
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomTriangularServer :: forall a.
Bool -> Double -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomTriangularServer Bool
preemptible Double
min Double
median Double
max =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Double -> Process ()
randomTriangularProcess_ Double
min Double
median Double
max
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomNormalServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomNormalServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomNormalServer Bool
preemptible Double
mu Double
nu =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomNormalProcess_ Double
mu Double
nu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomLogNormalServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomLogNormalServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomLogNormalServer Bool
preemptible Double
mu Double
nu =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomLogNormalProcess_ Double
mu Double
nu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomExponentialServer :: Bool
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomExponentialServer :: forall a. Bool -> Double -> Simulation (Server () a a)
newPreemptibleRandomExponentialServer Bool
preemptible Double
mu =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Process ()
randomExponentialProcess_ Double
mu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomErlangServer :: Bool
-> Double
-> Int
-> Simulation (Server () a a)
newPreemptibleRandomErlangServer :: forall a. Bool -> Double -> Int -> Simulation (Server () a a)
newPreemptibleRandomErlangServer Bool
preemptible Double
beta Int
m =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Int -> Process ()
randomErlangProcess_ Double
beta Int
m
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomPoissonServer :: Bool
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomPoissonServer :: forall a. Bool -> Double -> Simulation (Server () a a)
newPreemptibleRandomPoissonServer Bool
preemptible Double
mu =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Process ()
randomPoissonProcess_ Double
mu
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomBinomialServer :: Bool
-> Double
-> Int
-> Simulation (Server () a a)
newPreemptibleRandomBinomialServer :: forall a. Bool -> Double -> Int -> Simulation (Server () a a)
newPreemptibleRandomBinomialServer Bool
preemptible Double
prob Int
trials =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Int -> Process ()
randomBinomialProcess_ Double
prob Int
trials
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomGammaServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomGammaServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomGammaServer Bool
preemptible Double
kappa Double
theta =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomGammaProcess_ Double
kappa Double
theta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomBetaServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomBetaServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomBetaServer Bool
preemptible Double
alpha Double
beta =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomBetaProcess_ Double
alpha Double
beta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomWeibullServer :: Bool
-> Double
-> Double
-> Simulation (Server () a a)
newPreemptibleRandomWeibullServer :: forall a. Bool -> Double -> Double -> Simulation (Server () a a)
newPreemptibleRandomWeibullServer Bool
preemptible Double
alpha Double
beta =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do Double -> Double -> Process ()
randomWeibullProcess_ Double
alpha Double
beta
forall (m :: * -> *) a. Monad m => a -> m a
return a
a
newPreemptibleRandomDiscreteServer :: Bool
-> DiscretePDF Double
-> Simulation (Server () a a)
newPreemptibleRandomDiscreteServer :: forall a. Bool -> DiscretePDF Double -> Simulation (Server () a a)
newPreemptibleRandomDiscreteServer Bool
preemptible DiscretePDF Double
dpdf =
forall a b. Bool -> (a -> Process b) -> Simulation (Server () a b)
newPreemptibleServer Bool
preemptible forall a b. (a -> b) -> a -> b
$ \a
a ->
do DiscretePDF Double -> Process ()
randomDiscreteProcess_ DiscretePDF Double
dpdf
forall (m :: * -> *) a. Monad m => a -> m a
return a
a