Calculate Waiting List Sizes by Time Waited
calc_wl_sizes.Rd
This function applies the available capacity, defined by the geometric
distribution and the total capacity, and updates a data frame representing
the waiting list, by time waited, by calculating the waiting list size
(wlsize
) and the number of serviced items (sigma
) for each time
compartment waited.
Details
For each row in wl_removals
, the function computes the new waiting
list size based on the previous size, the removal rate, and the number
serviced. If the computed size is positive, it is assigned to wlsize
and
sigma
is set to the serviced value. If not, wlsize
is set to zero and
sigma
is set to the floored value of the previous size after removal.
Examples
if (FALSE) { # \dontrun{
wl_removals <- data.frame(r = c(0.1, 0.2), service = c(5, 3))
calc_wl_sizes(wl_removals, referrals = 50)
} # }