This project models and simulates patient flow through an Emergency Department (ED) using discrete event simulation (DES).
It provides tools to run simulations under different scenarios (current, predicted, recommended) and visualize the results.
- Python3.11
pip install -r requirements.txt
- Directory tree
project-root/
│
├── assets/ # Diagrams, reference materials
│ └── Process Flow HTX.png
│
├── logs/ # Simulation run logs
│ ├── simulation_current.log
│ ├── simulation_predicted.log
│ └── simulation_recommended.log
│
├── notebooks/ # Jupyter notebooks for analysis/visualization
│ ├── visualisations_current.ipynb
│ ├── visualisations_predicted.ipynb
│ └── visualisations_recommended.ipynb
│
├── scripts/ # Core simulation code
│ ├── main_current.py # Entry point: current scenario
│ ├── main_predicted.py # Entry point: predicted scenario
│ ├── main_reco.py # Entry point: recommended scenario
│ ├── ED.py # Emergency Department logic
│ ├── FT.py # Fast track logic
│ ├── Triage.py # Triage logic
│ ├── Lab_Test.py # Lab test logic
│ ├── Transfer.py # Transfers between units
│ ├── Exit.py # Patient discharge/exit
│ ├── Patient.py # Patient agent definition
│ └── Sim.py # Simulation runner/engine
│
├── .gitignore
├── requirements.txt # Python dependencies
└── README.md # Project documentation
We have simulated 3 scenerios and have added the visualisations to the powerpoint.
- Current System
python scripts/main_current.py
- Predicted System (10% Increase in Patient Volume) with Current Resources
python scripts/main_predicted.py
- Recommended System
python scripts/main_reco.py
Logs of the simulator will be saved in the logs/ folder
Jupyter notebooks under notebooks/ provide visualizations of simulation outputs which can be found in Task 4 Presention.pptx:
visualisations_current.ipynb– analysis of the current ED configurationvisualisations_predicted.ipynb– projections under forecasted loadvisualisations_recommended.ipynb– evaluation of proposed improvements
The Main Key Performance Output Variable (KPOV) measured was the Percentage Utilisation of each Resource. This tells us how much of the available time a resource (e.g., doctors, triage nurses, treatment rooms) is actively being used.
How to interpret: A low utilisation (e.g., <50%) suggests underused capacity—resources may be idle for long stretches. A moderate utilisation (50–80%) typically reflects efficient use without excessive strain. A very high utilisation (e.g., >85–90%) may signal overloading, where staff or resources are constantly busy, increasing the likelihood of delays and bottlenecks.