Loss Networks
Analysis of networks with blocking.
The lossn module implements algorithms for loss networks where arrivals can
be blocked when resources are unavailable.
Key function categories:
Erlang fixed-point:
lossn_erlangfp()
Loss Network Analysis Algorithms.
Native Python implementations for analyzing loss networks using Erlang formulas and related methods.
- Key algorithms:
lossn_erlangfp: Erlang fixed-point algorithm for loss networks erlang_b: Erlang B blocking probability erlang_c: Erlang C delay probability
- lossn_erlangfp(nu, A, c, tol=1e-8, max_iter=1000)[source]
Erlang fixed point approximation for loss networks.
Calls (jobs) on route (class) r arrive according to Poisson rate nu_r. Call service times on route r have unit mean.
- The link capacity requirements are:
sum_r A[j,r] * n[j,r] < c[j]
for all links j, where n[j,r] counts calls on route r on link j.
- Parameters:
- Returns:
qlen: Mean queue-length for each route (R,)
loss: Loss probability for each route (R,)
eblock: Blocking probability for each link (J,)
niter: Number of iterations
- Return type:
Tuple of (qlen, loss, eblock, niter) where
Example
>>> nu = np.array([0.3, 0.1]) >>> A = np.array([[1, 1], [1, 4]]) # 2 links, 2 routes >>> c = np.array([1, 3]) >>> qlen, loss, eblock, niter = lossn_erlangfp(nu, A, c)
- erlang_b(offered_load, servers)[source]
Compute Erlang B blocking probability.
The Erlang B formula gives the probability that an arriving call is blocked in an M/M/c/c loss system.
- Parameters:
- Returns:
Blocking probability.
- Return type:
Example
>>> erlang_b(10.0, 12) # Offered load 10 Erlang, 12 channels 0.1054...
- erlang_c(offered_load, servers)[source]
Compute Erlang C delay probability.
The Erlang C formula gives the probability that an arriving call must wait in an M/M/c queue.
- Parameters:
- Returns:
Delay probability (probability of waiting).
- Return type:
Example
>>> erlang_c(10.0, 12) # Offered load 10 Erlang, 12 agents