# Erlang A Formula Calculator

This script evaluates the performance measures (service level, delay probability, abandonment ratio and average waiting time) of a queueing system using the Erlang A formula. The difference with Erlang C is that Erlang A includes customer abandonments. Each customer has an exponentially distributed random patience time. A customer abandons (and exits) the queue when his waiting time exceeds his patience time. Because of abandonments, this queueing system is always stable.
There are also different ways to define the service level. Our program offers two service level formulas and an approximation formula based on diffusion equations (see details in performance measures section).

See the instructions for usage details.

## Program setup

SL1 SL2 SLD
hour minute second
yes no
10. Evaluate with number of servers (minimum is 1)
11. Find minimum servers for service level target (must be between 0 and 100)

## Instructions

Consider the following M/M/c+M queueing model: Poisson arrival process, exponential service time and exponential patience time. This queueing system is always stable because of customer abandonments. Also due to abandonments, there are different ways to account the customers that abandoned in the service level (SL) function. Our program offers 2 exact formulas (SL1 and SL2) for the SL and one approximative formula (SLD) based on diffusion equations. The choice of an exact or approximative SL formula will also decide on whether this program will use the exact or approximate formulas for the other performance measures (abandonment ratio, delay probability and average waiting time). The approximative formulas are taken from the paper of Garnett, Mandelbaum and Reiman (2002). In the exact formulas, the waiting queue has limited capacity, whereas the capacity is unlimited in the approximate formula.

### Available performance measures

The performance measures returned by this program are:

• Service level (SL): This measure is defined as the expected ratio of customers that waited less or equal to the acceptable waiting time $$t$$. There are different ways to account the abandonned customers that waited at most time $$t$$ in the computation of the SL. Let $$y$$ be the number of servers, $$X(y, t)$$ the number of served customers that waited at most $$t$$ and $$G(y,t)$$ the number of abandoned customers that waited at most $$t$$ as functions of $$y$$ and $$t$$, $$A$$ the total number of customers, and $$\mathbb{E}$$ the expected value operator in statistics. There are three SL formulas available in this program:
• SL1: The customers that abandoned but waited at most $$t$$ are excluded from the service level. $$\textrm{SL1}(y, t) = \frac{\mathbb{E}[X(y, t)]}{\mathbb{E}[A - G(y,t)]}.$$
• SL2: The customers that abandoned but waited at most $$t$$ are counted as having received a "good" quality of service. $$\textrm{SL2}(y, t) = \frac{\mathbb{E}[X(y, t) + G(y,t)]}{\mathbb{E}[A]}.$$
• SLD: An approximation of SL2 based on diffusion equations. This formula is taken from the paper of Garnett, Mandelbaum and Reiman (2002).
Note that SL1 ≤ SL2.
SL1 corresponds to the performance measure SERVICELEVEL and SL2 corresponds to the performance measure SERVICELEVEL2 in the ContactCenters library. See their user's guide for additional details.
The exact formulas SL1 and SL2 have the disadvantage that they are not tractable with respect to the size of the queueing system. These formulas may fail to compute the SL if the number of states (number of servers + queue capacity + 1) or the traffic load (arrival rate multiplied by the average service time) are very large. For queues with large traffic load or number of states, we suggest to use the approximative formula SLD.
• Delay probability: The probability that a new customer will have to enter the waiting queue because all servers are busy. This is also equal to the proportion of customers that join the waiting queue.
• Abandonment ratio: The proportion of customers that abandoned the queue without receiving service.
• The average waiting time of a customer (including served and abandoned customers).

### Descriptions of the input parameters

The parameters for this program are:
1. Arrival rate: The average number of customers that arrive per time unit. For example, 5.7 customers per minute.
2. Average service time: The average time duration that a server takes to serve one customer. This is the inverse of the service rate. For example, an average service time of 10.5 minutes per customer.
3. Average patience time: The average time duration that a customer is willing to wait in the queue. For example, an average of 5.2 minutes per customer.
4. Acceptable waiting time: This is the waiting time threshold of the service level (SL) measure. For example, the acceptable waiting time can be 20 seconds.
5. Queue capacity: The maximum size of the waiting queue. When the queue is full, all new customers are blocked. This parameter must be a non-negative integer. For better algorithm efficiency, this number should not be much larger that the size of the load (arrival rate multiplied by the average service time). This parameter affects only the exact formulas (SL1 and SL2). The queue size is assumed to be unlimited in the approximate formula (SLD).
6. Service level formula: Select the service level formula to use, see performance measures. Choosing an exact formula (SL1 or SL2) or the approximate SLD will also decide on the choice of either exact or approximate formulas for the other performance measures (delay probability, abandonment ratio and average waiting time).
7. Average waiting time unit: Select the time unit of the average waiting time results.
8. Display graph outputs: Select "yes" to display the result table in graphic charts. This option requires a browser that supports HTML5 and Javascript. Use the parameter "Server range output" to control the number of points in the charts.
Note this feature is unstable for Internet Explorer 8 and older.
9. Server range output: Allows to evaluate the performance measures for multiple number of servers. Let $$R$$ be this parameter and $$S$$ the given number of servers, then the program will evaluate the performance measures for all servers between $$(S-R)$$ and $$(S+R)$$. Parameter $$S$$ can be given by the user (parameter #10) or found by minimizing the number of servers for a given service level target (parameter #11). For example, if this range is set at 5 and the number of servers to evaluate is set at 10, then the program will evaluate the performance measures for 5 to 15 servers.
This parameter must be a non-negative integer.
10. Evaluate: If this option is selected, then pressing the "Execute" button will compute the performance measures using the Erlang A formula for the given number of servers. Performance measures for nearby number of servers can also be computed by setting the parameter "Server range output". The number of servers must be integer and the minimum value is 1.
11. Find minimum servers: If this option is selected, then pressing the "Execute" button will order the program to find the minimum number of servers required to attain a service level (SL) equal or higher than the given SL target. Let $$Y$$ be this number and $$T$$ the SL target. Then, $$Y = \min \{ y : \textrm{SL}(y,t) \ge T, y \in \mathbb{N} \},$$ where the service level function $$\textrm{SL}(y,t)$$ and acceptable waiting time $$t$$ are described in the performance measures, and $$\mathbb{N}$$ is the set of natural numbers. Parameter #6 determines the choice of the SL formula. The program will evaluate the performance measures at $$Y$$ and around $$Y$$, like with the "Evaluate" option. The service level target parameter must be between 0 and 100%, inclusively.
For example, set this parameter to 80 and the acceptable waiting time (parameter #3) to 20 seconds to find the minimum number of servers needed for a service level of at least 80% with a waiting time threshold of 20 seconds.

## References

. . , edn., () : chap. , . .