Computationally Efficient Simulation of Queues: The R Package queuecomputer

Large networks of queueing systems model important real-world systems such as MapReduce clusters, web-servers, hospitals, call centers and airport passenger terminals. To model such systems accurately, we must infer queueing parameters from data. Unfortunately, for many queueing networks there is no clear way to proceed with parameter inference from data. Approximate Bayesian computation could offer a straightforward way to infer parameters for such networks if we could simulate data quickly enough. We present a computationally efficient method for simulating from a very general set of queueing networks with the R package queuecomputer. Remarkable speedups of more than 2 orders of magnitude are observed relative to the popular DES packages simmer and simpy. We replicate output from these packages to validate the package. The package is modular and integrates well with the popular R package dplyr. Complex queueing networks with tandem, parallel and fork/join topologies can easily be built with these two packages together. We show how to use this package with two examples: a call center and an airport terminal.

[1]  D. V. Lindley,et al.  The theory of queues with a single server , 1952, Mathematical Proceedings of the Cambridge Philosophical Society.

[2]  Conrad Sanderson,et al.  Armadillo: a template-based C++ library for linear algebra , 2016, J. Open Source Softw..

[3]  Victor Chan,et al.  Generalized Lindley-type recursive representations for multiserver tandem queues with blocking , 2010, TOMC.

[4]  Cedric E. Ginestet ggplot2: Elegant Graphics for Data Analysis , 2011 .

[5]  Kristen Nygaard,et al.  SIMULA: an ALGOL-based simulation language , 1966, CACM.

[6]  Lester Lipsky,et al.  Queueing Theory: A Linear Algebraic Approach , 1992 .

[7]  Peter Kolesar,et al.  Some Effects of Nonstationarity on Multiserver Markovian Queueing Systems , 1991, Oper. Res..

[8]  Carmen Armero,et al.  Bayesian inference in Markovian queues , 1994, Queueing Syst. Theory Appl..

[9]  Michael I. Jordan,et al.  Bayesian inference for queueing networks and modeling of internet services , 2010, 1001.3355.

[10]  Dirk Eddelbuettel,et al.  Rcpp: Seamless R and C++ Integration , 2011 .

[11]  Ashok K. Agrawala,et al.  Analysis of the Fork-Join Queue , 1989, IEEE Trans. Computers.

[12]  Michael I. Jordan,et al.  Inference and Learning in Networks of Queues , 2010, AISTATS.

[13]  Paul P. Wu,et al.  A review of models and model usage scenarios for an airport complex system , 2013 .

[14]  H. Takagi,et al.  Queueing network model for obstetric patient flow in a hospital , 2016, Health Care Management Science.

[15]  M. J. Bayarri,et al.  Dealing with Uncertainties in Queues and Networks of Queues: a Bayesian Approach , 2022 .

[16]  Nico Vandaele,et al.  Modeling Traffic Flows with Queueing Models: a Review , 2007, Asia Pac. J. Oper. Res..

[17]  J. R. Jackson Networks of Waiting Lines , 1957 .

[18]  P. Glynn,et al.  Departures from Many Queues in Series , 1991 .

[19]  Shi Cao,et al.  Queueing Network Modeling of Human Performance in Complex Cognitive Multi-task Scenarios. , 2013 .

[20]  Christos G. Cassandras,et al.  Introduction to Discrete Event Systems , 1999, The Kluwer International Series on Discrete Event Dynamic Systems.

[21]  Richard E. Nance,et al.  The time and state relationships in simulation modeling , 1981, CACM.

[22]  M. Muddapur,et al.  Bayesian estimates of parameters in some queueing models , 1972 .

[23]  Arturo Azcorra,et al.  simmer: Discrete-Event Simulation for R , 2017, Journal of Statistical Software.

[24]  Conrad Sanderson,et al.  RcppArmadillo: Accelerating R with high-performance C++ linear algebra , 2014, Comput. Stat. Data Anal..

[25]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[26]  Minghong Lin,et al.  Joint optimization of overlapping phases in MapReduce , 2013, PERV.

[27]  Bobbie L. Foote,et al.  Fast Simulation of Open Queueing Systems , 1995, Simul..

[28]  David J. Worthington,et al.  Reflections on queue modelling from the last 50 years , 2009, J. Oper. Res. Soc..

[29]  D. Kendall Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain , 1953 .

[30]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[31]  Sebastian Bassi,et al.  Python Language Reference , 2009 .

[32]  Michael P. Wiper,et al.  Bayesian Analysis of Stochastic Process Models , 2012 .

[33]  Nick T. Thomopoulos,et al.  Fundamentals of Queuing Systems: Statistical Methods for Analyzing Queuing Models , 2012 .

[34]  J. Kiefer,et al.  On the theory of queues with many servers , 1955 .

[35]  Erhan Kozan,et al.  COMPARISON OF ANALYTICAL AND SIMULATION PLANNING MODELS OF SEAPORT CONTAINER TERMINALS , 1997 .

[36]  M. Brahimi,et al.  Queueing Models for Out-Patient Appointment Systems — a Case Study , 1991 .

[37]  Avishai Mandelbaum,et al.  Statistical Analysis of a Telephone Call Center , 2005 .

[38]  Nikolai Krivulin A recursive equations based representation for the G/G/m queue , 1994 .

[39]  Bernard O. Koopman,et al.  Air-Terminal Queues under Time-Dependent Conditions , 1972, Oper. Res..

[40]  Kerry Marie Malone,et al.  Dynamic queueing systems : behavior and approximations for individual queues and for networks , 1995 .

[41]  Jukka Corander,et al.  Approximate Bayesian Computation , 2013, PLoS Comput. Biol..

[42]  A. Clarke Maximum Likelihood Estimates in a Simple Queue , 1957 .

[43]  Yves Dallery,et al.  Manufacturing flow line systems: a review of models and analytical results , 1992, Queueing Syst. Theory Appl..

[44]  Giuseppe Serazzi,et al.  JMT: performance engineering tools for system modeling , 2009, PERV.

[45]  Jonathan Weinberg,et al.  Bayesian Forecasting of an Inhomogeneous Poisson Process With Applications to Call Center Data , 2007 .

[46]  U. Narayan Bhat,et al.  An Introduction to Queueing Theory: Modeling and Analysis in Applications , 2006 .

[47]  Avishai Mandelbaum,et al.  Telephone Call Centers: Tutorial, Review, and Research Prospects , 2003, Manuf. Serv. Oper. Manag..