aivika-lattice-0.3: Nested discrete event simulation module for the Aivika library using lattice

CopyrightCopyright (c) 2016-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Simulation.Aivika.Lattice.LIO

Contents

Description

Tested with: GHC 7.10.3

This module defines LIO as an instance of the MonadDES and EventIOQueueing type classes.

Synopsis

Documentation

data LIO a Source #

The LIO computation that can be run as nested one on the lattice node.

Instances

Monad LIO Source # 

Methods

(>>=) :: LIO a -> (a -> LIO b) -> LIO b #

(>>) :: LIO a -> LIO b -> LIO b #

return :: a -> LIO a #

fail :: String -> LIO a #

Functor LIO Source # 

Methods

fmap :: (a -> b) -> LIO a -> LIO b #

(<$) :: a -> LIO b -> LIO a #

MonadFix LIO Source # 

Methods

mfix :: (a -> LIO a) -> LIO a #

Applicative LIO Source # 

Methods

pure :: a -> LIO a #

(<*>) :: LIO (a -> b) -> LIO a -> LIO b #

(*>) :: LIO a -> LIO b -> LIO b #

(<*) :: LIO a -> LIO b -> LIO a #

MonadException LIO Source # 

Methods

catchComp :: Exception e => LIO a -> (e -> LIO a) -> LIO a #

finallyComp :: LIO a -> LIO b -> LIO a #

throwComp :: Exception e => e -> LIO a #

MonadIO LIO Source # 

Methods

liftIO :: IO a -> LIO a #

data Ref LIO # 
data Ref LIO = Ref {}
data Ref LIO # 
data Ref LIO = Ref {}
data EventQueue LIO # 
data Generator LIO # 
data StrategyQueue LIO FCFS # 
data StrategyQueue LIO LCFS # 

runLIO :: LIO a -> IO a Source #

Run the LIO computation using the integration times points as lattice nodes.

latticeTimeIndex :: LIO Int Source #

Return the lattice time index starting from 0. It corresponds to the integration time point. The index should be less than latticeSize.

latticeMemberIndex :: LIO Int Source #

Return the lattice member index starting from 0. It is always less than or equaled to latticeTimeIndex.

latticeSize :: Parameter LIO Int Source #

Return the lattice size.

latticeTime :: Parameter LIO Double Source #

Return the time for the current lattice node.

latticeTimeStep :: Parameter LIO Double Source #

The time step used when constructing the lattice. Currently, it is equivalent to dt.

findLatticeTimeIndex :: Double -> Parameter LIO Double Source #

Find the lattice time index for the specified modeling time.

Orphan instances

EventIOQueueing LIO Source #

An implementation of the EventIOQueueing type class.

Methods

enqueueEventIO :: Double -> Event LIO () -> Event LIO () #

MonadDES LIO Source # 
MonadComp LIO Source #