M-M-1 queue with state-dependent admission (source code)

= M-M-1 queue with state-dependent admission
{c}

If potential arrivals form a Poisson process of rate $\lambda$ and an arrival seeing $n$ customers joins with probability $p(n)$, the queue length is a <birth-death process> with birth rate $b_n=\lambda p(n)$ and death rate $d_n=\mu$ for $n\geq1$. Its stationary ratios, when normalizable, are
$$
\frac{\pi_{n+1}}{\pi_n}=\frac{\lambda p(n)}\mu.
$$