lag_step: Add lag to vector of arrival times.

View source: R/core_queuefunctions.R

lag_stepR Documentation

Add lag to vector of arrival times.

Description

Add lag to vector of arrival times.

Usage

lag_step(arrivals, service)

Arguments

arrivals

Either a numeric vector or an object of class queue_list. It represents the arrival times.

service

A vector of service times with the same ordering as arrivals

Value

A vector of response times for the input of arrival times and service times.

See Also

wait_step, queue_step.

Examples

# Create arrival times
arrivals <- rlnorm(100, meanlog = 3)

# Create service times
service <- rlnorm(100)
lag_step(arrivals = arrivals, service = service)

# lag_step is equivalent to queue_step with a large number of queues, but it's faster to compute.

cbind(queue(arrivals, service = service, servers = 100),
lag_step(arrivals = arrivals, service = service))

queuecomputer documentation built on Nov. 16, 2022, 1:07 a.m.