Skip to content

Instantly share code, notes, and snippets.

@pengelbrecht
Created September 12, 2014 14:36
Show Gist options
  • Save pengelbrecht/647f1d5c98a2e45780e7 to your computer and use it in GitHub Desktop.
Save pengelbrecht/647f1d5c98a2e45780e7 to your computer and use it in GitHub Desktop.
# Formulas from http://www.mitan.co.uk/erlang/elgcspsh.htm
#input
n = 80 # number of calls
t = 8*60*60 # period length in seconds
d = 4.5*60 # call duration in seconds
M = 2 # number of agents
s = 20 # target SLA in seconds
# Output
U = d * n/t # traffic intensity
o = U/M # agent occupancy
Ec = dpois(M,U)/(dpois(M,U) + (1 - o)*ppois(M-1,U))
ASA = Ec * d / (M * (1-o))
SL = 1 - Ec * exp(-(M-U)*s/d)
# plan
# Use stats API to get info from last 7d, output table of asa/SL for various M (agent numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment