how can i write a function file for the time congestion engset formula

the code should plot the blocking probability against number of channels such that the probability decreases as the number of channels increase.

Answers (1)

Hi Dan,
I maintain code to compute the blocking probability in the Engset model, which can be found at https://github.com/parsiad/fast-engset. The MATLAB/GNU Octave part is no longer included in new releases, so you will have to download a previous release. Instructions are below:
  • Download the zip file https://github.com/parsiad/fast-engset/archive/v1.0.zip
  • Extract the file `fast_engset.m` from the zip file to a location of your choice
  • Run MATLAB/GNU Octave and cd to the location of `fast_engset.m`
  • Run the following example to plot the blocking probability as a (decreasing) function of the number of channels:
N = 20 % Number of sources
m_list = 0:N % Number of servers (a.k.a. channels)
alpha = 0.2 % Offered traffic from a SINGLE source
E = N * alpha % Total offered traffic from ALL sources
% Blocking probability
P = zeros(size(m_list));
for m = m_list
P(m+1) = fast_engset(m, N, E);
end
% Plot
plot(m_list, P, '--ok');
xlabel('Number of channels');
ylabel('Blocking probability');
The resulting plot is shown below.
I should point out that the MATLAB/GNU Octave version of this code is unmaintained (for example, the ability to pass in parameters as vectors is not available, though one could easily update the code to allow this). The Python version is maintained and can be installed via pip by simply running
pip install fast_engset
Lastly, if you would like to use the code in an academic work, please consider citing the corresponding journal paper:
Azimzadeh, Parsiad, and Tommy Carpenter. "Fast Engset computation." Operations Research Letters 44.3 (2016): 313-318.
@article{azimzadeh2015fast,
title={Fast Engset computation},
author={Azimzadeh, Parsiad and Carpenter, Tommy},
journal={Operations Research Letters},
volume={44},
number={3},
pages={313--318},
year={2016},
issn={0167-6377},
doi={10.1016/j.orl.2016.02.011},
url={http://dx.doi.org/10.1016/j.orl.2016.02.011}
}

Categories

Asked:

Dan
on 1 May 2014

Edited:

on 31 Aug 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!