as.server.list: Creates a '"server.list"' object from a list of times and...

View source: R/utils.R

as.server.listR Documentation

Creates a "server.list" object from a list of times and starting availability.

Description

Creates a "server.list" object from a list of times and starting availability.

Usage

as.server.list(times, init)

Arguments

times

list of numeric vectors giving change times for each server.

init

vector of 1s and 0s with equal length to times. It represents whether the server starts in an available (1) or unavailable (0) state.

Value

an object of class "server.list", which is a list of step functions of range {0, 1}.

See Also

as.server.stepfun, queue_step

Examples

# Create a server.list object with the first server available anytime before time 10,
# and the second server available between time 15 and time 30.
as.server.list(list(10, c(15,30)), c(1,0))

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