aivika-realtime-0.1.2: Soft real-time simulation module for the Aivika library

CopyrightCopyright (c) 2016 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Simulation.Aivika.RealTime.QueueStrategy

Contents

Description

Tested with: GHC 8.0.1

This module defines some queue strategy instances for the RT computations.

Orphan instances

(MonadComp m, MonadIO m) => QueueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Associated Types

data StrategyQueue (RT m :: * -> *) SIRO a :: * #

(MonadComp m, MonadIO m) => QueueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

(MonadComp m, MonadIO m) => QueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Associated Types

data StrategyQueue (RT m :: * -> *) LCFS a :: * #

(Monad m, MonadComp m, MonadIO m) => QueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Associated Types

data StrategyQueue (RT m :: * -> *) FCFS a :: * #

(QueueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => DequeueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Methods

strategyDequeue :: StrategyQueue (RT m) SIRO a -> Event (RT m) a #

(QueueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => DequeueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

(QueueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => DequeueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Methods

strategyDequeue :: StrategyQueue (RT m) LCFS a -> Event (RT m) a #

(QueueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => DequeueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Methods

strategyDequeue :: StrategyQueue (RT m) FCFS a -> Event (RT m) a #

(DequeueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) SIRO Source #

A template-based implementation of the SIRO queue strategy.

Methods

strategyEnqueue :: StrategyQueue (RT m) SIRO a -> a -> Event (RT m) () #

(DequeueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Methods

strategyEnqueue :: StrategyQueue (RT m) LCFS a -> a -> Event (RT m) () #

(DequeueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Methods

strategyEnqueue :: StrategyQueue (RT m) FCFS a -> a -> Event (RT m) () #

(DequeueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) SIRO a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) SIRO a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) SIRO a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) SIRO a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

(DequeueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) LCFS a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) LCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) LCFS a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) LCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) FCFS a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) FCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) FCFS a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) FCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => PriorityQueueStrategy (RT m) StaticPriorities Double Source #

An implementation of the StaticPriorities queue strategy.