Copyright | Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 8.0.1
This module defines the GPSS Facility entity.
Synopsis
- data Facility m a
- data FacilityPreemptMode m a = FacilityPreemptMode {}
- type FacilityPreemptTransfer m a = Transact m a -> Maybe Double -> Process m ()
- newFacility :: MonadDES m => Event m (Facility m a)
- facilityCount :: MonadDES m => Facility m a -> Event m Int
- facilityCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int)
- facilityCaptureCount :: MonadDES m => Facility m a -> Event m Int
- facilityUtilisationCount :: MonadDES m => Facility m a -> Event m Int
- facilityUtilisationCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int)
- facilityQueueCount :: MonadDES m => Facility m a -> Event m Int
- facilityQueueCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int)
- facilityTotalWaitTime :: MonadDES m => Facility m a -> Event m Double
- facilityWaitTime :: MonadDES m => Facility m a -> Event m (SamplingStats Double)
- facilityTotalHoldingTime :: MonadDES m => Facility m a -> Event m Double
- facilityHoldingTime :: MonadDES m => Facility m a -> Event m (SamplingStats Double)
- facilityInterrupted :: MonadDES m => Facility m a -> Event m Bool
- seizeFacility :: MonadDES m => Facility m a -> Transact m a -> Process m ()
- releaseFacility :: MonadDES m => Facility m a -> Transact m a -> Process m ()
- preemptFacility :: MonadDES m => Facility m a -> Transact m a -> FacilityPreemptMode m a -> Process m ()
- returnFacility :: MonadDES m => Facility m a -> Transact m a -> Process m ()
- resetFacility :: MonadDES m => Facility m a -> Event m ()
- facilityCountChanged :: MonadDES m => Facility m a -> Signal m Int
- facilityCountChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityCaptureCountChanged :: MonadDES m => Facility m a -> Signal m Int
- facilityCaptureCountChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityUtilisationCountChanged :: MonadDES m => Facility m a -> Signal m Int
- facilityUtilisationCountChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityQueueCountChanged :: MonadDES m => Facility m a -> Signal m Int
- facilityQueueCountChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityWaitTimeChanged :: MonadDES m => Facility m a -> Signal m (SamplingStats Double)
- facilityWaitTimeChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityHoldingTimeChanged :: MonadDES m => Facility m a -> Signal m (SamplingStats Double)
- facilityHoldingTimeChanged_ :: MonadDES m => Facility m a -> Signal m ()
- facilityChanged_ :: MonadDES m => Facility m a -> Signal m ()
Facility Type
Represents a GPSS Facility entity.
Instances
MonadDES m => Eq (Facility m a) Source # | |
MonadDES m => ResultProvider (Facility m a) m Source # | |
Defined in Simulation.Aivika.Trans.GPSS.Results resultSource :: ResultName -> ResultDescription -> Facility m a -> ResultSource m # resultSource3 :: ResultName -> ResultDescription -> ResultDescription -> Facility m a -> ResultSource m # resultSource' :: ResultName -> [ResultName] -> ResultId -> [ResultId] -> Facility m a -> ResultSource m # |
data FacilityPreemptMode m a Source #
The facility preemption mode.
FacilityPreemptMode | |
|
type FacilityPreemptTransfer m a = Transact m a -> Maybe Double -> Process m () Source #
Proceed with the computation by the specified preempted transact and remaining time from the process holding computation such as the ADVANCE block.
Creating Facility
Facility Properties
facilityCount :: MonadDES m => Facility m a -> Event m Int Source #
Return the current available count of the facility.
facilityCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int) Source #
Return the statistics for the available count of the facility.
facilityCaptureCount :: MonadDES m => Facility m a -> Event m Int Source #
Return the current capture count of the facility.
facilityUtilisationCount :: MonadDES m => Facility m a -> Event m Int Source #
Return the current utilisation count of the facility.
facilityUtilisationCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int) Source #
Return the statistics for the utilisation count of the facility.
facilityQueueCount :: MonadDES m => Facility m a -> Event m Int Source #
Return the current queue length of the facility.
facilityQueueCountStats :: MonadDES m => Facility m a -> Event m (TimingStats Int) Source #
Return the statistics for the queue length of the facility.
facilityTotalWaitTime :: MonadDES m => Facility m a -> Event m Double Source #
Return the total wait time of the facility.
facilityWaitTime :: MonadDES m => Facility m a -> Event m (SamplingStats Double) Source #
Return the statistics for the wait time of the facility.
facilityTotalHoldingTime :: MonadDES m => Facility m a -> Event m Double Source #
Return the total holding time of the facility.
facilityHoldingTime :: MonadDES m => Facility m a -> Event m (SamplingStats Double) Source #
Return the statistics for the holding time of the facility.
facilityInterrupted :: MonadDES m => Facility m a -> Event m Bool Source #
Whether the facility is currently interrupted.
Seizing-Releasing and Preempting-Returning Facility
:: MonadDES m | |
=> Facility m a | the requested facility |
-> Transact m a | the transact that tries to seize the facility |
-> Process m () |
Seize the facility.
:: MonadDES m | |
=> Facility m a | the facility to release |
-> Transact m a | the active transact that tries to release the facility |
-> Process m () |
Release the facility by the active transact.
:: MonadDES m | |
=> Facility m a | the requested facility |
-> Transact m a | the transact that tries to preempt the facility |
-> FacilityPreemptMode m a | the Preempt mode |
-> Process m () |
Preempt the facility.
:: MonadDES m | |
=> Facility m a | the facility to return |
-> Transact m a | the active transact that tries to return the facility |
-> Process m () |
Return the facility by the active transact.
Statistics Reset
Signals
facilityCountChanged :: MonadDES m => Facility m a -> Signal m Int Source #
Signal triggered when the facilityCount
property changes.
facilityCountChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityCount
property changes.
facilityCaptureCountChanged :: MonadDES m => Facility m a -> Signal m Int Source #
Signal triggered when the facilityCaptureCount
property changes.
facilityCaptureCountChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityCaptureCount
property changes.
facilityUtilisationCountChanged :: MonadDES m => Facility m a -> Signal m Int Source #
Signal triggered when the facilityUtilisationCount
property changes.
facilityUtilisationCountChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityUtilisationCount
property changes.
facilityQueueCountChanged :: MonadDES m => Facility m a -> Signal m Int Source #
Signal triggered when the facilityQueueCount
property changes.
facilityQueueCountChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityQueueCount
property changes.
facilityWaitTimeChanged :: MonadDES m => Facility m a -> Signal m (SamplingStats Double) Source #
Signal triggered when the facilityTotalWaitTime
and facilityWaitTime
properties change.
facilityWaitTimeChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityTotalWaitTime
and facilityWaitTime
properties change.
facilityHoldingTimeChanged :: MonadDES m => Facility m a -> Signal m (SamplingStats Double) Source #
Signal triggered when the facilityTotalHoldingTime
and facilityHoldingTime
properties change.
facilityHoldingTimeChanged_ :: MonadDES m => Facility m a -> Signal m () Source #
Signal triggered when the facilityTotalHoldingTime
and facilityHoldingTime
properties change.