queue {gsse401}R Documentation

GSSE 401 - 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)

plot(queue)

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.

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 gsse401 version 0.0-8 Index]