[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

discrete event simulation in ruby?

ljw1001@gmail.com

12/31/2005 1:44:00 PM

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.
4 Answers

Paul Sanchez

1/1/2006 6:10:00 PM

0

In article
<d15ea14a0512310543q68611fc1te680fa78d8d96b9c@mail.gmail.com>,
Larry White <ljw1001@gmail.com> wrote:

> ------=_Part_29885_17055621.1136036629870
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> 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.
>
> ------=_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

M. Edward (Ed) Borasky

1/2/2006 7:26:00 AM

0

Well ... I found two discrete event simulators that are open source. One
is SimPy, written in Python (http://simpy.source...) and the
other is C++SIM, written in C++ (http://cxxsim....). 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:

> 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/~.... 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....
>
> 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 White wrote:
>
>> 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.
>>
>>
>>
>> On 1/1/06, Paul Sanchez <paul@nospam.argelfraster.org.invalid> wrote:
>>
>>
>>> In article
>>> <d15ea14a0512310543q68611fc1te680fa78d8d96b9c@mail.gmail.com>,
>>> Larry White <ljw1001@gmail.com> wrote:
>>>
>>>
>>>
>>>> ------=_Part_29885_17055621.1136036629870
>>>> Content-Type: text/plain; charset=ISO-8859-1
>>>> Content-Transfer-Encoding: quoted-printable
>>>> Content-Disposition: inline
>>>>
>>>> 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.
>>>>
>>>> ------=_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
>>>
>>>
>>>
>>
>>
>>
>>
>>
>

--
M. Edward (Ed) Borasky

http://linuxcapacitypl...



Paul Sanchez

1/2/2006 11:55:00 PM

0

There's a fairly comprehensive LGPL'ed library written in Java called
SIMKit <http://diana.cs.nps.navy.mil/.... 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 <43B8D594.2050200@cesmail.net>,
"M. Edward (Ed) Borasky" <znmeb@cesmail.net> wrote:

> Well ... I found two discrete event simulators that are open source. One
> is SimPy, written in Python (http://simpy.source...) and the
> other is C++SIM, written in C++ (http://cxxsim....). 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:
>
> > 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/~.... 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....
> >
> > 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 White wrote:
> >
> >> 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.
> >>
> >>
> >>
> >> On 1/1/06, Paul Sanchez <paul@nospam.argelfraster.org.invalid> wrote:
> >>
> >>
> >>> In article
> >>> <d15ea14a0512310543q68611fc1te680fa78d8d96b9c@mail.gmail.com>,
> >>> Larry White <ljw1001@gmail.com> wrote:
> >>>
> >>>
> >>>
> >>>> ------=_Part_29885_17055621.1136036629870
> >>>> Content-Type: text/plain; charset=ISO-8859-1
> >>>> Content-Transfer-Encoding: quoted-printable
> >>>> Content-Disposition: inline
> >>>>
> >>>> 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.
> >>>>
> >>>> ------=_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

M. Edward (Ed) Borasky

1/3/2006 2:06:00 AM

0

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/.... 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://linuxcapacitypl...