Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | Safe-Infered |
Tested with: GHC 7.0.3
A value in the Process
monad represents a discontinuous process that
can suspend in any simulation time point and then resume later in the same
or another time point.
The process of this type behaves like a dynamic process too. So, any value
in the Dynamics
monad can be lifted to the Process monad. Moreover,
a value in the Process monad can be run in the Dynamics monad.
A value of the ProcessID
type is just an identifier of such a process.
- data ProcessID
- data Process a
- processQueue :: ProcessID -> EventQueue
- newProcessID :: EventQueue -> Simulation ProcessID
- holdProcess :: Double -> Process ()
- passivateProcess :: Process ()
- processPassive :: ProcessID -> Dynamics Bool
- reactivateProcess :: ProcessID -> Dynamics ()
- processID :: Process ProcessID
- runProcess :: Process () -> ProcessID -> Double -> Dynamics ()
Documentation
Specifies a discontinuous process that can suspend at any time and then resume later.
processQueue :: ProcessID -> EventQueueSource
Return the event queue.
newProcessID :: EventQueue -> Simulation ProcessIDSource
Create a new process ID.
holdProcess :: Double -> Process ()Source
Hold the process for the specified time period.
passivateProcess :: Process ()Source
Passivate the process.
processPassive :: ProcessID -> Dynamics BoolSource
Test whether the process with the specified ID is passivated.
reactivateProcess :: ProcessID -> Dynamics ()Source
Reactivate a process with the specified ID.