aivika-gpss-0.5: GPSS-like DSL for Aivika

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

Simulation.Aivika.Trans.GPSS.Transact

Description

Tested with: GHC 8.0.2

This module defines a GPSS transact.

Synopsis

Documentation

data Transact m a Source #

Represents a GPSS transact.

Instances

MonadDES m => Eq (Transact m a) Source # 

Methods

(==) :: Transact m a -> Transact m a -> Bool #

(/=) :: Transact m a -> Transact m a -> Bool #

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.

newTransact Source #

Arguments

:: 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.

takeTransact :: MonadDES m => Transact m a -> Process m () Source #

Take the transact.

releaseTransact :: MonadDES m => Transact m a -> Process m () Source #

Release the 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.