Skip to content

Commit

Permalink
Ext Erlang C P(A) fix
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Herzog committed May 19, 2024
1 parent e05e0de commit 0aa129e
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 83 deletions.
164 changes: 82 additions & 82 deletions example_analytic_erlang_c_ext.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion queuesim/analytic/erlang_c_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def PA(self) -> float:
float: Cancelation probability P(A)
"""
p0 = self.pn(0)
return sum([self.__nu / self.__l * (n - self.__c) * p0 * self.Cn(n) for n in range(self.__c + 1, self.__K + 1)])
input_reject = self.pn(self.__K)
return sum([self.__nu / (self.__l * (1 - input_reject)) * (n - self.__c) * p0 * self.Cn(n) for n in range(self.__c + 1, self.__K + 1)])

def Pt(self, t: float) -> float:
"""Probability that clients have to wait t or less seconds ( = extended Erlang C formula)
Expand Down

0 comments on commit 0aa129e

Please sign in to comment.