About The Library
It is a Python library implementing the Queueing theory calculations. As my term paper, I am developing a library, implementing the calculus of queuing theory. This library has the objective of characterising some queuing theory params as the queue arrival rate of clients, attendance rate and others... Implementing in python, this library receives a input file with queue data and gives the output answers. For the undergraduate thesis, I had toke some datas in a real queue and submited to the library as a input, to validate this project.
Files Organization
qtheory
βββ __init__.py
βββ _multiserver.py
βββ multiserver.py
βββ _singleserver.py
βββ singleserver.py
βββ _stats.py
βββ stats.py
βββ _utils.py
βββ README.md
βββ requirements.txt
The Library Data Flow
The Library Usage
It is a main.py exemple using the arrivals resources:
Code
import qtheory as q
import csv
import pandas as pd
def main():
try:
#lΓͺ a hora chegada do arquivo CSV
datafile = open('dados.csv')
df = pd.read_csv(datafile)
arrival_times = df['horachegada'].values
#This is the line numbers in the CSV file
# of the begnings of the evaluation intervals.
intervals_beginning = [0,130,220,385,501]
#Evaluating arrivals data
ans = q.arrivals_per_minutes(arrival_times, intervals_beginning)
print(ans)
ans = q.real_relative_frequencys(arrival_times, intervals_beginning)
print(ans)
ans = q.arrival_theoretical_comparation(arrival_times, intervals_beginning)
print(ans)
except ValueError as err:
print(err.args)
if __name__ == "__main__":
main()