*Language version. The whole script with comments is in Slovak language (v 1.0.0). Translation to English language is on its way.
The purpose of this LiveScript is to simulate M/M/N queuing system, where N is the number of servers and queues with unlimited space for customers. There are 4 variables that needs to be defined by user:
N = number of servers and queues ( N of servers = N of queues)
Tk = time duration of simulation in minutes
mi0 = arrival rate in minutes/customer arrival, i.e. mi0 = 0,5 -> customer arrives every 30 sec
mi1 = service rate in minutes/customer served, i.e. mi1 = 2,5 -> customer is served in 2 minutes and 30 sec
The arrival and service rates are not static, but they are distributed by an exponential distribution. The random seed of rand in exponential distribution is managed by rng(44) at the start of the script.
The script is divided into sections by their purpose. The first section serves to set parameters by user. This is the only section where user should edit variables. Then there is pre-allocation section, with approximation pre-allocation of some vectors. Third is simulation section. Fourth is vector edit section. Vectors that have been approximately pre-allocated are here trimmed. Fifth section contains text outputs. Sixth section contains graph outputs with gpu parallelization enabled.
Variable names in text outputs:
ppc(i) - average number of customers in queue(i) at any time of simulation
maxf(i) - maximum number of customers in queue(i) at time
vetappz - average number of customers in the whole system at any time
cpz - total number of customers in system
maxpz - maximum number of customers in system at time
pvl(i) - average workload of server(i) in %
pcc(i) - average waiting time in queue(i)
NC - total number of served customers
Graph descriptions in graphic outputs:
% Vývoj počtu zákazníkov vo fronte
The number of customers in queue(i) displayed over time
% Obsadenosť linky v čase
The workload of server(i) over time
% Vývoj počtu zákazníkov v systéme
The number of customers in the whole system over time
Viliam Mojský (2019). M/M/N queuing system (https://www.mathworks.com/matlabcentral/fileexchange/72299-m-m-n-queuing-system), MATLAB Central File Exchange. Retrieved .