genMM1 {boodd} | R Documentation |
Generate an M/M/1 Queue Process
Description
Simulates an M/M/1 queue process. The M/M/1 queue is a single-server queue with Poisson arrivals and exponential service times. Allows to introduce an artificial outlier.
Usage
genMM1(n, lambda, mu, out = NULL)
Arguments
n |
An integer value; the length of the process to simulate. |
lambda |
A positive numeric value; rate parameter for the Poisson arrival process. |
mu |
A positive numeric value; rate parameter for the exponential service times. |
out |
A positive numeric value; the value of an outlier appearing
at time |
Details
The M/M/1 waiting time is defined as follows
X_{t+1} = \max(0, (X_t + U_t - V_t))
,
where U_t
and V_t
are exponentially distributed random variables with
parameters lambda
and mu
, respectively.
Value
A numeric vector of length n+1
, representing the waiting time of
customer i
arriving at time T_i
.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Asmussen, S. (1987). Applied Probability and Queues. Springer N.Y.
See Also
Examples
queue = genMM1(100,1,2)
plot(queue, type="l")