#Server farm with queue. A server farm is composed of K servers. Let represents the number of incoming requests per second. Let the number of attended requests per second. If the servers are busy the request is delayed (request in queue). This behaviour is represented as an M/M/K queue.
The following code implements the Erlang-C formula. This file must be saved in the same project folder.
erlang.py file:
M/M/K code
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-10-237f8c003de5> in <module>()
2 from scipy.stats import expon
3 import numpy as np
----> 4 from erlang import erlangC
5
6 global request_delayed #solicitud retrasada
ImportError: No module named erlang
Assignments
Understand the code. From the code identify , and .
Include in the code theoretical ,,,.
Include in the code simulated ,,,.
Find the number of servers needed to obtain a delay probability (Use http://www-ens.iro.umontreal.ca/~chanwyea/erlang/erlangC.html):
or
or
Verify the previous results by simulation.
Include a for loop in the main program (simulation time = 1000) int order to repeat the experiment 10 times (where or ). Find the average delay probability after the 10th experiment.