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 queue
print(x, ...)
# S3 method for queue
plot(
x,
print = TRUE,
gap = NULL,
line.width = 2,
line.colors = NULL,
line.colours = line.colors,
...
)
# S3 method for queue
summary(object, probs = NULL, probs.decimal.places = 2, ...)
# S3 method for summary.queue
print(x, ...)
# S3 method for summary.queue
plot(
x,
print = TRUE,
count = FALSE,
bar.colors = NULL,
bar.colours = bar.colors,
...
)
Number of service facilities at the amenity (positive integer)
Vector of arrival-times for the users (non-negative numeric values)
Vector of (intended) use-times for the users (non-negative numeric values)
Vector of maximum-waiting-times for the users (non-negative numeric values)
Revival-time for service facilities
Closure-time for new arrivals (no new arrivals allowed)
Closure-time for new services (no new services allowed)
Closure-time for all services (all existing services are terminated)
a queue
object
further arguments passed to or from other methods.
plotting paramaters
summary quantiles to be included in output.
rounds the output to specified number of decimal places.
absolute or relative frequencies
plotting parameters
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
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).
# NOT RUN {
q <- queue(2, 4:6, 7:9)
summary(q)
plot(q)
plot(summary(q))
# }
Run the code above in your browser using DataLab