aivika-5.7: A multi-method simulation library

Simulation.Aivika.Internal.Arrival

Description

Tested with: GHC 8.0.1

This module defines the types and functions for working with the events that can represent something that arrive from outside the model, or represent other things which computation is delayed and hence is not synchronized.

Therefore, the additional information is provided about the time and delay of arrival.

Synopsis

# Documentation

data Arrival a Source #

It defines when an 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.

Another use case is a situation when the actual event is not synchronized with the Event computation, being synchronized with the event queue, nevertheless. Then the arrival is used for providing the additional information about the time at which the event had been actually arrived.

Constructors

 Arrival FieldsarrivalValue :: athe data we received with the eventarrivalTime :: Doublethe simulation time at which the event has arrivedarrivalDelay :: Maybe Doublethe delay time which has passed from the time of arriving the previous event

Instances

 Eq a => Eq (Arrival a) Source # Methods(==) :: Arrival a -> Arrival a -> Bool #(/=) :: Arrival a -> Arrival a -> Bool # Ord a => Ord (Arrival a) Source # Methodscompare :: Arrival a -> Arrival a -> Ordering #(<) :: Arrival a -> Arrival a -> Bool #(<=) :: Arrival a -> Arrival a -> Bool #(>) :: Arrival a -> Arrival a -> Bool #(>=) :: Arrival a -> Arrival a -> Bool #max :: Arrival a -> Arrival a -> Arrival a #min :: Arrival a -> Arrival a -> Arrival a # Show a => Show (Arrival a) Source # MethodsshowsPrec :: Int -> Arrival a -> ShowS #show :: Arrival a -> String #showList :: [Arrival a] -> ShowS #