> Date: 22-Dec-2008 10:11:28 GMT > From: "Gerard M. Keogh" <gmke...@justice.ie> > Subject: [R] queue simulation > To: r-help@r-project.org > > Hi all, > > > I have a multiple queing situation I'd like to simulate to get some idea of > the distributions - waiting times and allocations etc. > Does R has a package available for this - many years ago there used to be a > language called "simscript" for discrete event simulation and I was > wondering if R has an equivalent (or hopefully with graphics, something > better!).
To my knowledge, this doesn't exist, but one never knows. I look forward to hearing the other responses. Discrete-event simulation (DES) is generally done under one of two main world views--event-oriented, process-oriented. The more popular is probably the process-oriented view, but it requires something like threading, which would be problematic in R. It would be easy to take the event-oriented view, as it would just require coding up some kind of priority queue routine. In fact, a couple of weeks ago I made a note to myself to do this as an example of how one could do linked data structures in R. Again, this view is considered a poor way to program DES, but if you are interested, feel free to contact me. I very much like (and am somewhat involved in the development of) SimPy, a Python-based DES package. You could use SimPy for your simulation and use RPy to access R from SimPy, to take advantage of R's graphics and statistics facilities. SimPy is at http://simpy.sourceforge.net/ Also, I have a tutorial on it at http://heather.cs.ucdavis.edu/~matloff/simcourse.html Norm Matloff University of California, Davis ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.