I need to use Erlang B and Erlang C formulas in python script.
- Erlang B
- Erlang C
How can I write these formulas in Python?
I need to use Erlang B and Erlang C formulas in python script.
How can I write these formulas in Python?
Try looking for a scientific python library like scipy :=)
from math import factorial
def ErlangB (E, m):InvB = 1.0for j in range(1, m+1):InvB = 1.0 + InvB * (j/E)return (1.0 / InvB)def ErlangC(A, N):L = (A**N / factorial(N)) * (N / (N - A))sum_ = 0for i in range(N):sum_ += (A**i) / factorial(i)return (L / (sum_ + L))
( According to wikipedia pseudo-code)