This module serves as an introduction to modelling pathway problems with discrete event simulation (DES). It was delivered to the sixth cohort of the Health Service Modelling Associates (HSMA) programme, a training course aimed at analysts, clinicians, managers and other people working in the NHS and related healthcare organisations.
It covers
- What DES is and where it may be useful
- The key terminology associated with DES (e.g. resources, entities, sinks)
- How to simplify a real-world pathway modelling problem into a conceptual model
- Python generator functions
- The features of the SimPy package
- How to write simple simulations in Python with SimPy
- How to deal with multi-step pathways
- How to deal with branching pathways
- How to build in more complex features to your pathway models, including
- warm-up periods,
- priority-based queuing,
- resource unavailability,
- Lognormal distributions,
- reneging, balking, and jockeying
All slides, session recordings, code examples, exercises, exercise solutions and solution videos are available to access on the module page, covering 9 hours of content.
While it is intended to be run on your local machine using the supplied environment, it is possible to complete all exercises online using the ‘Open in GitHub Codespaces’ links.
View the module
To view the module, click on the image above or go to https://hsma.co.uk/hsma_content/modules/current_module_details/2_des.html.
Brand new to Python? Consider starting with the HSMA book of Python first:
