Simulation libraries in Ruby?

M

mepython

I did some search to find availability of discrete event simulation
libraries in Ruby and comes out with nothing. I am sure it must be
somewhere in a cyberspace. Can somebody point to me.

If there is nothing available, I like to create one using coroutines
like what is created for python (http://simpy.sf.net).
 
P

Paul Sanchez

mepython said:
I did some search to find availability of discrete event simulation
libraries in Ruby and comes out with nothing. I am sure it must be
somewhere in a cyberspace. Can somebody point to me.

If there is nothing available, I like to create one using coroutines
like what is created for python (http://simpy.sf.net).

Depends on what you're looking for. There are several priority queue
implementations available for event list management. See Bruno Preiss's
Data Structures book online at <http://www.brpreiss.com/books/opus8/>,
for instance. He also has an example implementation of an M/M/1 queue.

With a decent priority queue and some basic random variate generation
algorithms such as can be found in Law & Kelton
(<http://tinyurl.com/5jdam>) or DeVroye (freely downloadable at
<http://tinyurl.com/5teab>) it's pretty easy to implement event graph
(<http://tinyurl.com/4qsqh>) or listener event graph
(<http://tinyurl.com/5zg7n>) based models.

I don't know of anything which pulls all of the pieces together in Ruby,
though.

One problem which remains with using Ruby for discrete event simulation
is that the random number generator, although of good quality, is
implemented as a System method instead of as a class from which multiple
generator objects can be instantiated. This seriously limits its use in
designed experiments. That's the main reason why I haven't translated
any of my own work over from C or Java.

--paul
 
J

Joel VanderWerf

Paul said:
One problem which remains with using Ruby for discrete event simulation
is that the random number generator, although of good quality, is
implemented as a System method instead of as a class from which multiple
generator objects can be instantiated. This seriously limits its use in
designed experiments. That's the main reason why I haven't translated
any of my own work over from C or Java.

Not standard, but available:

http://raa.ruby-lang.org/search.rhtml?search=random
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top