Copyright | Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
Tested with: GHC 8.0.2
This module defines a GPSS transact.
- data Transact m a
- transactValue :: Transact m a -> a
- transactArrivalDelay :: Transact m a -> Maybe Double
- transactArrivalTime :: Transact m a -> Double
- transactPriority :: Transact m a -> Int
- transactAssemblySet :: MonadDES m => Transact m a -> Event m (AssemblySet m)
- newTransact :: MonadDES m => Arrival a -> Int -> Simulation m (Transact m a)
- splitTransact :: MonadDES m => Transact m a -> Simulation m (Transact m a)
- assignTransactValue :: Transact m a -> (a -> b) -> Transact m b
- assignTransactValueM :: Monad c => Transact m a -> (a -> c b) -> c (Transact m b)
- assignTransactPriority :: Transact m a -> Int -> Transact m a
- takeTransact :: MonadDES m => Transact m a -> Process m ()
- releaseTransact :: MonadDES m => Transact m a -> Process m ()
- transactPreemptionBegin :: MonadDES m => Transact m a -> Event m ()
- transactPreemptionEnd :: MonadDES m => Transact m a -> Event m ()
- requireTransactProcessId :: MonadDES m => Transact m a -> Event m (ProcessId m)
- transferTransact :: MonadDES m => Transact m a -> Process m () -> Event m ()
- reactivateTransacts :: MonadDES m => [(Transact m a, Maybe (Process m ()))] -> Event m ()
- registerTransactQueueEntry :: MonadDES m => Transact m a -> QueueEntry m -> Event m ()
- unregisterTransactQueueEntry :: MonadDES m => Transact m a -> Queue m -> Event m (QueueEntry m)
Documentation
transactValue :: Transact m a -> a Source #
The data of the transact.
transactArrivalDelay :: Transact m a -> Maybe Double Source #
The delay between the transacts generated.
transactArrivalTime :: Transact m a -> Double Source #
The time at which the transact was generated.
transactPriority :: Transact m a -> Int Source #
The transact priority.
transactAssemblySet :: MonadDES m => Transact m a -> Event m (AssemblySet m) Source #
Return the transact assembly set.
:: MonadDES m | |
=> Arrival a | the arrival data |
-> Int | the transact priority |
-> Simulation m (Transact m a) |
Create a new transact.
splitTransact :: MonadDES m => Transact m a -> Simulation m (Transact m a) Source #
Split the transact.
assignTransactValue :: Transact m a -> (a -> b) -> Transact m b Source #
Assign the transact value and return a new version of the same transact.
assignTransactValueM :: Monad c => Transact m a -> (a -> c b) -> c (Transact m b) Source #
Assign the transact value and return a new version of the same transact.
assignTransactPriority :: Transact m a -> Int -> Transact m a Source #
Assign the priority and return a new version of the same transact.
transactPreemptionBegin :: MonadDES m => Transact m a -> Event m () Source #
Preempt the computation that handles the transact.
transactPreemptionEnd :: MonadDES m => Transact m a -> Event m () Source #
Proceed with the computation after the transact was preempted earlier.
requireTransactProcessId :: MonadDES m => Transact m a -> Event m (ProcessId m) Source #
Require to return an identifier of the process associated with the transact.
transferTransact :: MonadDES m => Transact m a -> Process m () -> Event m () Source #
Like the GoTo statement, it associates the transact with another process.
reactivateTransacts :: MonadDES m => [(Transact m a, Maybe (Process m ()))] -> Event m () Source #
Reactivate the transacts or transfer them to the specified computations.
registerTransactQueueEntry :: MonadDES m => Transact m a -> QueueEntry m -> Event m () Source #
Register the queue entry in the transact.
unregisterTransactQueueEntry :: MonadDES m => Transact m a -> Queue m -> Event m (QueueEntry m) Source #
Unregister the queue entry from the transact.