queue {gsse401} | R Documentation |
This function simulates a stochastic process describing number of subjects in a queue.
queue(lambda, rho, n, plot = TRUE) plot(queue)
lambda |
a numeric values for the arrival parameter. If not provided, a prompt is issue. |
rho |
a numeric value for the services parameter. If not provided, a prompt is issue. |
n |
an integer value of the number of arrivals. If not provided, a prompt is issue. |
plot |
logical. If TRUE plot is automaticaly produced. |
The function queue
returns
a (2n+1) x 2 matrix with columns
corresponding to cumulative times and number in the queue
respectively. The class queue
is assigned.
The function plot.queue
takes an object of the class
queue
and produces a plot of numbers em{vs} times.
Peter J. Diggle p.diggle@lancaster.ac.uk
Paulo Justiniano Ribeiro Jr. p.ribeiro@lancaster.ac.uk.
queue(20, 20, 200) # q1 <- queue(.6, .5, 50, plot = FALSE) q1 plot(q1) # # For an interactive input type: queue()