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 (Chancellor) 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