Keywords

1 Introduction

Queuing theory is widely used to investigate and manage queue characteristics in a variety of settings, including bank counters, railway counters, super markets, agriculture markets, and sugar mills, among others. The majority of queuing models are built on the assumption that customer arrival rates are lower than the system's service rate. This condition ensures the steady state solution of the governing equations for the model. But there are situations where steady state solution cannot be achieved or does not exist. For example, at a doctor's clinic, where patients are seen for a set length of time, such as 9:00 a.m. to 3:00 p.m. Because the consultation or service process does not last for a long period, the system's long-term behavior cannot be analyzed. In the following scenario, as well as many others, it is possible that the arrival rate exceeds the service rate, causing the system to collapse in the long run and leaving no stable solution. These types of problems can be handled by either limiting the queue system's capacity or increasing the number of servers.

The analysis of non-steady state queue system was accomplished in [1] and the result was achieved by developing computation formula from both symbolic and numeric exact where results are tested against Monte Carlo simulation. Another simple queue model (M/M/1/∞) was implemented in [2] in bank service to improve the optimal service rate.

Complex queues can be solved using simulation. Simulation can be defined as a process of designing a mathematical or artificial model of a real system. The behavior of real system can be examined by performing experiments with the developed model [3]. The Monte Carlo simulation technique converts uncertainties of input variables in the model into probability distributions [4]. To re-form the opportunity distribution in this simulation, you'll need a random number generator [5]. A few of the applications of Monte Carlo queuing system can be found in the hospital [6], in fuzzy queuing theory [7], in traffic light simulation [8], in finance [9], etc. Since the results are derived after performing the repeated experiments based on random numbers, Monte Carlo simulation is very effective and widely accepted for true results.

Arrival and service data for the season 2020–21 (Nov 2020 to May 2021) was collected from The Meham Co-Op. Sugar Mills Ltd., Meham, Haryana. There were no symmetries between arrival and service pattern as shown in Fig. 1.

Fig. 1
figure 1

Arrival and service pattern on seasonal days

The zigzag nature of the arrival and service rates can easily be recognized, indicating that a basic queue model (M/M/1) could not be utilized to describe the queue characteristics. In addition, both the average arrival rate and the average service rate were the same, i.e., 146 trolleys each day. The Monte Carlo simulation approach is used to deal with such a circumstance.

Section 2 discusses the Monte Carlo simulation approach and algorithm used to determine queue characteristics. Section 3 contains the simulation findings. Section 4 discusses the potential for improvement by increasing mill crushing, as well as the consequences. Section 5 contains the work's conclusion.

2 Methodology

According to data collected from the Meham sugar mill for the entire season, a total of 28,128 trolleys carrying 3,168,923.80 qtl of sugarcane arrived and were unloaded between November 19, 2020 and May 30, 2021. There were 193 crushing days in total. Note that the arrival was low in May 2021, and hence the crushing or service was likewise low. So actual performance of mill could not be determined from the data including month of May 2021. For better simulation of mill system, this month's data was omitted and the data of 162 days from November 21, 2020 to May 01, 2021 was utilized. During this period, a total of 3,035,082.6 qtl sugarcane was crushed, with an average of 18,735 qtl each day.

The average daily arrival was 161.42 trolleys, or 6.73 per hour, with an average of 112.44 qtl sugarcane each trolley. Figure 2 shows a day-by-day summary of the weight of sugarcane crushed during these days.

Fig. 2
figure 2

Per day crushing during the season 2020–21

Figure 2 shows that on January 6, 2020 (Day 49) and March 22, 2021(Day 124), there was substantially less crushing. The maximum crushing of 22,906 qtl sugarcane was done on Dec 01, 2020. The mill's full crushing capacity of 25,000 qtl per day has never been reached.

2.1 Monte Carlo Technique

There were three shifts of workers in the sugar mill in Meham: shift 0, shift 1, and shift 2. Shift 0 ran from 6:00 a.m. to 2:00 p.m., shift 1 from 2:00 p.m. to 10:00 p.m., and shift 2 from 10:00 p.m. to 2:00 a.m. Based on the number of arrivals and services in each shift, the possible 40 values of inter-arrival time ranging from 3 to 240 min and the possible 23 values of service time ranging from 6 to 480 min for the trolleys were achieved.

To overcome the problem, an algorithm for Monte Carlo simulation was created as follows:

  1. 1.

    Based on the number of arrivals and services in each shift, determine the inter-arrival time and service time for each trolley.

  2. 2.

    Determine the frequency of inter-arrival times and service durations.

  3. 3.

    Calculate the probability of each value of the inter-arrival and service times.

  4. 4.

    Determine the cumulative probability as well as the boundary/random number interval.

  5. 5.

    For arrivals and services, generate random numbers in the interval (0, 1) uniformly.

  6. 6.

    Calculate arrival time, waiting time, time to enter service, service time, and queue length, etc.

  7. 7.

    Determine the expected values of queue characteristics.

  8. 8.

    Repeat the above process 1000 times for better estimation of queue characteristics.

Figure 3 depicts a flow chart of the steps.

Fig. 3
figure 3

Flowchart of Monte Carlo simulation

The inter-arrival timing, frequency, probability distribution, and random number intervals were determined using the arrival and service data, as shown in Table 1.

Table 1 Random number interval generation for inter-arrival time

Similarly, the service time, frequencies, probability distribution, and random number intervals were determined as shown in Table 2.

Table 2 Random number interval generation for service time

3 Results and Discussion

The trial rows of 26,150 trolleys (arrived in season 2020–21 over the study period) were formed using the random number intervals for cumulative probability of inter-arrival and service time estimated in Tables 1 and 2. We applied the Monte Carlo technique to get the inter-arrival time between two trolleys and the service time of each trolley by uniformly generating 26,150 random numbers in the interval (0, 1). Each of the random number was lying in some of the random interval in the last column of Table 1. Inter-arrival time corresponding to those random intervals was assigned to 26,150 trolleys. Similar procedure was applied to get service time of each trolley. Note that values to the first trolley were not assigned according to random numbers since there was no queue to cause delays in its unloading and other services. Other characteristics of the queues were calculated using the achieved inter-arrival and service times. A few rows from the beginning and finish of the trial rows of 26,150 trolleys were shown in Table 3.

Table 3 Monte Carlo simulation

The aforementioned experiment was repeated 1000 times, with the results displayed in Figs. 4 and 5, respectively, for estimated waiting time (in hours) and expected queue length.

Fig. 4
figure 4

Repetition of average queue length \({L}_{q}\)

Fig. 5
figure 5

Repetition of average waiting time in queue

To determine the final parameters of the queuing system, an average of the estimated waiting time and expected queue lengths was taken. The average of all 1000 experiments was as under.

$$ {\text{Average}}\,{\text{waiting}}\,{\text{time}}\,{\text{in}}\,{\text{queue}} = 3.2891 \sim {3}\,{\text{h}}\,{\text{and}}\,{17}\,{\text{min}} $$
$$ {\text{Average}}\,{\text{queue}}\,{\text{length}} = 23.1416 \sim {23}\,{\text{trolleys}} $$

The average of all the probabilities of associated variables from all 1000 experiments was used to obtain the probability distribution of waiting time and queue length. Figure 6 depicts the cumulative probability distributions of both waiting time and queue length. It also shows that there is a 90% chance that the wait time would be less than 9 h and the queue length will be fewer than 57 trolleys at any given time. The system's average usage is 0.9770. This suggests that the system will be busy for about 98% of the time and free for only about 2% of the time.

Fig. 6
figure 6

Cumulative probability distribution of waiting time and queue length

Table 4 shows the queue characteristics and performance measures. In the mill, the average number of trolleys was one higher than the average number of trolleys in the queue. In addition, the average waiting time in the system was the sum of the average waiting time in the queue and the service time. With an average of 166 trolleys unloaded per day, the average service time is 8.64 min. Unloading a trolley takes about 9 min (0.15 h) on average in a mill.

Table 4 Queue characteristics of existing system

3.1 Validation of the Model

According to mill data, the average daily arrival rate was 161 trolleys, i.e., 7 trolleys per hour. In queuing theory and stochastic systems, Little's formula, \(L = \lambda W\), is one of the most well-known and useful conservation laws. It asserts that the average number of units in a system equals the average arrival rate of units multiplied by the average time in the system per unit. In the case of a queue, \({L}_{q} = \lambda {W}_{q}\), i.e., the expected length of the queue is the expected number of waiting times in the queue multiplied by the rate of arrival.

Using the observations from simulation,

$$ {\text{Average}}\,{\text{queue}}\,{\text{length}} = \lambda \left( {{\text{average}}\,{\text{waiting}}\,{\text{time}}\,{\text{in}}\,{\text{queue}}} \right) $$
$$ 23 = \lambda \left( {3.29} \right) $$

which gives

$$ \lambda = 23/3.29 = 6.99 \sim 7\,{\text{trolleys}}\,{\text{per}}\,{\text{hour}} $$

Approximately the same arrival rate achieved from the simulation validates the good fit of the model.

4 Performance Measures of Mill with Enhanced Crushing Capacity

Meham Mill was established in 1991, and its machinery is nearly 30 years old. As a result, exceeding the 25,000 qtl maximum crushing capacity restriction may raise the risk of mechanical failure. This, in turn, will degrade service quality by halting the mill's operation. During the peak season, the average crushing rate was 18,735 qtl per day. On December 1, 2020, the maximum crushing of 22,906 qtl sugarcane was attained. We can simulate the model and find the expected queue characteristics by assuming the same arrival rate of 6.73 trolleys per hour and increasing the average crushing capacity of the mill from 20,000 qtl to 24,000 qtl. Table 5 shows the service rates associated with increased average crushing.

Table 5 Service rate as per different average crushing

The arrival rate is smaller than the service rate in all of the preceding scenarios, and the queue characteristics are presented in Table 6 using the M/M/1 queuing model.

Table 6 Queue characteristics with enhanced service

5 Conclusion

According to the study based on primary data, average crushing over the season was 16,419 qtl per day, while peak days saw 18,735 qtl per day. The average arrival rate of trolleys was 161 trolleys per day. The mill was busy 97.70% of the time, with an average waiting time of 3 h and 17 min for a trolley to be serviced. The average queue length was 23 trolleys. Keeping in view, the maximum crushing capacity of 25,000 qtl per day, queue characteristics are obtained by simulation for different average crushing values. Because the mill is roughly 30 years old, it is possible that the machinery will fail if it is operated at maximum crushing speed. The mill's suspension of operations will inevitably result in a reduction in service quality. Even though the mill crushed more than 20,000qtl sugarcane per day around 40% of the time, an average of 20,000qtl crushing could be attained. With a crushing capacity of 20,000 qtl, the mill can service 177 trolleys every day, with current average weight of 112.44 qtl per trolley. The present average waiting time of 3 h, 17 min will be reduced to 1 h, 20 min, and the average queue length of 23 trolleys will be reduced to 9 trolleys. This increases the probability of an idle scenario from 2 to 9%, implying that the idle time of service will increase to 7%.