The Discrete Event Simulation Playground
Discrete Event Simulation is a powerful tool for improving pathways, of which there are a lot in healthcare services.
Originally built for introducing people to Discrete Event Simulation at our HSMA open day, this web application is freely available for you to use and adapt under a CC BY-NC-SA 4.0 licence.
It gradually introduces key concepts relating to discrete event simulation, including sampling from distributions, the role of random seeds, resources, multiple runs, and more.
Users are able to adjust a range of parameters and rerun the model.
A range of animations, built using code that would go on to become the vidigi package, help users to develop their understanding of discrete event simulation as a technique, with a range of other visualisations used to guide their attention to important learning points at each stage.
Written using stlite - which brings the power of browser-based python to the Streamlit framework - the tool has been tested with 50+ concurrent users, with the users’ hardware undertaking all calculations. A tradtional server-based approach with Streamlit community cloud could not cope with more than a couple of users at a time before reaching the limits of the free tier - in contrast, by using stlite.
Due to the use of browser-based Python, the tool can run slowly on older hardware. It is recommended to be used on a laptop or desktop PC rather than a phone (though a phone will work - slowly - in a pinch!)
Try it out below!
I’d love to know if you use this as part of your course, a workshop, or in any other way.
Please do drop me a message at hi@sammirosser.com or on LinkedIn.