Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Discrete event simulation

by toma (Vicar)
on May 27, 2007 at 07:00 UTC ( #617716=perlquestion: print w/replies, xml ) Need Help??
toma has asked for the wisdom of the Perl Monks concerning the following question:

I need a discrete event simulator, and I have been using the Simpy ( discrete event simulation package. Simpy doesn't happen to be written in Perl, so I have been using this project as an excuse to try Python again.

However, I am still interested in something like Simpy for Perl. Does anyone know of a discrete event simulation package for Perl? I would like to hand off this project at some point. We possess plenty of Perl people but paltry Python programmers.

It should work perfectly the first time! - toma

Replies are listed 'Best First'.
Re: Discrete event simulation
by shmem (Canon) on May 27, 2007 at 07:27 UTC
    Skimming the Simpy overview, its core looks a lot like POE to me. Together with a GUI Toolkit like Tk, GtK or Qt such a system could easily be built in perl, just connecting the dots.


    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Discrete event simulation
by agentz (Novice) on May 28, 2007 at 01:22 UTC
    I've produced an event simulator named Sim which is somewhat similar to Simpy in my SVN repos:

    The Sim Simulator

    Only 2 .pm files, pretty simple to implement, but still rather powerful ;)

    It's truly general-purpose and thoroughly tested at the moment though it's currently a subproject of my logic circuit simulator, Tesla , which uses it as the core.

    There is some (English) POD in the .pm files of Sim and I've also written a trivial M/M/1 and M/M/m sample app here:

    SuperMarcket Simulation

    A corresponding report with some code snippets and interesting pictures can also be found here:


    Sorry for the Chinese characters in this report, but there is always a Google Translate :)

    If you find this thing useful, I may feel like putting it onto CPAN.

    Hope this helps.

    Cheers, agentz

      I think this is really interesting, AND useful. You should definitely put it on CPAN.

        Glad you like it :)

        Will do in the next few days.

        Sim 0.02 has just been uploaded to CPAN. Enjoy~ :)

        - agentz

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://617716]
Approved by naikonta
Front-paged by Old_Gray_Bear
[ambrus]: though it's very C-like (serious use of varargs so easy to pass the wrong type), and there are some minor problems (busy loop because it doesn't use the same timer as your event loop, so you have to artificially delay timer callbacks by a small amount).

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2016-12-07 16:27 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (130 votes). Check out past polls.