The formulas in this Python script implement the simple queueing models described in Chapter 6 of Banks, Carson, Nelson and Nicol, Discrete-Event System Simulation, 5th edition.
This project was a conversion of a macro-enabled VBA document created by Professor Barry Nelson.
Supported Queues:
- M/G/1
- M/M/c
- M/G/c
- M/M/c/N
- M/M/c/K/K
Input Parameter Definitions:
lmda
: "λ" i.e. arrival ratemu
: "μ" i.e. service ratec
: number of serverssigma2
: "σ2" i.e. variance of service timen
: system capacity, including customers in servicek
: size of calling population
Output Parameter Definitions:
rho
: "ρ" i.e. utilizationl
: mean number in systemw
: mean time in systemwq
: mean time in queuelq
: mean number in queuep0
: probability of empty systemlmda_effective
: "λeffective" i.e. effective arrival rate
Usage Examples:
After import queueing as q
:
rho, l, w, wq, lq, p0 = q.eval_MG1(lmda=1.125, mu=2.35, sigma2=0.2)
rho, l, w, wq, lq, p0 = q.eval_MMc(lmda=3.6, mu=2.15, c=3)
rho, l, w, wq, lq = q.eval_MGc(lmda=5.42, mu=2.18, c=3, sigma2=0.56)
rho, l, w, wq, lq, p0, pN, lmda_effective = q.eval_MMcN(lmda=12.98, mu=3.47, c=4, n=15)
rho, l, w, wq, lq, p0, lmda_effective = q.eval_MMcK(lmda=2.65, mu=1.2, c=5, k=6)