Releases: parsiad/fast-engset
fast-engset
fast-engset
Release notes
💥 API-breaking changes and new features
This version is backwards incompatible with the previous release. A high level overview of the API-breaking changes and new features is given below, but I recommend you to refer to the README for details.
- Change routines to return a
Result(n_iters, status, value)
tuple detailing the number of iterations to convergence, a status code, and the value computed - Add support for choosing the numerical algorithm to use in a routine via the
alg
argument - Add new routines to compute the number of sources (
fe.n_sources
) and the offered traffic (fe.total_traffic
) were added - Rename existing routines to compute the blocking probability (
fe.blocking_prob
) and the number of servers (fe.n_servers
)
🚀 Speed improvements
- Use JIT compilation to get ~10x speedup
📖 Documentation
- New README with in-depth tutorial
🧰 Maintenance
- Add tox to orchestrate linting and testing in both Python 2.7 and 3
- Add 1000s of randomly generated tests
fast-engset
fast-engset
Python code to compute the blocking probability P
in the Engset model:
m
binom{N - 1}{m}M E/N
P = -------------------------- where M = ---------------.
__ m X 1 - E/N(1 - P)
\ binom{N - 1}{X}M
/__ X = 0
N
denotes the number of sources, m
the number of servers, and E
the offered traffic from all sources.
E
is the total offered traffic given by E = N * alpha
, where alpha
is the offered traffic per-source.
Installation
pip install fast_engset
Example
from fast_engset import fe
m = 5 # Number of servers
N = 10 # Number of sources
alpha = 0.2 # Offered traffic from a SINGLE source
E = N * alpha # Total offered traffic from ALL sources
# Blocking probability
P = fe.compute(m, N, E)
fast-engset
fast-engset
Warning: This is a legacy release (for MATLAB/GNU Octave users) that is now unmaintained. Please consider using the Python version (see https://github.com/parsiad/fast-engset/releases for the latest releases), which is actively maintained.
MATLAB/GNU Octave code to compute the blocking probability P
in the Engset model:
m
binom{N - 1}{m}A E
P = -------------------------- where A = -------------.
__ m X N - E(1 - P)
\ binom{N - 1}{X}A
/__ X = 0
N
denotes the number of sources, m
the number of servers, and E
the offered traffic from all sources.
E
is usually given by E = lambda mu
, where lambda
is the arrival rate of all sources and mu
is the mean service time for a given request.
Warning: Certain texts use instead the normalized offered traffic, which is instead defined as E = lambda mu / N
.
m = 5 % Number of servers
N = 10 % Number of sources
E = 2 % Total offered traffic from all sources
% Blocking probability
P = fast_engset(m, N, E)