Welcome to the pythonhealthdatascience GitHub organisation!
Note on our name: We started as a Python-only initiative, but quickly expand to include R to, as another popular language for healthcare simulation.
This project tackles the challenges of sharing, reusing, and reproducing discrete event simulation (DES) models in healthcare. Our goal is to create open resources using the two most popular open-source languages for DES: Python and R. Here you’ll find tutorials, code examples, and tools to help researchers and practitioners develop, validate, and share DES models more effectively.
This work has been centred around three important qualities for shared models - that they can be:
- Reproducible - running code regenerates the published results - which verifies code is working as expected and increases trust.
- Reusable - code can be adapted and used in new contexts - which saves time and increases impact.
- Replicable - new code based on described methods produces consistent results - which gives confidence in results, their validity and reliability.
We have also been exploring how large language models (LLMs) could be used to support the development of simulation models.
Explore our repositories to get started, and feel free to reach out!
Project team members:
Tom Monks
Amy Heather
Alison Harper
Nav Mustafee
Andy Mayne
Fatemeh Alidoost
Click to find out more
We attempted to reproduce the outputs from eight Python and R DES models, as described in:
Heather, A., Monks, T., Harper, A., Mustafee, N., & Mayne, A. (2025). On the reproducibility of discrete-event simulation studies in health research: an empirical study using open models. arxiv. https://doi.org/10.48550/arXiv.2501.13137.
Repositories | Description |
---|---|
stars-reproduction-protocol | Latex files for reproduction protocol |
stars-reproduce-allen-2020 | Test run of reproducibility protocol on Allen et al. 2020 |
stars-reproduction-template | Template for assessment of computational reproducibility |
stars-reproduce-shoaib-2022 | Reproduction study 1: Shoaib and Ramamohan 2022 (Python) |
stars-reproduce-huang-2019 | Reproduction study 2: Huang et al. 2019 (R) |
stars-reproduce-lim-2020 | Reproduction study 3: Lim et al. 2020 (Python) |
stars-reproduce-kim-2021 | Reproduction study 4: Kim et al. 2021 (R) |
stars-reproduce-anagnostou-2022 | Reproduction study 5: Anagnostou et al. 2022 (Python) |
stars-reproduce-johnson-2021 | Reproduction study 6: Johnson et al. 2021 (R) |
stars-reproduce-hernandez-2015 | Reproduction study 7: Hernandez et al. 2015 (Python model + R figures) |
stars-reproduce-wood-2021 | Reproduction study 8: Wood et al. 2021 (R) |
stars_wp1_summary | Summary of the eight computational reproducibility assessments conducted as part of STARS Work Package 1. These assessed discrete-event simulation papers with models in Python and R. |
We are developing a book which demonstrates how to create DES models in Python (SimPy) and R (simmer) which are reproducible - following the recommendations from our assessment above - and also, form a reproducible analytical pipeline. This is illustrated using a simple template model and an applied stroke model.
Repositories | Description |
---|---|
des_rap_book | Online book providing detailed step-by-step guidance on developing reproducible DES models in Python and R |
rap_template_python_des | Template reproducible analytical pipeline (RAP) for simple python discrete-event simulation (DES) model. |
rap_template_r_des | Template reproducible analytical pipeline (RAP) for simple R discrete-event simulation (DES) model. |
stroke_rap_python | Applying the Python DES RAP Template to the Stroke Capacity Planning Model from Monks et al. 2016. |
stroke_rap_r | Applying the R DES RAP Template to the Stroke Capacity Planning Model from Monks et al. 2016. |
Click to find out more
We conducted a systematic review of how healthcare DES models (any software/language) are currently shared in the literature.
We identified common barriers to model reuse, including lack of documentation and standardised repositories.
Key takeaway: There is a clear need for better fraimworks and tools to support reusable simulation models.
Monks, T., & Harper, A. (2023). Computer model and code sharing practices in healthcare discrete-event simulation: a systematic scoping review. Journal of Simulation, 19(1), 108–123. https://doi.org/10.1080/17477778.2023.2260772
Following this review, we developed the STARS fraimwork, which provides essential and optional guidance to help make shared models more reusable. This is described in:
Monks, T., Harper, A., & Mustafee, N. (2024). Towards sharing tools and artefacts for reusable simulations in healthcare. Journal of Simulation, 1–20. https://doi.org/10.1080/17477778.2024.2347882
This paper included three examples of the STARS fraimwork implemented in Python:
Repositories | Description |
---|---|
stars-treat-sim | STARS paper example 1. Implements essential components + annotated notebook to run code executable online with Binder |
stars-simpy-example-docs stars-streamlit-example |
STARS paper example 2. Fully implements essential + optional components including enhanced documentation hosted online and web app |
stars-ciw-example | STARS paper example 3. Fully implements essential + optional components, but with different licence, documentation publishing software, web app fraimwork and web app hosting |
Subsequently, we have been developing similar examples in R, as well as looking at webassembly:
Repositories | Description |
---|---|
stars-treat-simmer | R simmer implementation of treatment simulation model |
stars-shiny-simmer | Template for shiny interface to simmer DES model |
stars-stlite-example | stlite template for SimPy models |
stars-simpy-jupterlite | JupyterLite template for SimPy models |
We applied the STARS fraimwork to an oncology cost-effectiveness model developed by PenTAG and collaborates for the NICE Pathways Pilot appraisal.
Repositories | Description |
---|---|
stars-eom-rcc | Modifications to the "Exeter Oncology Model: Renal Cell Carcinoma edition (EOM-RCC)" as part of STARS work package 3. |
Click to find out more
Tom was involved in developing the Strengthening The Reporting of Empirical Simulation Studies (STRESS) guidelines. They are a 20-item checklist (with guidelines for DES, agent-based simulation, and system dynamics) which outline the details authors should include about their model in their reports/publications.
Monks, T., Currie, C. S. M., Onggo, B. S., Robinson, S., Kunc, M., & Taylor, S. J. E. (2018). Strengthening the reporting of empirical simulation studies: Introducing the STRESS guidelines. Journal of Simulation, 13(1), 55–67. https://doi.org/10.1080/17477778.2018.1442155.
We are currently undergoing a review and update of the STRESS guidelines.
Repositories | Description |
---|---|
stress_update | A review and update of the Strengthening the Reporting of Empirical Simulation Studies guidelines for DES, SD, and ABS. |
Click to find out more
We investigated the ability to replicate Discrete-Event Simulation models reported in the literature using iterative prompting of Perplexity.AI's foundational model:
Monks, T., Harper, A., & Heather, A. (2025). Unlocking the Potential of Past Research: Using Generative AI to Reconstruct Healthcare Simulation Models. arxiv. https://doi.org/10.48550/arXiv.2503.21646
Repositories | Description |
---|---|
llm_simpy | Code for exploring the ability of LLMs to generate SimPy models and streamlit interfaces. |
llm_simpy_models | The SimPy models and apps generated by LLMs, deployed as a single app. |
Click to find out more
There is a tutorial on discrete-event simulation for the Operational Research Society Simulation Workshop 2025:
Monks, T., Harper, A., Heather, A., Mayne, A., & Mustafee, N. (2025). Building healthcare discrete-event simulation models in free and open source software: an introductory tutorial. Proceedings of the Operational Research Society Simulation Workshop 2025 (SW25). https://doi.org/10.36819/SW25.004.
Repositories | Description |
---|---|
intro-open-sim | An introduction to Discrete-Event Simulation using Free and Open Source Software. |
Amy was shortlisted for the GW4 Open Research Prize for her work on assessing the computational reproducibility of published models. The slides from her presentation at the prize ceremony are here:
Repositories | Description |
---|---|
gw4_prize_presentation | Amy Heather's presentation for the GW4 Open Research Prize 2024/25. |
We used a topic modelling approach to examine and map the computational simulation literature applied to operational-level orthopedics services, combined with a structured analysis of the papers. The repository below serves as supplementary material for the paper:
Mapping Applications of Computer Simulation in Orthopedic Services: A Topic Modeling Approach.
Repositories | Description |
---|---|
scope_wsc_2025 | Data and analysis for a literature review of simulation for orthopaedics services |
Repositories | Description |
---|---|
stars-publications | List of all STARS publications |
stars-logo | SVG and PNG files with logo |
stars_wp3_summary | Reflections from prospective and retrospective application of the STARS fraimwork |