C19-SmartQ: Applying Real-Time Multi-Organization Queuing Management System Using Predictive Model to Maintain Social Distancing

—COVID-19 is a pandemic crisis that has introduced new norm to the world where we are not encouraged to be in 3C areas, namely crowded place, confined space, and close conservation. We must also ensure that we are at least one meter apart from one another at all time even while queuing. The queuing process can be seen at any organization that offer services. Adhering to the new norm can be a challenge for organization such as banks, hospitals, and government offices when the number of clients waiting in queue increases while in confined space. On the client’s side, they must go through the queue process of obtaining a queue number ticket and then wait to be served in confined and some-times crowded space every time they require a service. The queue process will be repeated at different premise. This study proposes real-time multi-organiza-tionsC19-SmartQ system which use predictive modelling to generate single or consecutive queue number tickets for any client requiring services from two different organizations located within the same building. C19-SmartQsystemman-ages queues thus administer social distancing and streamline queues to reduce waiting periods and improve service efficiency. To ensure operability of C19-SmartQ system, itwas tested on the functionality and web server speed performance. The web server speed performance results show that data transfer and web loading were stable since there was only an increase of 0.2 seconds or 0.08% as the number of users per session increases. In the future, the system can be designed to accommodate queuing for more organizations located within the same building. Machine learning can also be integrated in the system to improve the predictive modelling based on current environment at each organization.


Introduction
COVID-19 has been announced as a pandemic on 12th March 2020 by the World Health Organization (WHO). This was due to the growth in the number of cases reported around the globe. One of the measures to reduce the impact of this pandemic is to practice social distancing. In view of this, the Ministry of Health Malaysia (MOH) recommends social distancing measures by ensuring the physical space between individuals is one meter apart [19][ [21] while avoiding 3C area which are crowded place, confined space, and close conservation. Adhering to the new norm can be a challenge for organization such as banks, hospitals, and government offices when the number of clients waiting in queue, increase rapidly while in confined space. Commencing social distancing is the determining factor for clients to engage with a business [24].
Queue management systems (QMS) are practically used in numerous institutions and commercial enterprises creating a challenge for the intelligent environments in smart cities [13]. The queue process can be seen in any organizations that offer services, where people or goods wait in line from the time of arrival until they leave the premise [5]. Queue occurs when a group of people shared mutual interest on a service at the same time frame but is unable to receive a synchronous service. The concept of queue management system is to minimizes the length of queues, shorten the waiting time or service time, and increase the level of satisfaction of service [13]. Presently, at organizations like Road Transport Department Malaysia (JPJ) and Tabung Haji (TH) located in Urban Transformation Centre (UTC) building, the waiting area is usually crowded with long queue of clients waiting for services. These organizations are still using the conventional queuing system where the clients are expected to be physically present at the premise to get the queueing numbers and must wait before being serviced.
Most of the organization operates their own independent QMS without having online features such as real-time website, mobile application, digital queue number tickets, and geo-fencing [3]. With the current queuing process, clients may face the inconvenience of having to be physically present at the organization's premise to obtain the queue number ticket and then wait to be served in confined and sometimes crowded space. The queuing process will be repeated at different premise. This conventional queuing system may become more problematic as the number of clients increases. According to [26], clients who are required to queue are considered delay-sensitive where their decision to queue are influenced by the delay in both waiting time and service time. The delay that occurs in waiting time and service time during queuing process can be used to analyse client's satisfaction on the service supplied [20]. It is necessary for the service provider to design an efficient QMS that can manage high average of customers in queue and use the same server platform to manage and calculate the estimated time for clients to be served.If the organizations can collaborate and develop an integrated online QMS, where the clients can reserve or book their queueing number for one or more organizations based on the specific time that they want to get serviced, this will allow the client to avoid waiting in crowded and confined spaces [17].
This study proposes C19-SmartQ, a real-time multi-organizations QMS. The objective is to generate real-time single or consecutive queue number ticket(s) for multiorganizations and estimate the queue waiting time using predictive modelling. A single centralized server is configured to manage the queuing process and predictive modelling is applied to estimate the client's waiting time at each queue location. The dedicated server plays a major role as multi-organization QMS data centre to produce the queuing number for clients in real-time through web or mobile application. To ensure operability of C19-SmartQ, it was tested on the functionality and web server speed performance.The target users of this system are organizations that used QMS, and the end user of this system are clients of the organizations. Tabung Haji and Road Transport Department Malaysia (JPJ) offices at UTC Melaka was selected as our stakeholder in this study.

Review of Literatures
In this section, we describe the queuing management system, the queuing theory, waiting line model and related works.

a. Queuing Management System (QMS)
Queue management system (QMS) is a technique of managing waiting line or crowd intended for a service in ordered manner where the crowd or waiting line occurred due to the demand exceeding the supply that can be provided by service provider [4][7] and high waiting time [16]. The queue represents the number of customers waiting to be served, where the waiting line can be finite or infinite [8]. The primary aim for the QMS is to minimize waiting time [4] [13], provide high quality service [1][4] [16] and maintaining high client satisfaction level which is essential especially to the private sector [7].
QMS can aide decision making through recording, predicting, and calculation of the queuing pattern such as the client's arrival rate, average waiting time, peak hours, and queuing behavioral over time [3]. The management of the client's process flow guarantees elimination or reduction of the queues as well as the economic benefits which follow the clients' satisfaction of the better service quality [13]. A queue system which allow people to queue from their home, or much comfortable place than the crowded waiting room, is high in demand [17] [24].

b. Queuing Theory
Queuing theory is a study of waiting time in all process of the queue line. There are several queuing models to present queuing system [10]. There are numbers of method available as a solution for managing the queue such as physical barriers like stanchions [13] [14], kiosk based ticketing system [7][ [14] and mobile queuing [7] where user be able to queue virtually via mobile device. Each solution has their advantages and disadvantages over the other where the business model determined the effectiveness of each solution [14].
The waiting line is defined as a line of clients awaiting products or services. To manage this line, understanding the queue discipline [10] [14] and the behavior of the clients is needed [14]. Common types of queue discipline are First in First Out (FIFO), Last in First Out (LIFO), Service in Random Order (SIRO) and Priority Selection. Refer to Table 1 for more detail about the queue discipline. Clients are serviced in the order of arrival, and the client with the longest wait time is serviced first. This is the most usual case of queue discipline. Last in, first out (LIFO) The opposite of FIFO: the client with the shortest delay time is serviced first. Service in random order (SIRO) Clients are randomly chosen from the waiting line.

Priority selection
Clients are selected from the queue based on the established priority process. A patient with a serious injury is attended to earlier than a patient with no wounds.

c. Waiting Line Model
The waiting line is a term used when the number of clients arriving is more than the number of clients that can be served, and this term is also known as queue [9]. Wait time is affected by the design of the waiting line system [26]. A waiting line system (or queuing system) is defined by two elements: the population source of its clients and the process or service system itself [6]. The service system is characterized by the number of waiting lines, the number of servers, the arrangement of the servers, the arrival and service patterns, and the service priority rules [14].
As shown in Fig. 1, single channel or single stations of queuing have only one station that delivers a service to the clients. A single-channel, single-phase system has only one server [10] [14]. The single server queuing model is the simplest model which was first derived by Kendall and it is also known as Kendall's notation [10]. Another consideration is using one server chain in which the clients wait for a server in the constant time and leaving the system if the service has not started during that time which various service rates and impatient clients [12].
On that point are also schemes that use a single host or channel with multiple system. A single-channel, multi-phase system has one server and a multi-step servicing process [10] [14]. For example, [22] considered a single server retrial queuing system with bulking and feedback under multiple working systems and the steady-state probability producing function for the size of the system is found using the supplementary variable method.
Multiple servers on the other hand, are a combination of some of the individual servers. Multiple-channel in queuing theory is a complex channel rather than single-channel [10]. For multiple server system, there are two types, which is multi-channel singlephase system and multi-channel, multi-phase system [14]. A multi-channel singlephase system has several servers and a one-step servicing process [10] [14]. For example, airline ticket counters with separate queues for business class and economy class passengers. Then, a multi-channel, multi-phase system has several servers and a multistep servicing process [10] [14]. Refer to Fig. 1 for the summary of the waiting line model.

d. Predictive Modelling
Predictive model is a model used to predict and calculate waiting time, delay time and service time for clients. Predictive modeling uses the statistics of queuing method information to predict outcomes [23]. Regularly prediction involves future events, therefore predictive modeling can be applied to many types of unknown event, regardless of when it occurred [15]. Depending on definitional boundaries, predictive modeling is often synonymous or overlapped with the field of machine learning, as it is more commonly referred to in academic research and development contexts [15][23] [25]. Predictive modelling is used where a client gives a dynamic update on the expected waiting time, as implemented by the mobile ticket dispensing [3] [7]. When deployed commercially, predictive modeling is often referred to as predictive analytics. For predicting of the queuing system, there are four independent variables which are the number of servers (NS), mean arrival load (AL), target session length (SL) and the coefficient of variation of service times (CV) [3] [25].

e. Review of Related Works
To understand the queue management system, several related projects have been identified and reviewed.
[4] analyzed and implemented several approaches for predicting the expected waiting time by using attendance time history of a store, and how it could be evolved in the future. The goal must always be to shorten queues and a very fast, attentive service. [4] used the FCFS (first come first serve) service model which means the first client to arrive is the first client to be served. To accomplish the process of analysis and prediction, the researchers used several data mining techniques and models applied over a real data sample, like extracting from the service records maintained in the store's operational system.
The current trend of QMS is moving toward creating an intelligent smart system that can evaluate, process and propose solution to users using the Internet of Things (IoT) network [8][13] [17]. [13] Propose an intelligent queue management system for a large store. The pro-active and context driven QMS comprises of multiple sensors and devices. The system collects client's behavior and historical data to generate and propose actions that will support client's decision. [8] Studies the queuing systems in bank by also integrating Internet of Things (IoT) concept by using infrared sensors technologies to detect, count and monitor clients entering and exiting the bank premise. Their study focuses on the functionality and operation of the IoT system. Their prototype aims to notify the clients on the status of the current queue at the bank. When compared to [13][8] also applies the pro-active method of an intelligent system that can update users on the status of queue in real time. [17] Also proposes an IOT-based smart queue reservation system for medical center with the flexibility of the queue reservation to be done as either online or offline. The system allows users to queue from anywhere if they have internet connection.

Methodology
There are four phases involved, namely requirement analysis, design, development, and testing and analysis. Each phase must be completed before the next phase can proceed and there is no task overlapping in the phases. The outcome of the previous phase acts as the input for the next phase sequences.

a. Requirement Analysis
Requirement analysis is the first phase of this study that describe the project background, technology, software, and hardware used in the development. All the information was retrieved from multiple resources such as journal and the internet. A study on related work by other researcher was also conducted to get an insight on the advantages and disadvantages of their project that may be improvised and adapted to fit in with our study.

b. Design
At the design phase, three main activities were accomplished for C19-SmartQ which are designing the use case diagram, flowcharts for both user and admin, system architecture, and mock user interface design.
Use Case and Flowcharts: Fig. 2 shows the activities involved in the C19-SmartQ system. Based on Fig. 2, there are 4 types of user for the C19-SmartQ system which are online client, walk-in client, administrator at JPJ and administrator at TH. The online client and administrators need to register or login first to the system. Then both online and walk-in client can continue to book the queue number ticket while administrator can continue to use the system to call the next client at their counter. In the booking ticket process, a client can choose to take ticket for just one organization or two tickets for two organizations consecutively. The client also can update their details in the system. Then, the client and the administrator may log out from the system. Fig. 3 shows the flow of processes that can be executed by user and admin in C19-SmartQ, respectively. The flowchart on the left shows the process that executed by a user while the flowchart on the right shows the process that can be executed by the administrator or staff in the organization.  System Architecture: Fig. 3 shows the architecture of C19-SmartQ. C19-SmartQ is developed as an online service, therefore the web server will connect to the internet service provider (ISP). The Admin at organizations (namely TH and JPJ) will also have online access as well since all the process such as calculation will be done at the server. The C19-SmartQ system is implemented on a single centralized physical server which included the web server, application server, and database server. A web development tool, LAMP stack, is used to construct the server.
C19-SmartQ is implemented in a client-server architecture where clients can request and receive services from a centralized server. Centralized server means that many clients can request and receive services from a server. Software applications for centralize server connect with field equipment and controllers while updating the real-time and relational databases [2]. Real-time processing involves a continual input, process, and output. Smartphone (via mobile application) or computer (via web application) provides an interface to request services from server and display the results received from the server. This server would store and process data from client in real-time. The mobile application development is explained in [3].  Fig. 4, is designed to illustrate the flow from one interface to another interface that will be used by end users. In this case, a web application interface will be used as intermediary between the client and the system.

c. Development
The development of C19-SmartQ involves server configuration (including software installation and predictive modelling), database configuration, web application development (including graphical user interface) and mobile application [3].

Predictive modelling
Predictive modelling is used to calculate total waiting time. Client requesting a queue number ticket is required to give estimated arrival time to the building before the C19-SmartQ system can generate queue number ticket(s) and predicts the waiting time. The pseudocode is shown in Fig. 5. The formula used is declared as such:  =Average service rate at each channel.

S =Total client in line.
W=Total waiting time.
Formula to get Total waiting time:S x =W Fig. 6. Pseudocode of predictive modelling in the C19-SmartQ

Testing
The testing and analysis phase is important to identify and rectify errors and loopholes in this system. Two types of testing were done, functionality testing and web speed performance testing [11][18] [27]. Functionality testing focused on the function of all the buttons and process in the system, while web speed performance testing focused on the load time of web application as the number of users increases. The result of the testing must meet the entire user requirement that has been stated at the beginning of the development process. All faults and failure found during testing will be fixed before we can proceed to the next phase.

Result and Analysis
This section discusses the results and findings for the C19-SmartQ project.

a. Graphical User Interface of C19-SmartQ
C19-SmartQ provides an interactive graphical user interface (GUI) in both web application and mobile application. Fig. 4 illustrates the GUI that has been developed for C19-SmartQ.

b. Functionality Testing
The aim of functionality testing is to ensure the core function of C19-SmartQ operates without failure. There are 24 testing modules developed to test C19-SmartQ. The result shows that C19-SmartQ is functioning as expected without any failure.

Functionality testing of web application
The results of functionality testing on web application are presented in Table 2. The landing page shows login form and top navigation bar.

Result
Pass Pass Login Admin Module 2 Admins need to fill the form to login by inserting email and password.

Result
Pass Pass Module 3 The system will pop out "Wrong Username or Password" if the input inserted by admin does not match with the database.

Result
Pass Pass Module 4 The system will pop out "Please fill out this field" if user click login while the form is empty. Admin able to click top navigation bar Sign Out, then return to landing page.

Result
Pass Pass

Module 10
Admin able to change their profile detail.

Result
Pass Pass

Module 11
Admin able to view queue detail / log.

Module 12
Admin able to search client activities log.  Table 3 shows the result of integration between web application and mobile application. The Mobile Application front page shows login form and register button.

Result
Pass Pass Module 2 The system will pop out "Username or password incorrect" if inserted input does not match.

Result
Pass Pass

Module 3
Authentication for client fully functions.

Web speed performance testing
The aim of this web speed performance testing is to analyze the loading time of the web application as the number of users increases. GTmetrix was used as a tool to test the web speed. The test was set up starting from only one user, and gradually increased to five users in a session. Table 4 shows the result of this test. The results show that data transfer and web loading were stable since there was only an increase of 0.2 seconds or 0.08% as the number of users per session increases from 1 to 5 users.

Conclusion
C19-SmartQ is a real-time multi-organization queue management system that manages and calculated waiting time using predictive algorithm. The accuracy for queue length and waiting time prediction enhances the user experience in queuing process. The waiting time prediction also allows the clients to plan and avoid having to wait in crowded and confined spaces thus able to maintain social distancing. C19-SmartQ system manages queues thus administer social distancing and streamline queues to reduce waiting periods and improve service efficiency. Similar to the work of Gimba et al.  2017), C19-SmartQ is a smart queuing management system that applies real-time processing. The system is flexible since client can request for queue number tickets through web application or mobile application. Comparing to Carvalho & Belo (2016) studies, C19-SmartQ system also collects and process client's data to predicts queuing waiting time. However, in C19-SmartQ system, clients have the option of getting queue number ticket and waiting time prediction for just a single organization or multi-organizations consecutively.
The result of functionality test shows that C19-SmartQ passed all the functionality test modules. In addition, the results of the web speed performance test show that the web server can maintain a stable service while increasing the load of users from 1 user to 5 users. The increment on loading time is only 0.08 %. However, there are several limitations of this study due to several factors such as duration of study, cost, and technical aspect. First, this web application does not validate user registration, which may trigger security or privacy issues on user identity. The validation process helps to confirm the authenticity of users and their email address. Next, the developed system only allows the user to book a queue number ticket at the current time and get information on the expected waiting time before being served. Users are unable to pre-book their queuing slot at a specific and convenient time. The system also did not consider the probability of delay in service time by the service provider.
This system is recommended to be used at Urban Transformation Centre (UTC) due to various organizations located there. In the future, the system can be designed to accommodate queuing for more organizations located within the same building. A preliminary study on users' perception of the C19-SmartQ system as a social distancing tool can also be done. The C19-SmartQ can use the social media authentication for the user's registration, which will make login much simpler and convenience to the user since the mobile application can retrieve user information for registration automatically without user having to fill in the form manually. Another recommendation is to create a push notification to notify user on the status of their queue. Machine learning can also be integrated in the system to improve the predictive modelling based on current environment at each organization.