as.server.stepfun {queuecomputer} | R Documentation |
Create a server.stepfun
object with a roster of times and number of available servers.
Description
Create a server.stepfun
object with a roster of times and number of available servers.
Usage
as.server.stepfun(x, y)
Arguments
x |
numeric vector giving the times of changes in number of servers. |
y |
numeric vector one longer than |
Details
This function uses the analogy of a step function to specify the number of
available servers throughout the day. It is used as input to the queue_step
function. Alternatively one may use as.server.list
to specify available servers as
a list, however queue_step
is much faster when as.server.stepfun
is used
as input rather than as.server.list
.
If any of the service times are large compared to any element of diff(x)
then the
as.server.list
function should be used.
Value
A list
and server.stepfun
object with x and y as elements.
See Also
as.server.list
, queue_step
, stepfun
.
Examples
servers <- as.server.stepfun(c(15,30,50), c(0, 1, 3, 2))
servers