aivika-gpss-0.7.1: GPSS-like DSL for Aivika
CopyrightCopyright (c) 2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.GPSS.Storage

Description

Tested with: GHC 8.0.1

This module defines the GPSS Storage entity.

Synopsis

Storage Type

Creating Storage

newStorage :: Int -> Event Storage Source #

Create a new storage by the specified capacity.

Storage Properties

storageCapacity :: Storage -> Int Source #

Return the storage capacity.

storageEmpty :: Storage -> Event Bool Source #

Whether the storage is empty, i.e. completely unused.

storageFull :: Storage -> Event Bool Source #

Whether the storage is full, i.e. completely used.

storageContent :: Storage -> Event Int Source #

Return the current storage content available for use.

storageContentStats :: Storage -> Event (TimingStats Int) Source #

Return the statistics of the storage content available for use.

storageUseCount :: Storage -> Event Int Source #

Return the total use count of the storage.

storageUsedContent :: Storage -> Event Int Source #

Return the total used content of the storage.

storageUtilisationCount :: Storage -> Event Int Source #

Return the current utilisation count of the storage.

storageUtilisationCountStats :: Storage -> Event (TimingStats Int) Source #

Return the statistics for the utilisation count of the storage.

storageQueueCount :: Storage -> Event Int Source #

Return the current queue length of the storage.

storageQueueCountStats :: Storage -> Event (TimingStats Int) Source #

Return the statistics for the queue length of the storage.

storageTotalWaitTime :: Storage -> Event Double Source #

Return the total wait time of the storage.

storageWaitTime :: Storage -> Event (SamplingStats Double) Source #

Return the statistics for the wait time of the storage.

storageAverageHoldingTime :: Storage -> Event Double Source #

Return the average holding time per unit.

Entering-Leaving Storage

enterStorage Source #

Arguments

:: Storage

the requested storage

-> Transact a

a transact that makes the request

-> Int

the content decrement

-> Process () 

Enter the storage.

leaveStorage Source #

Arguments

:: Storage

the storage to leave

-> Int

the content increment

-> Process () 

Leave the storage.

leaveStorageWithinEvent Source #

Arguments

:: Storage

the storage to leave

-> Int

the content increment

-> Event () 

Leave the storage.

Statistics Reset

resetStorage :: Storage -> Event () Source #

Reset the statistics.

Signals

storageContentChanged :: Storage -> Signal Int Source #

Signal triggered when the storageContent property changes.

storageContentChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageContent property changes.

storageUseCountChanged :: Storage -> Signal Int Source #

Signal triggered when the storageUseCount property changes.

storageUseCountChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageUseCount property changes.

storageUsedContentChanged :: Storage -> Signal Int Source #

Signal triggered when the storageUsedContent property changes.

storageUsedContentChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageUsedContent property changes.

storageUtilisationCountChanged :: Storage -> Signal Int Source #

Signal triggered when the storageUtilisationCount property changes.

storageUtilisationCountChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageUtilisationCount property changes.

storageQueueCountChanged :: Storage -> Signal Int Source #

Signal triggered when the storageQueueCount property changes.

storageQueueCountChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageQueueCount property changes.

storageWaitTimeChanged :: Storage -> Signal (SamplingStats Double) Source #

Signal triggered when the storageTotalWaitTime and storageWaitTime properties change.

storageWaitTimeChanged_ :: Storage -> Signal () Source #

Signal triggered when the storageTotalWaitTime and storageWaitTime properties change.

storageChanged_ :: Storage -> Signal () Source #

Signal triggered when one of the storage counters changes.