Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SimulationConfiguration r p s = SimulationConfiguration {}
- data SimulationState b c
- = SimulationState (AbsoluteTime, [EpidemicEvent], b, Identifier)
- | TerminatedSimulation (Maybe c)
- data SimulationRandEvent a b where
- SimulationRandEvent :: (ModelParameters a b, Population b) => (a -> AbsoluteTime -> b -> Identifier -> GenIO -> IO (AbsoluteTime, EpidemicEvent, b, Identifier)) -> SimulationRandEvent a b
- data TerminationHandler b c where
- TerminationHandler :: Population b => (b -> Bool) -> ([EpidemicEvent] -> c) -> TerminationHandler b c
- genIOFromFixed :: IO GenIO
- genIOFromWord32 :: Word32 -> IO GenIO
- genIOFromSystem :: IO GenIO
Documentation
data SimulationConfiguration r p s Source #
SimulationConfiguration | |
|
data SimulationState b c Source #
Either there is a valid simulation state which contains a sequence of epidemic events along with the time and population or, if the simulation has terminated early there is another value to indicate that along with a value which can be used to indicate why the simulation was terminated early.
Instances
(Eq b, Eq c) => Eq (SimulationState b c) Source # | |
Defined in Epidemic.Types.Simulation (==) :: SimulationState b c -> SimulationState b c -> Bool # (/=) :: SimulationState b c -> SimulationState b c -> Bool # | |
(Show b, Show c) => Show (SimulationState b c) Source # | |
Defined in Epidemic.Types.Simulation showsPrec :: Int -> SimulationState b c -> ShowS # show :: SimulationState b c -> String # showList :: [SimulationState b c] -> ShowS # |
data SimulationRandEvent a b where Source #
SimulationRandEvent :: (ModelParameters a b, Population b) => (a -> AbsoluteTime -> b -> Identifier -> GenIO -> IO (AbsoluteTime, EpidemicEvent, b, Identifier)) -> SimulationRandEvent a b |
data TerminationHandler b c where Source #
Check if a simulation should be terminated and if it should be terminated, then compute a summary explaining why. The first function is used to determine whether the population has entered a state which requires the simulation to terminate early and the second can be use to write a summary of the events that led to the termination.
TerminationHandler :: Population b => (b -> Bool) -> ([EpidemicEvent] -> c) -> TerminationHandler b c |
genIOFromFixed :: IO GenIO Source #
A PRNG seed which is hard coded into mwc-random
.
genIOFromWord32 :: Word32 -> IO GenIO Source #
A PRNG seed based on the given number. This is the best choice for reproducible simulations.
genIOFromSystem :: IO GenIO Source #
A PRNG seed generated by the system's random number generator.