Forum: Ruby discrete event simulation in ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Larry W. (Guest)
on 2005-12-31 15:46
(Received via mailing list)
I'm looking for a reasonably complete discrete event simulation library
in
ruby. I've googled and found a couple of projects, but didn't see
anything
that looked very complete.

Ideally it would have random generators for most standard distributions,
good support for queueing, and some fast collection types like splay
trees.

Does anybody know of anything? I could use a java library but i can't
think
of a better language for building and running small simulations than
ruby.

thanks in advance.
Paul Sanchez (Guest)
on 2006-01-01 20:15
(Received via mailing list)
In article
<removed_email_address@domain.invalid>,
 Larry W. <removed_email_address@domain.invalid> wrote:

> good support for queueing, and some fast collection types like splay trees.
>
> Does anybody know of anything? I could use a java library but i can't think
> of a better language for building and running small simulations than ruby.
>
> thanks in advance.
>
> ------=_Part_29885_17055621.1136036629870--

I can see using Ruby as a teaching tool for DES, but not for production
runs unless you're only simulating toy systems.  As much as I love Ruby
and am twisting people's arms to get them to look at it, the "orders of
magnitude slower" aspect really hurts here.

--paul
Larry W. (Guest)
on 2006-01-01 21:45
(Received via mailing list)
i'm looking to simulate small, but not 'toy' systems.

In my limited experience, implementation details like the choice of
data structures and algorithms makes most of the difference, although
for very large systems only C/C++ will do.

I've seen a ruby wrapper for some random number generators in C, which
should help, but i could probably get by with a pure Ruby version for
my needs.
M. Edward (Ed) Borasky (Guest)
on 2006-01-01 23:34
(Received via mailing list)
Well ... let's start with the "basics". Is there an open source C/C++
DES package one could build upon? I do a lot of work in computer
performance analysis, mostly using modeling rather than discrete event
simulation. I've only found *one* truly open source modeling package,
Prism from http://www.cs.bham.ac.uk/~dxp/prism/. The rest are usually
free within the "academic community" but are restricted to
non-commercial use.

I haven't done much discrete event simulation, so I haven't bothered to
do a similar search for open source packages. There is a really good
open source *network* simulator written in C++ with some Tcl/Tk
interfaces, called "ns/nam". That can be found at
http://www.isi.edu/nsnam/

Incidentally, in case you weren't aware of this, the whole notion of
"object-oriented programming" came from the language SIMULA, a discrete
event simulation language extended from Algol 60. Most folks today think
it came from Smalltalk. So Ruby should be an excellent language for
discrete event simulation. Good luck with it!

Larry W. wrote:

>
>>>------=_Part_29885_17055621.1136036629870
>>>
>>and am twisting people's arms to get them to look at it, the "orders of
>
--
M. Edward (Ed) Borasky

http://linuxcapacityplanning.com
M. Edward (Ed) Borasky (Guest)
on 2006-01-02 09:26
(Received via mailing list)
Well ... I found two discrete event simulators that are open source. One
is SimPy, written in Python (http://simpy.sourceforge.net/) and the
other is C++SIM, written in C++ (http://cxxsim.ncl.ac.uk/). I suppose
the Python one could be translated to Ruby ... it's LGPL. But I'd think
for efficiency reasons a Ruby/C++ integrated package would be a better
choice.

M. Edward (Ed) Borasky wrote:

> good open source *network* simulator written in C++ with some Tcl/Tk
>
>>
>>>> ------=_Part_29885_17055621.1136036629870
>>>> Ideally it would have random generators for most standard
>>>>
>>>
>>>
>>
>>
>>
>>
>>
>

--
M. Edward (Ed) Borasky

http://linuxcapacityplanning.com
Paul Sanchez (Guest)
on 2006-01-03 01:58
(Received via mailing list)
There's a fairly comprehensive LGPL'ed library written in Java called
SIMKit <http://diana.cs.nps.navy.mil/simkit>.  It's based on extensions
to Lee Schruben's "event graph" methodology.  The author, Arnie Buss,
developed a nice design framework which integrates object-oriented
design with a listener pattern to create a truly reusable component
architecture for model components.

--paul


In article <removed_email_address@domain.invalid>,
M. Edward (Ed) Borasky (Guest)
on 2006-01-03 04:08
(Received via mailing list)
Yeah ... I saw that. There's a lot of really great software written in
Java, but I tend to use it as is rather than trying to integrate it into
another language. I don't know enough about DES to know which package is
more comprehensive. I prefer small easily-understood packages in general
over comprehensive ones ... the YAGNI principle.

Along similar lines, I've been digging into the "mathn" library and its
dependencies, "matrix", "complex" and "rational". It's quite
interesting, although I suspect it's going to be way too slow for
"industrial-sized" systems analysis problems. "BigMath" is another
interesting piece of software -- it includes a rather general Newton
solver for nonlinear equations. More opportunities for interfacing Ruby
to external libraries -- I suppose I should go learn SWIG. :)

Paul Sanchez wrote:

>There's a fairly comprehensive LGPL'ed library written in Java called
>SIMKit <http://diana.cs.nps.navy.mil/simkit>.  It's based on extensions
>to Lee Schruben's "event graph" methodology.  The author, Arnie Buss,
>developed a nice design framework which integrates object-oriented
>design with a listener pattern to create a truly reusable component
>architecture for model components.
>
>--paul
>
>

--
M. Edward (Ed) Borasky

http://linuxcapacityplanning.com
This topic is locked and can not be replied to.