Skip to content

Simple Simulation Example.

8 May 2012

In order to help you visualize what a discrete event simulation is, I’ve created an extremely bare bones example, and uploaded it to the web, on a site designed by the software company. The model may be found here.

This model consists of a simple discrete event system. Patients (little blue people) arrive, and then are triaged by a triage nurse (little yellow person). They then proceed to one of the six ‘exam rooms’ where they can see a physician (green person). If the exam rooms are all full, they will go to the waiting area instead. When done, they proceed to an exit.

There are sliders that allow you to control the three basic aspects of the simulation: the arrival rate, the number of triage nurses, and the number of physicians. This is the extremely simple version of what I do. I build these little semi-video games that allow us to determine things like: given an arrival rate, how many physicians do I need to keep the waiting room from filling up? Give it a try! You may want to click the little clock with the plus sign on the top bar a few times to speed it up.

It’ll prompt you to download a plug-in. It’s just Java.

12 Comments leave one →
  1. sciencegeeka permalink
    8 May 2012 16:49

    This is, as far as I am concerned, one of the coolest things I’ve ever seen. This is so much better than what I had in my head, I was totally expecting some random string of numbers and some graphs indicating a time. Although I guess it is all math at the basis, but this is ever so much cooler.

    Do you normally set up hard times, or do you select a time range for the simulation to randomly pick from (i.e. a patient comes in every 10-20 minutes)?

    And since you spoke about getting better data when you use long time frames, do you take into consideration things that influence time that it takes for a patient to be seen and vary it (i.e. staffing at night versus day, staffing during holidays etc)?

    How long does it actually take to get a worthy amount of data versus what the data represents in real time?

    Does the data get better with each variable you add? or is it based upon the quality of the reliable real life data you have for that variable? Is there a limit to how many variables that you can add (admittedly some probably don’t have added value)?

    What kind of classes teach you how to do this? Or did you teach yourself?

    Thank you so much for demo’ing this! I really appreciate you sharing this! I’m totally geeking out with how this can be applicable to cell signaling and mapping cell expression data for differentiation for cells. Must learn more!

    • 8 May 2012 16:54

      It’s all stochastic. The “arrival rate” slider manipulates the lambda parameter of a poisson-distributed random variable. Service times are triangularly distributed. All of the things you describe can be taken into account. Using hard times is not advised, but you’ll see it in the lit when physicians try to do this, and do it badly.

      How long it takes to get data is widely variable on the system, how many people are dedicated to the project, and how many data points we need to look at.

      Adding extra variables can make it better, or can contribute to the accumulation of small errors. It’s a balancing act.

      I have plenty of systems engineering and computer science courses, but there was a great deal of personal teaching as well.

      • sciencegeeka permalink
        8 May 2012 17:03

        Honestly, if I were smart enough to figure out how to do this, I’d be excited enough to never sleep again for want to play with things.

      • 8 May 2012 17:07

        I could teach you to do this in a weekend.

      • sciencegeeka permalink
        8 May 2012 17:10

        You must be brilliant then! 🙂 I’d love to learn. Intro text suggestions?

      • 8 May 2012 17:16

        Hm. I never read an intro text. Papers and manuals. I know Pooch wrote a good one. (DES, a practical approach, 1993), but it’s outdated.

      • sciencegeeka permalink
        8 May 2012 17:23

        Makes sense, all the cool new things never do. May check it out for background?

  2. 8 May 2012 16:54

    This computer hates me.

  3. 9 May 2012 07:23

    Neat stuff. I was wondering what extra variables you throw in that would disrupt the model prediction–the chance of an emergency event that requires more doctors and nurses, for example. Those stats are available on a per hour basis I’m sure.

    • 9 May 2012 08:21

      There are, literally, millions of things. Varying patients by type of services needed/severity. Adding lab/imaging/ekg. Including additional resources like techs and consults. Etc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s