Nonelective Flow DES Model: Running

DES
Author

Dr Lucy Morgan

Published

September 30, 2026

Model overview

The Non-Elective Flow Simulation is an open-source discrete-event simulation developed by Helena Robinson at Countess of Chester Hospital NHS Foundation Trust. It represents patients moving from the emergency department into SDEC or an inpatient bed and explores how bed capacity, admitted length of stay and SDEC activity affect queues and waiting times. The model is written in Python using SimPy and includes a Streamlit interface.

Session objectives and outline

This session will focus on obtaining the code and running the model as it currently exists. Participants will:

  • clone the GitHub repository and identify the files needed to get started;
  • create the supplied Python environment and install the dependencies;
  • start the Streamlit application and run the simulation;
  • reproduce an existing scenario and check that the run has completed as expected; and
  • explore the existing controls and interpret the principal outputs.

The aim is for participants to leave with a local copy of the repository, a working environment and a successful model run that they can continue to explore.

Actions for participants before the session

  • Bring a laptop on which you can use GitHub and install or run Python.
  • Clone or download the model repository.
  • Follow the repository’s current environment instructions as far as you can. Make a note of any errors so these can be discussed during the session.
  • If time allows, try the browser-based Streamlit application.

Additional resources