aivika-transformers-5.9.1: Transformers for the Aivika simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.Trans.Internal.Types

Description

Tested with: GHC 8.0.1

It defines the implementation details of some types. You should never use it in ordinary simulation models. The module is destined for those who will extend the library.

Synopsis

Documentation

data Specs m Source #

It defines the simulation specs.

Constructors

Specs 

Fields

data Method Source #

It defines the integration method.

Constructors

Euler

Euler's method

RungeKutta2

the 2nd order Runge-Kutta method

RungeKutta4

the 4th order Runge-Kutta method

RungeKutta4b

the 4th order Runge-Kutta 3/8-method

Instances

Instances details
Eq Method Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Types

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Ord Method Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Types

Show Method Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Types

data Run m Source #

It indentifies the simulation run.

Constructors

Run 

Fields

data Point m Source #

It defines the simulation point appended with the additional information.

Constructors

Point 

Fields

newtype Parameter m a Source #

The Parameter monad that allows specifying the model parameters. For example, they can be used when running the Monte-Carlo simulation.

In general, this monad is very useful for representing a computation which is external relative to the model itself.

Constructors

Parameter (Run m -> m a) 

Instances

Instances details
MonadTrans Parameter Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

lift :: Monad m => m a -> Parameter m a #

Monad m => MonadCompTrans Parameter m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

liftComp :: m a -> Parameter m a Source #

Monad m => ParameterLift Parameter m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

MonadDES m => ResultComputing Parameter m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

Monad m => Monad (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

(>>=) :: Parameter m a -> (a -> Parameter m b) -> Parameter m b #

(>>) :: Parameter m a -> Parameter m b -> Parameter m b #

return :: a -> Parameter m a #

Functor m => Functor (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

fmap :: (a -> b) -> Parameter m a -> Parameter m b #

(<$) :: a -> Parameter m b -> Parameter m a #

MonadFix m => MonadFix (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

mfix :: (a -> Parameter m a) -> Parameter m a #

Monad m => MonadFail (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

fail :: String -> Parameter m a #

Applicative m => Applicative (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

pure :: a -> Parameter m a #

(<*>) :: Parameter m (a -> b) -> Parameter m a -> Parameter m b #

liftA2 :: (a -> b -> c) -> Parameter m a -> Parameter m b -> Parameter m c #

(*>) :: Parameter m a -> Parameter m b -> Parameter m b #

(<*) :: Parameter m a -> Parameter m b -> Parameter m a #

MonadIO m => MonadIO (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

liftIO :: IO a -> Parameter m a #

MonadException m => MonadThrow (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

throwM :: Exception e => e -> Parameter m a #

MonadException m => MonadCatch (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

catch :: Exception e => Parameter m a -> (e -> Parameter m a) -> Parameter m a #

(MonadException m, MonadMask m) => MonadMask (Parameter m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

mask :: ((forall a. Parameter m a -> Parameter m a) -> Parameter m b) -> Parameter m b #

uninterruptibleMask :: ((forall a. Parameter m a -> Parameter m a) -> Parameter m b) -> Parameter m b #

generalBracket :: Parameter m a -> (a -> ExitCase b -> Parameter m c) -> (a -> Parameter m b) -> Parameter m (b, c) #

(Floating a, Monad m) => Floating (Parameter m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

pi :: Parameter m a #

exp :: Parameter m a -> Parameter m a #

log :: Parameter m a -> Parameter m a #

sqrt :: Parameter m a -> Parameter m a #

(**) :: Parameter m a -> Parameter m a -> Parameter m a #

logBase :: Parameter m a -> Parameter m a -> Parameter m a #

sin :: Parameter m a -> Parameter m a #

cos :: Parameter m a -> Parameter m a #

tan :: Parameter m a -> Parameter m a #

asin :: Parameter m a -> Parameter m a #

acos :: Parameter m a -> Parameter m a #

atan :: Parameter m a -> Parameter m a #

sinh :: Parameter m a -> Parameter m a #

cosh :: Parameter m a -> Parameter m a #

tanh :: Parameter m a -> Parameter m a #

asinh :: Parameter m a -> Parameter m a #

acosh :: Parameter m a -> Parameter m a #

atanh :: Parameter m a -> Parameter m a #

log1p :: Parameter m a -> Parameter m a #

expm1 :: Parameter m a -> Parameter m a #

log1pexp :: Parameter m a -> Parameter m a #

log1mexp :: Parameter m a -> Parameter m a #

(Fractional a, Monad m) => Fractional (Parameter m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

(/) :: Parameter m a -> Parameter m a -> Parameter m a #

recip :: Parameter m a -> Parameter m a #

fromRational :: Rational -> Parameter m a #

(Num a, Monad m) => Num (Parameter m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Parameter

Methods

(+) :: Parameter m a -> Parameter m a -> Parameter m a #

(-) :: Parameter m a -> Parameter m a -> Parameter m a #

(*) :: Parameter m a -> Parameter m a -> Parameter m a #

negate :: Parameter m a -> Parameter m a #

abs :: Parameter m a -> Parameter m a #

signum :: Parameter m a -> Parameter m a #

fromInteger :: Integer -> Parameter m a #

(MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Parameter m (Vector e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(Ix i, Show i, MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Parameter m (Array i e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Parameter m (TimingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Parameter m (SamplingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a)) => ResultProvider (Parameter m a) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

newtype Simulation m a Source #

A value in the Simulation monad represents a computation within the simulation run.

Constructors

Simulation (Run m -> m a) 

Instances

Instances details
MonadTrans Simulation Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

lift :: Monad m => m a -> Simulation m a #

Monad m => MonadCompTrans Simulation m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

liftComp :: m a -> Simulation m a Source #

Monad m => ParameterLift Simulation m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Monad m => SimulationLift Simulation m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

MonadDES m => ResultComputing Simulation m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

Monad m => Monad (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

(>>=) :: Simulation m a -> (a -> Simulation m b) -> Simulation m b #

(>>) :: Simulation m a -> Simulation m b -> Simulation m b #

return :: a -> Simulation m a #

Functor m => Functor (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

fmap :: (a -> b) -> Simulation m a -> Simulation m b #

(<$) :: a -> Simulation m b -> Simulation m a #

MonadFix m => MonadFix (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

mfix :: (a -> Simulation m a) -> Simulation m a #

Monad m => MonadFail (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

fail :: String -> Simulation m a #

Applicative m => Applicative (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

pure :: a -> Simulation m a #

(<*>) :: Simulation m (a -> b) -> Simulation m a -> Simulation m b #

liftA2 :: (a -> b -> c) -> Simulation m a -> Simulation m b -> Simulation m c #

(*>) :: Simulation m a -> Simulation m b -> Simulation m b #

(<*) :: Simulation m a -> Simulation m b -> Simulation m a #

MonadIO m => MonadIO (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

liftIO :: IO a -> Simulation m a #

MonadException m => MonadThrow (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

throwM :: Exception e => e -> Simulation m a #

MonadException m => MonadCatch (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

catch :: Exception e => Simulation m a -> (e -> Simulation m a) -> Simulation m a #

(MonadException m, MonadMask m) => MonadMask (Simulation m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Simulation

Methods

mask :: ((forall a. Simulation m a -> Simulation m a) -> Simulation m b) -> Simulation m b #

uninterruptibleMask :: ((forall a. Simulation m a -> Simulation m a) -> Simulation m b) -> Simulation m b #

generalBracket :: Simulation m a -> (a -> ExitCase b -> Simulation m c) -> (a -> Simulation m b) -> Simulation m (b, c) #

(MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Simulation m (Vector e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(Ix i, Show i, MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Simulation m (Array i e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Simulation m (TimingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Simulation m (SamplingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a)) => ResultProvider (Simulation m a) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

newtype Dynamics m a Source #

A value in the Dynamics monad represents a polymorphic time varying function defined in the whole spectrum of time values as a single entity. It is ideal for numerical approximating integrals.

Constructors

Dynamics (Point m -> m a) 

Instances

Instances details
MonadTrans Dynamics Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

lift :: Monad m => m a -> Dynamics m a #

Monad m => MonadCompTrans Dynamics m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

liftComp :: m a -> Dynamics m a Source #

Monad m => ParameterLift Dynamics m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

liftParameter :: Parameter m a -> Dynamics m a Source #

Monad m => SimulationLift Dynamics m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Monad m => DynamicsLift Dynamics m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

liftDynamics :: Dynamics m a -> Dynamics m a Source #

MonadDES m => ResultComputing Dynamics m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

Monad m => Monad (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

(>>=) :: Dynamics m a -> (a -> Dynamics m b) -> Dynamics m b #

(>>) :: Dynamics m a -> Dynamics m b -> Dynamics m b #

return :: a -> Dynamics m a #

Functor m => Functor (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

fmap :: (a -> b) -> Dynamics m a -> Dynamics m b #

(<$) :: a -> Dynamics m b -> Dynamics m a #

MonadFix m => MonadFix (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

mfix :: (a -> Dynamics m a) -> Dynamics m a #

Monad m => MonadFail (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

fail :: String -> Dynamics m a #

Applicative m => Applicative (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

pure :: a -> Dynamics m a #

(<*>) :: Dynamics m (a -> b) -> Dynamics m a -> Dynamics m b #

liftA2 :: (a -> b -> c) -> Dynamics m a -> Dynamics m b -> Dynamics m c #

(*>) :: Dynamics m a -> Dynamics m b -> Dynamics m b #

(<*) :: Dynamics m a -> Dynamics m b -> Dynamics m a #

MonadIO m => MonadIO (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

liftIO :: IO a -> Dynamics m a #

MonadException m => MonadThrow (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

throwM :: Exception e => e -> Dynamics m a #

MonadException m => MonadCatch (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

catch :: Exception e => Dynamics m a -> (e -> Dynamics m a) -> Dynamics m a #

(MonadException m, MonadMask m) => MonadMask (Dynamics m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

mask :: ((forall a. Dynamics m a -> Dynamics m a) -> Dynamics m b) -> Dynamics m b #

uninterruptibleMask :: ((forall a. Dynamics m a -> Dynamics m a) -> Dynamics m b) -> Dynamics m b #

generalBracket :: Dynamics m a -> (a -> ExitCase b -> Dynamics m c) -> (a -> Dynamics m b) -> Dynamics m (b, c) #

(Floating a, Monad m) => Floating (Dynamics m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

pi :: Dynamics m a #

exp :: Dynamics m a -> Dynamics m a #

log :: Dynamics m a -> Dynamics m a #

sqrt :: Dynamics m a -> Dynamics m a #

(**) :: Dynamics m a -> Dynamics m a -> Dynamics m a #

logBase :: Dynamics m a -> Dynamics m a -> Dynamics m a #

sin :: Dynamics m a -> Dynamics m a #

cos :: Dynamics m a -> Dynamics m a #

tan :: Dynamics m a -> Dynamics m a #

asin :: Dynamics m a -> Dynamics m a #

acos :: Dynamics m a -> Dynamics m a #

atan :: Dynamics m a -> Dynamics m a #

sinh :: Dynamics m a -> Dynamics m a #

cosh :: Dynamics m a -> Dynamics m a #

tanh :: Dynamics m a -> Dynamics m a #

asinh :: Dynamics m a -> Dynamics m a #

acosh :: Dynamics m a -> Dynamics m a #

atanh :: Dynamics m a -> Dynamics m a #

log1p :: Dynamics m a -> Dynamics m a #

expm1 :: Dynamics m a -> Dynamics m a #

log1pexp :: Dynamics m a -> Dynamics m a #

log1mexp :: Dynamics m a -> Dynamics m a #

(Fractional a, Monad m) => Fractional (Dynamics m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

(/) :: Dynamics m a -> Dynamics m a -> Dynamics m a #

recip :: Dynamics m a -> Dynamics m a #

fromRational :: Rational -> Dynamics m a #

(Num a, Monad m) => Num (Dynamics m a) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Dynamics

Methods

(+) :: Dynamics m a -> Dynamics m a -> Dynamics m a #

(-) :: Dynamics m a -> Dynamics m a -> Dynamics m a #

(*) :: Dynamics m a -> Dynamics m a -> Dynamics m a #

negate :: Dynamics m a -> Dynamics m a #

abs :: Dynamics m a -> Dynamics m a #

signum :: Dynamics m a -> Dynamics m a #

fromInteger :: Integer -> Dynamics m a #

(MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Dynamics m (Vector e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(Ix i, Show i, MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Dynamics m (Array i e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Dynamics m (TimingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Dynamics m (SamplingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a)) => ResultProvider (Dynamics m a) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

newtype Event m a Source #

A value in the Event monad transformer represents a polymorphic time varying function which is strongly synchronized with the event queue.

Constructors

Event (Point m -> m a) 

Instances

Instances details
MonadTrans Event Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

lift :: Monad m => m a -> Event m a #

Monad m => MonadCompTrans Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftComp :: m a -> Event m a Source #

Monad m => ParameterLift Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftParameter :: Parameter m a -> Event m a Source #

Monad m => SimulationLift Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftSimulation :: Simulation m a -> Event m a Source #

Monad m => DynamicsLift Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftDynamics :: Dynamics m a -> Event m a Source #

Monad m => EventLift Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftEvent :: Event m a -> Event m a Source #

MonadDES m => ResultComputing Event m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

Monad m => Monad (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

(>>=) :: Event m a -> (a -> Event m b) -> Event m b #

(>>) :: Event m a -> Event m b -> Event m b #

return :: a -> Event m a #

Functor m => Functor (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

fmap :: (a -> b) -> Event m a -> Event m b #

(<$) :: a -> Event m b -> Event m a #

MonadFix m => MonadFix (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

mfix :: (a -> Event m a) -> Event m a #

Monad m => MonadFail (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

fail :: String -> Event m a #

Applicative m => Applicative (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

pure :: a -> Event m a #

(<*>) :: Event m (a -> b) -> Event m a -> Event m b #

liftA2 :: (a -> b -> c) -> Event m a -> Event m b -> Event m c #

(*>) :: Event m a -> Event m b -> Event m b #

(<*) :: Event m a -> Event m b -> Event m a #

MonadIO m => MonadIO (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

liftIO :: IO a -> Event m a #

MonadException m => MonadThrow (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

throwM :: Exception e => e -> Event m a #

MonadException m => MonadCatch (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

catch :: Exception e => Event m a -> (e -> Event m a) -> Event m a #

(MonadException m, MonadMask m) => MonadMask (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Event

Methods

mask :: ((forall a. Event m a -> Event m a) -> Event m b) -> Event m b #

uninterruptibleMask :: ((forall a. Event m a -> Event m a) -> Event m b) -> Event m b #

generalBracket :: Event m a -> (a -> ExitCase b -> Event m c) -> (a -> Event m b) -> Event m (b, c) #

(Monad m, MonadRef m) => Observable (Ref m) (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Ref.Base.Lazy

Methods

readObservable :: Ref m a -> Event m a Source #

(Monad m, MonadRef m) => Observable (Ref m) (Event m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Ref.Base.Strict

Methods

readObservable :: Ref m a -> Event m a Source #

(MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Event m (Vector e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(Ix i, Show i, MonadDES m, ResultItemable (ResultValue [e])) => ResultProvider (Event m (Array i e)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Event m (TimingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Event m (SamplingCounter a)) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

(MonadDES m, ResultItemable (ResultValue a)) => ResultProvider (Event m a) m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Results

data EventProcessing Source #

Defines how the events are processed.

Constructors

CurrentEvents

either process all earlier and then current events, or raise an error if the current simulation time is less than the actual time of the event queue (safe within the Event computation as this is protected by the type system)

EarlierEvents

either process all earlier events not affecting the events at the current simulation time, or raise an error if the current simulation time is less than the actual time of the event queue (safe within the Event computation as this is protected by the type system)

CurrentEventsOrFromPast

either process all earlier and then current events, or do nothing if the current simulation time is less than the actual time of the event queue (do not use unless the documentation states the opposite)

EarlierEventsOrFromPast

either process all earlier events, or do nothing if the current simulation time is less than the actual time of the event queue (do not use unless the documentation states the opposite)

class EventQueueing m where Source #

A type class of monads that allow enqueueing the events.

Associated Types

data EventQueue m :: * Source #

It represents the event queue.

Methods

newEventQueue :: Specs m -> m (EventQueue m) Source #

Create a new event queue by the specified specs with simulation session.

enqueueEvent :: Double -> Event m () -> Event m () Source #

Enqueue the event which must be actuated at the specified time.

runEvent :: Event m a -> Dynamics m a Source #

Run the EventT computation in the current simulation time within the DynamicsT computation involving all pending CurrentEvents in the processing too.

runEventWith :: EventProcessing -> Event m a -> Dynamics m a Source #

Run the EventT computation in the current simulation time within the DynamicsT computation specifying what pending events should be involved in the processing.

eventQueueCount :: Event m Int Source #

Return the number of pending events that should be yet actuated.

Instances

Instances details
EventQueueing IO Source #

An implementation of the EventQueueing type class.

Instance details

Defined in Simulation.Aivika.IO.Event

Associated Types

data EventQueue IO Source #

invokeParameter :: Run m -> Parameter m a -> m a Source #

Invoke the Parameter computation.

invokeSimulation :: Run m -> Simulation m a -> m a Source #

Invoke the Simulation computation.

invokeDynamics :: Point m -> Dynamics m a -> m a Source #

Invoke the Dynamics computation.

invokeEvent :: Point m -> Event m a -> m a Source #

Invoke the Event computation.