Developing a \’Queue Management System\’

This post is going to be a bit different since it is going to be of a different category as opposed to what I have been writing about. The other day, I have felt the desire to create something and after some brainstorming, I got the idea of developing a queue waiting management system to truly understand the systematic logic behind them and come up with ways to improve them.

What is a queue waiting management system?

A queue management system is a solution that provides better service to customers, it is generally used in banks and restaurants. The way it works is that it provides the customer with a ticket (code) that uniquely identifies the customer. It then places the ticket into a virtual queue alongside other tickets. Depending on how the business works, it may be a first-come first-serve business where it would start from the earliest ticket to the latest one (this is the one I decided to create) or it could be dependent on other factors.

\"\"

An example as to when it could be dependent on other factors is McDonald\’s, each receipt generates a ticket. From what I have noticed, they generally carry out simpler orders first, but also respecting time. It would not make sense for you to wait more for an ice-cream just because your ticket is at the end of the queue list considering that it can be prepared within a few seconds.

Why did I decide to work on this project?

Personally, I wanted to enhance my programming skills by working on projects I may see around me or come up with. I also have some interest in knowing how some things work and try to enhance them one way or the other.

How did I work on this project?

I used Python 3 and some libraries such as tkinter, random and pyttsx3 which provided some aid with refining the project and which gave it a sweet touch.

What did I do to develop this project?

Firstly, I started by constructing my first script which was the script that would generally be at the front desk where one would generate their ticket. I picked out a format which started of with \”CC\” and then used the random library to generate a 4 digit number which then I conjoined with the \”CC\”. Some examples would be the following:

  • CC3289
  • CC9283
  • CC2385
  • CC0234
  • CC1287

I also thought about adding data validation to ensure that the tickets would not be the same as the tickets already present, I decided not to considering that this was a personal project and I could utilize that time and effort into enhancing the project another way.

I then proceeded with file handling using python where I generated a text file that is going to hold all the tickets. Basically, every time a ticket is generated, it gets added to that text file which I used as a database for all the different tickets.

I also used tkinter to display the number on an interface to make it more user friendly. Some improvements I was thinking about adding in the future is an SMS feature which is going to send out the ticket in an SMS to the customer\’s phone number. Email is another method that can be used as well.

I started working on the second script, the idea I had in mind is to have the customer\’s script ready for them to interact with as soon as they enter through the door, and have the other script to be used by the employee to help manage the tickets with the click of a button.

Thinking about it now, this can also be used on digital spaces that may offer digital services which would require queue management rather than just purely physical places.

As for the second script, I used file handling to read the first line of the text file and then have pyttsx3 turn it into speech and play it out loud. The SMS and email features could also be implemented here. The first line of text is only read once the employee hits the \”Next\” button I made using tkinter. Once the \”Next\” button is pressed, the following is carried out:

  • First line is read from text file
  • First line is displayed
  • First line is read out loud using pyttsx3
  • First line is deleted

The last step makes the second line become the first line, it may be a cheap way to do it but it works. This keeps repeating until the employee stops pressing the \”Next\” button or when the text files runs out of tickets.

The cool thing about this project was seeing the text file simultaneously being edited, seeing tickets added on the text file by the customers and seeing them get called out and deleted by the employee.

These are some ways I was thinking of improving the program:

  • A better user-interface
  • Keeping track of exactly how many tickets there are
  • Providing an approximate waiting time for the customer
  • Generating more scripts for employees so more than once can manage
  • Sending out the tickets to different employees
  • Transferring the ticket from one employee to another
  • Using web-apps and the internet
  • Using SMS and email to send out the tickets to customers

2 thoughts on “Developing a \’Queue Management System\’”

  1. Derin D. Shinto

    An extremely clear and written post, that conveys how and why you’ve done each step allowing for the reader to also not lose track. Inevitably, all businesses based particularly in the service industry will require some sort of queue management system in the future. QMS system could also have other implication especially if its utilized to average out how long each customer has to wait for instance in a bank for service.

    1. Thank you so much Derin for taking the time to read my blog post. I do indeed think that QMS systems are going to have a greater presence in the future considering the rate that digitalization is increasing at.

Leave a Comment

Your email address will not be published. Required fields are marked *