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 | Haskell2010 |
Tested with: GHC 8.0.1
This module defines the GPSS Storage entity.
Synopsis
- data Storage m
- newStorage :: MonadDES m => Int -> Event m (Storage m)
- storageCapacity :: Storage m -> Int
- storageEmpty :: MonadDES m => Storage m -> Event m Bool
- storageFull :: MonadDES m => Storage m -> Event m Bool
- storageContent :: MonadDES m => Storage m -> Event m Int
- storageContentStats :: MonadDES m => Storage m -> Event m (TimingStats Int)
- storageUseCount :: MonadDES m => Storage m -> Event m Int
- storageUsedContent :: MonadDES m => Storage m -> Event m Int
- storageUtilisationCount :: MonadDES m => Storage m -> Event m Int
- storageUtilisationCountStats :: MonadDES m => Storage m -> Event m (TimingStats Int)
- storageQueueCount :: MonadDES m => Storage m -> Event m Int
- storageQueueCountStats :: MonadDES m => Storage m -> Event m (TimingStats Int)
- storageTotalWaitTime :: MonadDES m => Storage m -> Event m Double
- storageWaitTime :: MonadDES m => Storage m -> Event m (SamplingStats Double)
- storageAverageHoldingTime :: MonadDES m => Storage m -> Event m Double
- enterStorage :: MonadDES m => Storage m -> Transact m a -> Int -> Process m ()
- leaveStorage :: MonadDES m => Storage m -> Int -> Process m ()
- leaveStorageWithinEvent :: MonadDES m => Storage m -> Int -> Event m ()
- resetStorage :: MonadDES m => Storage m -> Event m ()
- storageContentChanged :: MonadDES m => Storage m -> Signal m Int
- storageContentChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageUseCountChanged :: MonadDES m => Storage m -> Signal m Int
- storageUseCountChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageUsedContentChanged :: MonadDES m => Storage m -> Signal m Int
- storageUsedContentChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageUtilisationCountChanged :: MonadDES m => Storage m -> Signal m Int
- storageUtilisationCountChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageQueueCountChanged :: MonadDES m => Storage m -> Signal m Int
- storageQueueCountChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageWaitTimeChanged :: MonadDES m => Storage m -> Signal m (SamplingStats Double)
- storageWaitTimeChanged_ :: MonadDES m => Storage m -> Signal m ()
- storageChanged_ :: MonadDES m => Storage m -> Signal m ()
Storage Type
Represents a GPSS Storage entity.
Instances
MonadDES m => Eq (Storage m) Source # | |
MonadDES m => ResultProvider (Storage m) m Source # | |
Defined in Simulation.Aivika.Trans.GPSS.Results resultSource :: ResultName -> ResultDescription -> Storage m -> ResultSource m # resultSource3 :: ResultName -> ResultDescription -> ResultDescription -> Storage m -> ResultSource m # resultSource' :: ResultName -> [ResultName] -> ResultId -> [ResultId] -> Storage m -> ResultSource m # |
Creating Storage
newStorage :: MonadDES m => Int -> Event m (Storage m) Source #
Create a new storage by the specified capacity.
Storage Properties
storageCapacity :: Storage m -> Int Source #
Return the storage capacity.
storageEmpty :: MonadDES m => Storage m -> Event m Bool Source #
Whether the storage is empty, i.e. completely unused.
storageFull :: MonadDES m => Storage m -> Event m Bool Source #
Whether the storage is full, i.e. completely used.
storageContent :: MonadDES m => Storage m -> Event m Int Source #
Return the current storage content available for use.
storageContentStats :: MonadDES m => Storage m -> Event m (TimingStats Int) Source #
Return the statistics of the storage content available for use.
storageUseCount :: MonadDES m => Storage m -> Event m Int Source #
Return the total use count of the storage.
storageUsedContent :: MonadDES m => Storage m -> Event m Int Source #
Return the total used content of the storage.
storageUtilisationCount :: MonadDES m => Storage m -> Event m Int Source #
Return the current utilisation count of the storage.
storageUtilisationCountStats :: MonadDES m => Storage m -> Event m (TimingStats Int) Source #
Return the statistics for the utilisation count of the storage.
storageQueueCount :: MonadDES m => Storage m -> Event m Int Source #
Return the current queue length of the storage.
storageQueueCountStats :: MonadDES m => Storage m -> Event m (TimingStats Int) Source #
Return the statistics for the queue length of the storage.
storageTotalWaitTime :: MonadDES m => Storage m -> Event m Double Source #
Return the total wait time of the storage.
storageWaitTime :: MonadDES m => Storage m -> Event m (SamplingStats Double) Source #
Return the statistics for the wait time of the storage.
storageAverageHoldingTime :: MonadDES m => Storage m -> Event m Double Source #
Return the average holding time per unit.
Entering-Leaving Storage
:: MonadDES m | |
=> Storage m | the requested storage |
-> Transact m a | a transact that makes the request |
-> Int | the content decrement |
-> Process m () |
Enter the storage.
Leave the storage.
leaveStorageWithinEvent Source #
Leave the storage.
Statistics Reset
Signals
storageContentChanged :: MonadDES m => Storage m -> Signal m Int Source #
Signal triggered when the storageContent
property changes.
storageContentChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageContent
property changes.
storageUseCountChanged :: MonadDES m => Storage m -> Signal m Int Source #
Signal triggered when the storageUseCount
property changes.
storageUseCountChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageUseCount
property changes.
storageUsedContentChanged :: MonadDES m => Storage m -> Signal m Int Source #
Signal triggered when the storageUsedContent
property changes.
storageUsedContentChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageUsedContent
property changes.
storageUtilisationCountChanged :: MonadDES m => Storage m -> Signal m Int Source #
Signal triggered when the storageUtilisationCount
property changes.
storageUtilisationCountChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageUtilisationCount
property changes.
storageQueueCountChanged :: MonadDES m => Storage m -> Signal m Int Source #
Signal triggered when the storageQueueCount
property changes.
storageQueueCountChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageQueueCount
property changes.
storageWaitTimeChanged :: MonadDES m => Storage m -> Signal m (SamplingStats Double) Source #
Signal triggered when the storageTotalWaitTime
and storageWaitTime
properties change.
storageWaitTimeChanged_ :: MonadDES m => Storage m -> Signal m () Source #
Signal triggered when the storageTotalWaitTime
and storageWaitTime
properties change.