Saturday, November 26, 2022
Google search engine
HomeUncategorizedQueuing Behavior Analysis in M/M/1 and M/M/m Queuing System in AI

Queuing Behavior Analysis in M/M/1 and M/M/m Queuing System in AI

What is M/M/1 and M/M/m Queuing Models?

The queuing system usually consists of one or more servers that can deliver the required services request based on the queue formed by these requests. The concept of queuing is usually used where queues are formed due to the limited resources.  To handle this situation, different queuing models have been developed which can create an equilibrium in providing service to customers while increasing the usage of available resources. There are lot of daily life related examples that can be considered as queuing systems, such as cash withdrawal service of banks, factory or products manufacturing plants, car maintenance workshops, telecommunications industry or computers and so on. There are three main components in a queuing system: Arrival Method; Service procedure; Discipline Queue. 

Arrival Method

Arrival of data from one or more different sources it may referred as the calling data or population. The calling data can be less or more it depends. 

Service procedure 

This component of the queuing scheme is identified by the number of different servers working in the system. In this mechanism either the server has its own dedicated queue or multiple servers have their own queue or a common queue for all of them.

Discipline Queue 

In this component or model of queue, a rule is generally defined that determines how a server will entertain the upcoming data or customer requests. When a server will complete the service from current customer then if there is any more customers in the queue then according to the defined rule it pick up the customer who has priority than others. Following are some commonly used queue disciplines:

  1. FIFO – Data or requests will be served as the first-in first-out manner. 
  2. LIFO – Data or requests will be served as the last-in first-out method. 
  3. Priority – Data or requests will be served as priority basis of their service requirements.

Model of M/M/1 and M/M/m

According to the theory of queue, M/M/1 queue represents the queue size in a system where single server is working. Data arrival requests are determined by a process of Poisson and task completion time which has an exponential distribution. Kendall’s notation represents this model which is a very basic model for theory of queuing and a smart module of study as closed-form terminologies can be obtained for many metrics of interest. If we add at least one more server with this model then it will become the M/M/m queue model. In this model many servers working there, so desired tasks do not need to long wait for its required service. Each task has an exponentially spread facility time. 

ANN use in Behavior of Queuing model?

Artificial Neural Networks (ANN) is the subpart of machine learning which can be used for regression, pattern recognition, clustering and time series forecasting. There are numerous studies that use ANNs as a way of predicting chaotic patterns through a queuing system, one example is financial forecasting.

In order to implement queuing theory for ANN, first step will be to make sure that the selected queuing model follow the distributions. This is can be done by counting the arrival time of every unit and clocking that time according to the served customer. Then next step will be to use the given data for training the ANN model. Finally, the usage of ANN model can be tested for the predicting the behavior of arrival request. In this blog the model is trained on the data from one week and it was then used to develop a model in order to test its response on the next week.

Training algorithm Choice

There are different data training algorithms that can be used for the neural networks training. The Levenberg-Marquardt algorithm (LMA) is the hot favorite algorithm when the training of the ANN network is required. LMA algorithm is the most appropriate method for the normal sized of datasets. Bayesian regularization is also a good choice because it is used for small and noisy data. But LMA produce good results for training dataset and it is more accurate as well. During our research on multiple algorithms it is observed that MATLAB had a great toolbox with it, it is called Neural Network Toolbox, this is a good platform for work in this way. This toolbox is easily use to train the ANN and other algorithms like Bayesian regularization algorithm and Levenberg-Marquardt algorithm and many other.

Collection of Data  

Data collection is a team work not a single man effort. There are lot of data sets that can be chosen in this task for example, number of customers under separate time slots, assessed management times per customer while dealing them, time of queuing etc. The data was collected from three years back from today. However, due to the slow procedure of getting permission from the different firms we have got only 140 days data not more than this. The efforts and time and resource are used to collect data from one store. 

Training and Testing of data

The algorithm was designed on networks having different size and delay. The smallest network was consisted of 8 neurons with a minimum delay of 2 while the largest network had 70 neurons with a minimum delay of 60.  The results were evaluated for these different networks in such a way that different initial values and parameters were tuned to get optimal results. The maximum results were obtained with 10 neurons and delay of 8.


The results of the trained model are shown in the figures below. The targets and output in blue are used for training while the green and red targets represent validation and testing. The orange line represents the errors between the actual and the target outputs.

Figure 1: Training and testing on a four-week time span. Customers are at y-axis, time-steps are shown on the x-axis

Figure 2: One week’s results are shown as black line. Customers are at y-axis, time-steps are shown on the x-axis

Figure 3: Performance of the network. One day shows as black line.

Figure 4: Errors occurs during the data training in ANN.

Figure 5: The relationship between inputs and outputs

Figure 6: Customers in between February 1 – 3 March.

Figure 7: Customers predicted in February 1 – 3 March.

Figure 8: Representation of one week. The red line is for uneven steps.

Figure 9: Representation of one week, 13th of March to 19th of March.


The study shows that we can predict the customer’s conduct with using the artificial neural network by training our system with the supervised learning algorithms using queuing theory. it could be used to optimize staff scheduling. However, to ensure the accuracy more testing and training data is required to improve the overall performance. If more data will available the more training will possible on the neural network and then more accurate testing will be possible.



Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular