If you don’t operate a call center you’ve probably never heard of the Erlang-C formula, or “Erlang,” a unit of measure having to do with average number of concurrent calls. If you operate a call center, then Erlang-C calculations can be primary to managing your business. It’s all about balancing the number of agents against call volume, to optimize cost and response time. Erlang-C calculations are covered well here.
This post covers how to translate the Erlang-C formulas into Visual Basic, for use in a Microsoft Excel spreadsheet, or Access database, for example.
The first thing you need is a factorial function. This is easy enough:
Function factorial(n As Long)
If (n <= 0) Then
factorial = 1
factorial = n * factorial(n – 1)
Then calculating Erlang-C is relatively straightforward, given a number of agents m and traffic intensity u, it looks like:
Function CalcErlangC(m As Long, u As Double) As Double
Dim CalcErlangC_Nom As Double
Dim CalcErlangC_Dom As Double
Dim i As Long
CalcErlangC_Nom = (u ^ m) / factorial(m)
i = 0
CalcErlangC_Dom = 0
Do Until i = m – 1
CalcErlangC_Dom = CalcErlangC_Dom + (u ^ i) / factorial(i)
i = i + 1
CalcErlangC_Dom = CalcErlangC_Nom + (1 – u / m) * CalcErlangC_Dom
CalcErlangC = CalcErlangC_Nom / CalcErlangC_Dom
That’s it! How have you used Erlang-C in your software solutions?