probability-0.2.2.1: Probabilistic Functional ProgrammingSource codeContentsIndex
Numeric.Probability.Example.Queuing
Contents
random
evaluation
Description

Model:

one server serving customers from one queue

Synopsis
type Time = Int
type Profile = (Time, Time)
type Event a = (a, Profile)
type Queue a = [(a, Time)]
type State a = (Queue a, Time)
type System a = [([a], Time)]
type Events a = [Event a]
event :: Time -> Events a -> Queue a -> [State a]
system :: Events a -> System a
mEvent :: Int -> Time -> Events a -> Queue a -> [State a]
mServe :: Int -> Int -> Queue a -> Queue a
mTimeStep :: Int -> Queue a -> Int
mSystem :: Int -> Events a -> System a
type RProfile = (Dist Time, Trans Time)
type REvent a = (a, RProfile)
type REvents a = [REvent a]
rSystem :: Int -> REvents a -> T (System a)
rBuildEvents :: REvents a -> T (Events a)
rmSystem :: Ord a => Int -> Int -> REvents a -> RDist (System a)
evalSystem :: (Ord a, Ord b) => Int -> Int -> REvents a -> (System a -> b) -> RDist b
unit :: b -> ((), b)
maxQueue :: Ord a => System a -> Int
allWaiting :: Ord a => Int -> System a -> [a]
countWaiting :: Ord a => Int -> System a -> Int
waiting :: Int -> System a -> Time
inSystem :: System a -> Time
total :: System a -> Time
server :: Int -> System a -> Time
idle :: Int -> System a -> Time
idleAvgP :: Int -> System a -> Float
Documentation
type Time = IntSource
type Profile = (Time, Time)Source
(servingTime, nextArrival)
type Event a = (a, Profile)Source
type Queue a = [(a, Time)]Source
customers and their individual serving times
type State a = (Queue a, Time)Source
(customers waiting,validity period of that queue)
type System a = [([a], Time)]Source
type Events a = [Event a]Source
event :: Time -> Events a -> Queue a -> [State a]Source
system :: Events a -> System aSource
mEvent :: Int -> Time -> Events a -> Queue a -> [State a]Source
multiple servers
mServe :: Int -> Int -> Queue a -> Queue aSource
decrease served customers remaining time by specified amount
mTimeStep :: Int -> Queue a -> IntSource
time until next completion
mSystem :: Int -> Events a -> System aSource
random
type RProfile = (Dist Time, Trans Time)Source
type REvent a = (a, RProfile)Source
type REvents a = [REvent a]Source
rSystem :: Int -> REvents a -> T (System a)Source
rBuildEvents :: REvents a -> T (Events a)Source
rmSystem :: Ord a => Int -> Int -> REvents a -> RDist (System a)Source
evalSystem :: (Ord a, Ord b) => Int -> Int -> REvents a -> (System a -> b) -> RDist bSource
unit :: b -> ((), b)Source
evaluation
maxQueue :: Ord a => System a -> IntSource
allWaiting :: Ord a => Int -> System a -> [a]Source
countWaiting :: Ord a => Int -> System a -> IntSource
waiting :: Int -> System a -> TimeSource
inSystem :: System a -> TimeSource
total :: System a -> TimeSource
server :: Int -> System a -> TimeSource
idle :: Int -> System a -> TimeSource
idleAvgP :: Int -> System a -> FloatSource
Produced by Haddock version 2.4.2