Proceedings of the 2020 Winter Simulation Conference K.-H. Bae, B
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the 2020 Winter Simulation Conference K.-H. Bae, B. Feng, S. Kim, S. Lazarova-Molnar, Z. Zheng, T. Roeder, and R. Thiesing, eds. LEARNING LINDLEY’S RECURSION Sergio Palomo Jamol Pender Systems Engineering Operations Research and Information Engineering Cornell University Cornell University Ithaca, NY 14850, USA Ithaca, NY 14850, USA ABSTRACT Lindley’s recursion is one of the most important formula’s in queueing theory and applied probability. In this paper, we leverage stochastic simulation and current machine learning methods to learn the Lindley recursion directly from waiting time data of the G/G/1 queue. To this end, we use methods such as Gaussian Processes, k-Nearest Neighbors and Deep neural networks to learn the Lindley recursion. We also analyze specific parameter regimes for the M/M/1 to understand where learning the Lindley recursion may be easy or hard. Finally, we compare the machine learning methods to see how well we can predict the Lindley recursion multiple steps into the future with missing data. 1 INTRODUCTION Lindley’s recursion is one of the most important formula’s in queueing theory and applied probability. Lindley’s recursion is an explicit recursive equation that describes the recursive relationship between consecutive waiting times in a G/G/1 queue, which is a single server queue that can have general interarrival times and general service times. One should note that the G/G/1 does not require independence of the arrival or service processes and even in between arrival or service times. The Lindley recursion can also be modified to model the consecutive response times or departure times in a G/G/1 queue as well. The success of the Lindley recursion lies in its simplicity and it has been exploited to derive various properties of performance measures for the G/G/1 queue. One such example is the derivation of the G/G/1 waiting time distribution using the Lindley recursion Buzacott and Shanthikumar (1993). One can also prove that the waiting time is convex with respect to the arrival and service parameters, see for example Shaked and Shanthikumar (1988). Finally, the Lindley recursion has been exploited in optimization and performance evaluation contexts in Glasserman and Ho (1991), Fu and Hu (2012), Kin and Chan (2010), Baccelli and Bremaud´ (2013). What makes the Lindley recursion attractive beyond its power to help prove structural insights about queues is that is only uses simple arithmetic operations to relate the successive waiting times. In fact, it only uses the addition and maximum operations, which provides much simplicity and scalability. Moreover, the recursion is also exact and gives the sample path waiting times of any customer. Despite the simplicity of the Lindley recursion, it has not been extensively studied in a data driven context. Even though the queueing community has a rich history of using data to inform stochastic models, there are very few papers that use data to construct actual stochastic models. There are some notable exceptions such as Sutton and Jordan (2011), Bod´ık et al. (2009), Sutton and Jordan (2010), Wang et al. (2016), Kim et al. (2015), Bartel et al. (2020), Armony et al. (2015). With this in mind, our goal is to understand the effectiveness of current machine learning methods to recover Lindley’s recursion from waiting time data of the M/M/1 queue. To this end, we combine stochastic simulation with machine learning to learn the Lindley recursion function. Despite, the simplicity of the Lindley recursion in the single server setting the extension to the multi- server setting is quite difficult and generally scales poorly with the number of servers. This scale issue 978-1-7281-9499-8/20/$31.00 ©2020 IEEE 644 Palomo and Pender can be overcome if one can find a function that maps the previous waiting times to the next waiting time, see for example Kin and Chan (2010). Finding simple ways to compute these waiting times, has important implications for various applications such as call centers, cloud computing centers, healthcare networks, and even amusement parks, see for example Armony et al. (2015), Shah et al. (2019), Pender and Phung-Duc (2016), Delimitrou and Kozyrakis (2013), Nirenberg et al. (2018), Brown et al. (2005), Koole and Mandelbaum (2002). Having good solutions to this problem is of vital importance to the simulation community. Good solutions to this problem would dramatically reduce the computational time to compute waiting times for queueing systems with a large number of customers. Fortunately, in recent years machine learning and more specifically deep learning has seen unprecedented success in a diverse number of applications. Thus, our idea is to use machine learning methods to learn the Lindley recursion. We will restrict our analysis to the single server case as it will serve as a base case for more complicated models. Moreover, if machine learning methods cannot perform well on this simple model, then it implies that the study of more complicated models is hopeless. In this paper, our goal is to learn the Lindley recursion for the M/M/1 queue, which is a single server queue where the inter-arrival and service times follow independent exponential distributions with rates l and m respectively. Other than learning the Lindley recursion from simulated waiting time data, we also aim to understand under what regimes is it easy or hard to learn the Lindley recursion. For example, do current machine learning methods work well when the queue is in light traffic or heavy traffic? We also compare various machine learning methods for learning the Lindley recursion and understand their relative performance on in-sample and out of sample waiting time data. To this end, we list the contributions of our work below. 1.1 Contributions of Our Work By using stochastic simulation for the M/M/1 queue and leveraging machine learning methods, we provide new insights to the following questions: • What machine learning methods work well at learning the Lindley recursion for the G/G/1 queue? • Is learning the Lindley recursion easier in the heavy traffic setting? • How difficult is learning the Lindley recursion for increasing server utilization? • How well can we predict Lindley’s recursion k steps into the future? 1.2 Organization of the Paper The remainder of the paper is organized as follows. Section2 introduces the Lindley recursion and gives a brief history of the formula. In Section3, we present our simulation and machine learning results for various methods. We also explain how various parameters of the queueing model affect the performance of learning the Lindley recursion. Finally, a conclusion is given in Section4. 2 LINDLEY’S RECURSION Consider the M/M/1 queueing system model where the customer inter-arrival distribution is general, the service distribution is general, and there is a single server. For a complete description of this queueing th system, see Shortle et al. (2018). For the n customer to arrive to the queue, we define Wn to be the waiting th th time for that customer. We also define An to be the inter-arrival time between the n and the (n + 1) th customers and Sn to be the n customer’s service time. For the case of an infinite buffer and a First Come First Served (FCFS) system, Lindley’s recursion was given by Kendall (1951), Lindley (1952) is: Wn+1 = max(Wn + Sn − An;0): 645 Palomo and Pender Previous analysis such as Konheim (1975) and Prabhu (1974) studies the steady state waiting time of the G/G/1 queue and shows that the steady state waiting time satisfies the following integral equation, which is known as Lindley’s integral equation Z ¥ F(x) = K(x − y)F(dy) x ≥ 0 0− where K(x) is the distribution function of the random variable denoting the difference between the service time of the nth customer and the inter-arrival time of the nth and n+1th customer. In fact the Wiener–Hopf method can be used to solve this integral equation in closed form Prabhu (1974). In addition to the steady state waiting time, one can also calculate the conditional waiting time of the (n + 1)th customer given the waiting time of the nth customer. In the Markovian single server queue setting, we have the following theorem for the conditional mean waiting time. Theorem 1 For the M/M/1 queue where the arrival rate is equal to l and the service rate is equal to m, then the conditional mean waiting time of customer n + 1 is equal to l − m me−lWn E[Wn+1jWn] = Wn + + : l m l + m Proof. + E[Wn+1jWn] = E[(Wn − An + Sn) jWn] Z ¥ + l m −mmax(x;0)−lmax(−x;0) = (Wn + x) e dx −¥ l + m Z ¥ Z 0 l m + −mx + lx = (Wn + x) e dx + (Wn + x) e dx l + m 0 −¥ Z ¥ Z 0 l m −mx −lx = (Wn + x) · e dx + (Wn + x) · e dx l + m 0 −Wn l − m me−lWn = W + + : n l m l + m Table 1: Theoretical Expected Waiting Times. m 100 100 100 100 1000 1000 1000 1000 l 50 75 90 99 500 750 900 990 E[Wn+1jWn] 0.284 0.101 0.0376 0.02 0.299 0.105 0.0434 0.0161 The result in Theorem1 provides the solution to the conditional expected waiting time of the (n+1)th customer given the current waiting time of the nth customer. One can view this conditional expectation as the constant that minimizes the squared error when predicting the waiting time of the next customer with information of the current customer.