erlang macro giving wrong required agents vs. calls forecasted

tundra

New Member
Joined
Nov 24, 2010
Messages
17
How come using the erlang method, when I have 0 (zero) calls, it is giving me a requirement of 1 agent?

here's the macro for the erlang used:
ublic Function AgentsASA(ASA As Single, CallsPerHour As Single, AHT As Integer) As Long
'Copyright © T&C Limited 1996, 1999, 2001
'Calculate the number of agents required to service a given number of calls to meet the average speed of answer
' ASA is the Average Speed of Answer in seconds
' CallsPerHour is the number of calls received in one hour period
' AHT is the call duration including after call work in seconds e.g 180
Dim BirthRate As Single, DeathRate As Single, TrafficRate As Single
Dim Erlangs As Single, Utilisation As Single, C As Single, AnswerTime As Single
Dim NoAgents As Long, MaxIterate As Long, Count As Long
Dim Server As Single
On Error GoTo AgentAError
If ASA < 0 Then ASA = 1
BirthRate = CallsPerHour
DeathRate = 1800 / AHT
'calculate the traffic intensity
TrafficRate = BirthRate / DeathRate
'calculate the number of Erlangs/hours
Erlangs = Fix((BirthRate * (AHT)) / 1800 + 0.5)
'start at number of agents for 100% utilisation
If Erlangs < 1 Then NoAgents = 1 Else NoAgents = Int(Erlangs)
Utilisation = TrafficRate / NoAgents
'now get real and get number below 100%
While Utilisation >= 1
NoAgents = NoAgents + 1
Utilisation = TrafficRate / NoAgents
Wend
MaxIterate = NoAgents * 100
'try each number of agents until the correct ASA is reached
For Count = 1 To MaxIterate
Server = NoAgents
Utilisation = TrafficRate / NoAgents
C = ErlangC(Server, TrafficRate)
AnswerTime = C / (Server * DeathRate * (1 - Utilisation))
If (AnswerTime * 1800) <= ASA Then Count = MaxIterate
If Count <> MaxIterate Then NoAgents = NoAgents + 1
Next Count

AgentAExit:
AgentsASA = NoAgents
Exit Function

AgentAError:
NoAgents = 0
Resume AgentAExit
End Function
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top