queue {pad}R Documentation

PAD - Simulation of a Queueing process

Description

This function simulates a stochastic process describing number of subjects in a queue.

Usage

queue(lambda, rho, n, plot = TRUE)

## S3 method for class 'queue':
plot(x, ...)

Arguments

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.
x an output of the function queue.
... unused.

Value

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.

Author(s)

Peter J. Diggle p.diggle@lancaster.ac.uk
Paulo Justiniano Ribeiro Jr. p.ribeiro@lancaster.ac.uk.

Examples

queue(20, 20, 200)
q1 <- queue(.6, .5, 50, plot = FALSE) 
q1
plot(q1)
# For an interactive input type:
## Not run: 
queue()
## End(Not run)

[Package pad version 0.1-2 Index]