Home » Posts tagged 'Time in the Queue'

# Tag Archives: Time in the Queue

## Calculation of the time in the queue with multiple resources

The previous session was based on the idea, that there was only one resource (one machine, one worker, one physician) doing all the work (m = 1). But what happens if the capacity is determined by more than one resource? **Calculating waiting times with multiple resources involved** makes it possible to derive **staffing plans** – or to, in other words, answer the highly important question of how many resources will need to be put to work in order to meet a waiting time requirement.

The time in the queue with multiple resources is calculated as follows:

*time in queue (for multiple m)*

* = (activity time / m) * (utilization ^ (square ((2(m-1))-1) / 1- utilization)) * ((Cv_a^2 + Cv_p^2) / 2)*

* = p / m * (u ^ (square ((2*(m-1)-1) / 1-u) * ((Cv_a^2 + Cv_p^2) / 2)*

If the time in the queue is known, Little’s law allows the calculation of the inventory:

*inventory in queue = flow rate in queue (= 1 /a) * time in queue*

* inventory in process = utilization (u) * number of resources (m)*

* inventory in total = inventory in queue + inventory in process*

**Devising a staffing plan**

How many employees will it take to keep the average waiting time for a certain service under a minute? A simple way of answering such a question and coming up with a staffing plan is doing the calculation of the time in the queue and to then manipulate the number of employees until a certain average waiting time is met. When seasonal demand (**seasonality**) is to be observed, the calculation has to be redone for every time slice of the day, week or month in consideration.

## Calculation of the time in the queue / waiting time

The **time in the queue** is calculated as follows:

*time in queue = activity time * (utilization / 1 – utilization) * ((Cv_a^2 + Cv_p^2) / 2)*

with:

activity time = service time factor (average processing time p)

(utilization / 1 – utilization) = utilization factor

((Cv_a^2 + Cv_p^2) / 2) = variability factor

Since the utilization factor is calculated as (u / 1-u), this means that as the waiting time gets higher, the utilization gets closer and closer to 1. The formula for the time in the queue always delivers an average value. This so-called waiting time formula can only be used if the demand is lower than the capacity. If the demand is higher than the capacity, the waiting time will ultimately not be driven by variability, but rather by insufficient capacity.

The **total flow time** of a flow object can be calculated as:

*total flow time = time in the queue + processing time*