 | probability-0.2.1: Probabilistic Functional Programming | Contents | Index |
|
| Numeric.Probability.Example.Queuing |
|
|
|
|
| Description |
Model:
one server serving customers from one queue
|
|
| Synopsis |
|
|
|
| Documentation |
|
| type Time = Int |
|
| type Profile = (Time, Time) |
| (servingTime, nextArrival)
|
|
| type Event a = (a, Profile) |
|
| type Queue a = [(a, Time)] |
| customers and their individual serving times
|
|
| type State a = (Queue a, Time) |
| (customers waiting,validity period of that queue)
|
|
| 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] |
| multiple servers
|
|
| mServe :: Int -> Int -> Queue a -> Queue a |
| decrease served customers remaining time by specified amount
|
|
| mTimeStep :: Int -> Queue a -> Int |
| time until next completion
|
|
| mSystem :: Int -> Events a -> System a |
|
| random
|
|
| 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) |
|
| evaluation
|
|
| 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 |
|
| Produced by Haddock version 2.1.0 |