Copyright | Copyright (c) 2009-2014, David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Tested with: GHC 7.6.3
This module defines the types and functions for working with the external events that usually arrive from outside the model.
Documentation
It defines when an external event has arrived, usually generated by
some random Stream
.
Such events should arrive one by one without time lag in the following sense
that the model should start awaiting the next event exactly in that time
when the previous event has arrived. It usually happens automatically when
using a queueProcessor
with an ability to lost the arrived event if the queue
is full.
Arrival | |
|
data ArrivalTimer Source
Accumulates the statistics about that how long the arrived events are processed.
newArrivalTimer :: Simulation ArrivalTimer Source
Create a new timer that measures how long the arrived events are processed.
arrivalTimerProcessor :: ArrivalTimer -> Processor Arrival Arrival Source
Return a processor that actually measures how much time has passed from the time of arriving the events.
arrivalProcessingTime :: ArrivalTimer -> Event (SamplingStats Double) Source
Return the statistics about that how long the arrived events were processed.