aivika-gpss-0.3: 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.GPSS.Transact

Description

Tested with: GHC 8.0.2

This module defines a GPSS transact.

Synopsis

Documentation

data Transact a Source #

Represents a GPSS transact.

Instances

Eq (Transact a) Source # 

Methods

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

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

transactValue :: Transact a -> a Source #

The data of the transact.

transactArrivalDelay :: Transact a -> Maybe Double Source #

The delay between the transacts generated.

transactArrivalTime :: Transact a -> Double Source #

The time at which the transact was generated.

transactPriority :: Transact a -> Int Source #

The transact priority.

transactAssemblySet :: Transact a -> Event AssemblySet Source #

Return the transact assembly set.

newTransact Source #

Arguments

:: Arrival a

the arrival data

-> Int

the transact priority

-> Simulation (Transact a) 

Create a new transact.

splitTransact :: Transact a -> Simulation (Transact a) Source #

Split the transact.

assignTransactValue :: Transact a -> (a -> b) -> Transact b Source #

Assign the transact value and return a new version of the same transact.

assignTransactValueM :: Monad c => Transact a -> (a -> c b) -> c (Transact b) Source #

Assign the transact value and return a new version of the same transact.

assignTransactPriority :: Transact a -> Int -> Transact a Source #

Assign the priority and return a new version of the same transact.

takeTransact :: Transact a -> Process () Source #

Take the transact.

releaseTransact :: Transact a -> Process () Source #

Release the transact.

transactPreemptionBegin :: Transact a -> Event () Source #

Preempt the computation that handles the transact.

transactPreemptionEnd :: Transact a -> Event () Source #

Proceed with the computation after the transact was preempted earlier.

requireTransactProcessId :: Transact a -> Event ProcessId Source #

Require to return an identifier of the process associated with the transact.

transferTransact :: Transact a -> Process () -> Event () Source #

Like the GoTo statement, it associates the transact with another process.

reactivateTransacts :: [(Transact a, Maybe (Process ()))] -> Event () Source #

Reactivate the transacts or transfer them to the specified computations.

registerTransactQueueEntry :: Transact a -> QueueEntry -> Event () Source #

Register the queue entry in the transact.

unregisterTransactQueueEntry :: Transact a -> Queue -> Event QueueEntry Source #

Unregister the queue entry from the transact.