probability-0.2.4.1: Probabilistic Functional Programming

Safe HaskellSafe-Inferred

Numeric.Probability.Example.Queuing

Contents

Description

Model:

one server serving customers from one queue

Synopsis

Documentation

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 aSource

decrease served customers remaining time by specified amount

mTimeStep :: Int -> Queue a -> IntSource

time until next completion

random

type REvent a = (a, RProfile)Source

type REvents a = [REvent 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

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