probability-0.2.5: Probabilistic Functional Programming

Safe HaskellSafe-Inferred
LanguageHaskell98

Numeric.Probability.Example.Queuing

Contents

Description

Model:

one server serving customers from one queue

Synopsis

Documentation

type Time = Int Source

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

mEvent :: Int -> Time -> Events a -> Queue a -> [State a] Source

multiple servers

mServe :: Int -> Int -> Queue a -> Queue a Source

decrease served customers remaining time by specified amount

mTimeStep :: Int -> Queue a -> Int Source

time until next completion

random

type REvent a = (a, RProfile) Source

type REvents a = [REvent a] Source

rSystem :: Int -> REvents a -> T (System 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 b Source

unit :: b -> ((), b) Source

evaluation

allWaiting :: Ord a => Int -> System a -> [a] Source