{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module Simulation.Aivika.Trans.GPSS.Results.Transform where
import Control.Category
import Simulation.Aivika.Trans
import qualified Simulation.Aivika.Trans.Results.Transform as T
import qualified Simulation.Aivika.Trans.GPSS.Queue as Q
import qualified Simulation.Aivika.Trans.GPSS.Facility as F
import qualified Simulation.Aivika.Trans.GPSS.Storage as S
import Simulation.Aivika.Trans.GPSS.Results
import Simulation.Aivika.Trans.GPSS.Results.Locale
newtype Queue m = Queue (ResultTransform m)
instance T.ResultTransformer Queue m where
tr :: Queue m -> ResultTransform m
tr (Queue ResultTransform m
a) = ResultTransform m
a
queueNull :: Queue m -> ResultTransform m
queueNull :: Queue m -> ResultTransform m
queueNull (Queue ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueNullId
queueContent :: Queue m -> ResultTransform m
queueContent :: Queue m -> ResultTransform m
queueContent (Queue ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueContentId
queueContentStats :: Queue m -> T.TimingStats m
queueContentStats :: Queue m -> TimingStats m
queueContentStats (Queue ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueContentStatsId)
enqueueCount :: Queue m -> ResultTransform m
enqueueCount :: Queue m -> ResultTransform m
enqueueCount (Queue ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
enqueueCountId
enqueueZeroEntryCount :: Queue m -> ResultTransform m
enqueueZeroEntryCount :: Queue m -> ResultTransform m
enqueueZeroEntryCount (Queue ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
enqueueZeroEntryCountId
queueWaitTime :: Queue m -> T.SamplingStats m
queueWaitTime :: Queue m -> SamplingStats m
queueWaitTime (Queue ResultTransform m
a) =
ResultTransform m -> SamplingStats m
forall (m :: * -> *). ResultTransform m -> SamplingStats m
T.SamplingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueWaitTimeId)
queueNonZeroEntryWaitTime :: Queue m -> T.SamplingStats m
queueNonZeroEntryWaitTime :: Queue m -> SamplingStats m
queueNonZeroEntryWaitTime (Queue ResultTransform m
a) =
ResultTransform m -> SamplingStats m
forall (m :: * -> *). ResultTransform m -> SamplingStats m
T.SamplingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueNonZeroEntryWaitTimeId)
queueRate :: Queue m -> ResultTransform m
queueRate :: Queue m -> ResultTransform m
queueRate (Queue ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
queueRateId
newtype Facility m = Facility (ResultTransform m)
instance T.ResultTransformer Facility m where
tr :: Facility m -> ResultTransform m
tr (Facility ResultTransform m
a) = ResultTransform m
a
facilityCount :: Facility m -> ResultTransform m
facilityCount :: Facility m -> ResultTransform m
facilityCount (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityCountId
facilityCountStats :: Facility m -> T.TimingStats m
facilityCountStats :: Facility m -> TimingStats m
facilityCountStats (Facility ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityCountStatsId)
facilityCaptureCount :: Facility m -> ResultTransform m
facilityCaptureCount :: Facility m -> ResultTransform m
facilityCaptureCount (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityCaptureCountId
facilityUtilisationCount :: Facility m -> ResultTransform m
facilityUtilisationCount :: Facility m -> ResultTransform m
facilityUtilisationCount (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityUtilisationCountId
facilityUtilisationCountStats :: Facility m -> T.TimingStats m
facilityUtilisationCountStats :: Facility m -> TimingStats m
facilityUtilisationCountStats (Facility ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityUtilisationCountStatsId)
facilityQueueCount :: Facility m -> ResultTransform m
facilityQueueCount :: Facility m -> ResultTransform m
facilityQueueCount (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityQueueCountId
facilityQueueCountStats :: Facility m -> T.TimingStats m
facilityQueueCountStats :: Facility m -> TimingStats m
facilityQueueCountStats (Facility ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityQueueCountStatsId)
facilityTotalWaitTime :: Facility m -> ResultTransform m
facilityTotalWaitTime :: Facility m -> ResultTransform m
facilityTotalWaitTime (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityTotalWaitTimeId
facilityWaitTime :: Facility m -> T.SamplingStats m
facilityWaitTime :: Facility m -> SamplingStats m
facilityWaitTime (Facility ResultTransform m
a) =
ResultTransform m -> SamplingStats m
forall (m :: * -> *). ResultTransform m -> SamplingStats m
T.SamplingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityWaitTimeId)
facilityTotalHoldingTime :: Facility m -> ResultTransform m
facilityTotalHoldingTime :: Facility m -> ResultTransform m
facilityTotalHoldingTime (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityTotalHoldingTimeId
facilityHoldingTime :: Facility m -> T.SamplingStats m
facilityHoldingTime :: Facility m -> SamplingStats m
facilityHoldingTime (Facility ResultTransform m
a) =
ResultTransform m -> SamplingStats m
forall (m :: * -> *). ResultTransform m -> SamplingStats m
T.SamplingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityHoldingTimeId)
facilityInterrupted :: Facility m -> ResultTransform m
facilityInterrupted :: Facility m -> ResultTransform m
facilityInterrupted (Facility ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
facilityInterruptedId
newtype Storage m = Storage (ResultTransform m)
instance T.ResultTransformer Storage m where
tr :: Storage m -> ResultTransform m
tr (Storage ResultTransform m
a) = ResultTransform m
a
storageCapacity :: Storage m -> ResultTransform m
storageCapacity :: Storage m -> ResultTransform m
storageCapacity (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageCapacityId
storageEmpty :: Storage m -> ResultTransform m
storageEmpty :: Storage m -> ResultTransform m
storageEmpty (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageEmptyId
storageFull :: Storage m -> ResultTransform m
storageFull :: Storage m -> ResultTransform m
storageFull (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageFullId
storageContent :: Storage m -> ResultTransform m
storageContent :: Storage m -> ResultTransform m
storageContent (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageContentId
storageContentStats :: Storage m -> T.TimingStats m
storageContentStats :: Storage m -> TimingStats m
storageContentStats (Storage ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageContentStatsId)
storageUseCount :: Storage m -> ResultTransform m
storageUseCount :: Storage m -> ResultTransform m
storageUseCount (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageUseCountId
storageUsedContent :: Storage m -> ResultTransform m
storageUsedContent :: Storage m -> ResultTransform m
storageUsedContent (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageUsedContentId
storageUtilisationCount :: Storage m -> ResultTransform m
storageUtilisationCount :: Storage m -> ResultTransform m
storageUtilisationCount (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageUtilisationCountId
storageUtilisationCountStats :: Storage m -> T.TimingStats m
storageUtilisationCountStats :: Storage m -> TimingStats m
storageUtilisationCountStats (Storage ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageUtilisationCountStatsId)
storageQueueCount :: Storage m -> ResultTransform m
storageQueueCount :: Storage m -> ResultTransform m
storageQueueCount (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageQueueCountId
storageQueueCountStats :: Storage m -> T.TimingStats m
storageQueueCountStats :: Storage m -> TimingStats m
storageQueueCountStats (Storage ResultTransform m
a) =
ResultTransform m -> TimingStats m
forall (m :: * -> *). ResultTransform m -> TimingStats m
T.TimingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageQueueCountStatsId)
storageTotalWaitTime :: Storage m -> ResultTransform m
storageTotalWaitTime :: Storage m -> ResultTransform m
storageTotalWaitTime (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageTotalWaitTimeId
storageWaitTime :: Storage m -> T.SamplingStats m
storageWaitTime :: Storage m -> SamplingStats m
storageWaitTime (Storage ResultTransform m
a) =
ResultTransform m -> SamplingStats m
forall (m :: * -> *). ResultTransform m -> SamplingStats m
T.SamplingStats (ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageWaitTimeId)
storageAverageHoldingTime :: Storage m -> ResultTransform m
storageAverageHoldingTime :: Storage m -> ResultTransform m
storageAverageHoldingTime (Storage ResultTransform m
a) =
ResultTransform m
a ResultTransform m -> ResultTransform m -> ResultTransform m
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> ResultId -> ResultTransform m
forall (m :: * -> *). ResultId -> ResultTransform m
resultById ResultId
storageAverageHoldingTimeId