aivika-1.1: A multi-paradigm simulation library

MaintainerDavid Sorokin <>
Safe HaskellSafe-Inferred




Tested with: GHC 7.6.3

The module defines the Simulation monad that represents a simulation run.



data Simulation a Source

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

class SimulationLift m whereSource

A type class to lift the simulation computations to other computations.


liftSimulation :: Simulation a -> m aSource

Lift the specified Simulation computation to another computation.

runSimulation :: Simulation a -> Specs -> IO aSource

Run the simulation using the specified specs.

runSimulations :: Simulation a -> Specs -> Int -> [IO a]Source

Run the given number of simulations using the specified specs, where each simulation is distinguished by its index simulationIndex.

Error Handling

catchSimulation :: Simulation a -> (IOException -> Simulation a) -> Simulation aSource

Exception handling within Simulation computations.

finallySimulation :: Simulation a -> Simulation b -> Simulation aSource

A computation with finalization part like the finally function.

throwSimulation :: IOException -> Simulation aSource

Like the standard throw function.


memoSimulation :: Simulation a -> Simulation (Simulation a)Source

Memoize the Simulation computation, always returning the same value within a simulation run.