queue | R Documentation |
queue
returns queuing information for users and service facilities.
queue( n, arrive, use.full, wait.max = NULL, revive = 0, close.arrive = Inf, close.service = Inf, close.full = Inf ) ## S3 method for class 'queue' print(x, ...) ## S3 method for class 'queue' plot( x, print = TRUE, gap = NULL, line.width = 2, line.colors = NULL, line.colours = line.colors, ... ) ## S3 method for class 'queue' summary(object, probs = NULL, probs.decimal.places = 2, ...) ## S3 method for class 'summary.queue' print(x, ...) ## S3 method for class 'summary.queue' plot( x, print = TRUE, count = FALSE, bar.colors = NULL, bar.colours = bar.colors, ... )
n |
Number of service facilities at the amenity (positive integer) |
arrive |
Vector of arrival-times for the users (non-negative numeric values) |
use.full |
Vector of (intended) use-times for the users (non-negative numeric values) |
wait.max |
Vector of maximum-waiting-times for the users (non-negative numeric values) |
revive |
Revival-time for service facilities |
close.arrive |
Closure-time for new arrivals (no new arrivals allowed) |
close.service |
Closure-time for new services (no new services allowed) |
close.full |
Closure-time for all services (all existing services are terminated) |
x, object |
a |
... |
further arguments passed to or from other methods. |
print, gap, line.width, line.colors, line.colours |
plotting paramaters |
probs |
summary quantiles to be included in output. |
probs.decimal.places |
rounds the output to specified number of decimal places. |
count |
absolute or relative frequencies |
bar.colors, bar.colours |
plotting parameters |
This function computes takes inputs giving the arrival times and (intended) use times for a set of users at an amenity, plus the number of service facilities at the amenity. The function computes full information on the use of the facilities by the users, including their waiting time, actual use time, leaving time, and the facility that was used by each user.
In addition to the required inputs, the function also accepts inputs for a maximum-waiting time for each user; if the user waits up to this time then the user will leave without service. The user can also impose closure times on new arrivals, new services, or termination of services.
**Note:** Service facilities are assumed to be allocated to users on a "first-come, first-served" basis; in the event that more than one service facility is available for a user then the user is allocated to facilities first-to-last based on the facility number (i.e., the allocation favours the earlier facilities and it is not exchangeable with respect to the facility number).
If all inputs are correctly specified then the function will return a list of class queue
containing queuing information for the users and service facilities
q <- queue(2, 4:6, 7:9) summary(q) plot(q) plot(summary(q))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.