ERgo: Discrete-Event Simulation for Emergency Rooms
CWSF · 2026 Digital Technology Silver Medal
Overview
Canadian emergency rooms face a systemic crisis, with patients routinely waiting over 20 hours on stretchers. ERgo is a discrete-event simulation engine designed to tackle the chronic overcrowding and excessive wait times in Canadian hospitals using open-sourced hourly ER datasets from the Quebec government and the Canadian Triage and Acuity Scale (CTAS) data. By modeling ER patient flow at the Royal Victoria Hospital in Montreal, it tests five post-triage prioritization policies to identify ways to optimize patient flow using existing resources. ERgo also features an interactive dashboard that dynamically recommends the best policy for a given hospital based on real-time data.
Video
This video could not be played here. Watch it on the original project page.
Why?
Overcrowding in ERs accross Canada
Emergency room congestion across major Canadian cities has become a persistent and well-documented issue. This crisis shows no signs of slowing down, with inpatient bed wait times more than doubling in Alberta and Ontario between 2021 and 2023.
Patients in Canadian ERs are triaged using the Canadian Triage and Acuity Scale (CTAS), which assigns urgency levels and associated target wait times. However, CTAS was developed decades ago under very different conditions. In today’s high volume hospitals, these target time thresholds are often no longer realistic, as they do not account for sustained overcapacity and increased patient influx.
As a result, while CTAS still classifies patients by severity, it provides limited guidance on how to prioritize care when the system is overloaded. In practice, many ERs rely on internally defined policies, leading to inconsistencies in the system and biases from hospital administrators.
Most proposed solutions to ER overcrowding focus on increasing staffing or expanding infrastructure. While effective, these approaches are resource intensive, expensive, and must pass through a slow process before implementation.
Our Challenge
So we asked ourselves:
What if the problem isn’t just resources, but how we use them?
Is it possible to significantly reduce ER wait times and improve patient flow without requiring additional resources?
How?
The system currently in place is the Canadian Triage and Acuity Scale (CTAS), which ranks patients from level 1 (most critical) to level 5 (least urgent). We reviewed academic literature on queue management in other fields to understand what kinds of mechanisms, logic, or algorithms could improve system efficiency, and chose five potential prioritization policies to test out.
To obtain realistic results, we collected over 200 hourly open-source occupancy reports published by Quebec’s Ministry of Health for the Royal Victoria Hospital. While much of the data was used directly, some values had to be approximated such as patient arrival rates which was done using Little’s Law.
To run our simulation and collect results, we chose to build a discrete event simulation (DES) engine, which is commonly used in areas like manufacturing and logistics to represent complex systems as a sequence of discrete events (such as arrivals, departures, or service completions) in order to optimize flow.
Using this approach, we built our ERgo engine in Python. It is based on two core components: a Patient object, which tracks each individual’s arrival time, severity level, and waiting time, and an Engine, which manages the queue, the 33 available beds at the hospital, and patient discharges.
The simulation runs in one-hour time steps. At each step, wait times increase, treatment times decrease, and the queue is re-sorted according to the active policy. Patients arrive at realistic rates based on hospital data, are assigned a severity level, and include a 10% chance of misclassification to reflect real-world triage uncertainty. When all 33 beds are full, treatment slows by 10-20% to simulate staff overload.
Each policy was run over 1,200 simulated hours, with the first 600 hours serving as a warm-up period to allow the system to stabilize before recording results.
What?
The Results
After running 1,200 simulated hours per policy, ERgo showed that different post-triage algorithms can produce meaningfully different wait times.
Fast-Track achieved the lowest mean wait time (17.7 hrs) and median wait time (15.0 hrs), outperforming FCFS and weighted-FCFS (18.6 hrs mean; 16.0 hrs median) as well as the Baseline model (20.3 hrs mean; 20.0 hrs median). However, its main limitation is that standard patients are temporarily deprioritized behind minor cases, which can increase their waiting time before they reach the prioritization threshold.
In terms of severity levels, Fast-Track, Guillotine, and weighted FCFS all reduced severe-patient wait times to 11.4 hours, representing a 6.6-hour improvement compared to FCFS (18.0 hours). This shows that hybrid and threshold-based approaches can significantly improve outcomes for high-priority patients without fully relying on strict CTAS ordering.
For extreme delays, FCFS produced the lowest number of patients waiting over 24 hours (37 per 40-hour cycle), but this came at the cost of ignoring severity entirely. Fast-Track reduced extreme waits by 20.5% compared to the Baseline (58 vs. 73 events). In contrast, Guillotine (71 events) showed little improvement, as its prioritization threshold applied too broadly in a chronically congested system, effectively limiting its intended benefit.
Taken together, these results confirm that no single policy simultaneously minimizes median wait time, severe-patient delay, and extreme wait frequency. Nevertheless, Fast-Track and weighted-FCFS most consistently perform well across different metrics and therefore represent the two strongest candidates for further clinical evaluation.
The ERgo Dashboard
After consulting with professors and researchers in the field, we developed an interactive dashboard as a prototype implementation of ERgo in a real clinical environment. The goal was to show how our algorithms could be used in real time to provide transparency and support informed decision-making for both staff and patients.
The dashboard is built on each hospital's unique parameters. With a single click, staff can run an individual policy simulation or compare all available policies. ERgo then processes that hospital's data and outputs a clear recommendation for the best policy to adopt given current conditions. Crucially, that recommendation is dynamic, as the optimal policy for a given hospital shifts depending on time of day, occupancy, seasonal demand, sudden influx, and other factors, and the dashboard is designed to reflect that reality. Patients also benefit from the interface displaying a live visual of waiting room occupancy alongside estimated wait times, which gives people real-time, transparent information about their situation.
We also integrated data from multiple hospitals to demonstrate that ERgo can be used in any Canadian hospital or clinic using the CTAS system. We believe that because every hospital serves a unique community under unique conditions, post-triage policies must also adapt to its everchanging changing clinical environment. The five policies we analyzed represent only a few pre-determined possibilities. The right policy for any given hospital should be built in constant collaboration with its staff, and that is what we set out to do next.
So What?
Overall, no single policy proved optimal across all conditions. Emergency departments are too complex for a static, one-size-fits-all solution. Different hospitals, different times of day, and different levels of congestion each require a different approach- which is what ERgo is built to to provide.
To validate our findings, we presented ERgo to researchers at McGill University, Dawson College, and the University of Alberta, as well as clinicians working in emergency medicine. Their feedback confirmed that while dynamic post-triage prioritization is not a complete solution on its own, it can serve as an important component of a broader response to ER overcrowding. We are currently in discussions with clinical researchers at the Royal Victoria Hospital in Montreal implement ERgo in a real clinical environment.
Ultimately, this project shows that part of the solution to ER overcrowding lies not only in adding resources, but in using existing ones more intelligently.
What's Next?
ERgo's Future
While expert feedback helped refine our computer model, many clinical and regulatory realities cannot be fully represented in simulation.
With guidance from Dr. Jesse Hill and Dr. Andrew Dixon from UAlberta, we will observe ER operations in Edmonton and test how the ERgo Engine adapts to a new environment. With their feedback, we aim to prepare a small-scale clinical implementation of the ERgo Dashboard using real-time data in Montreal.
Long-term, ERgo would become an adaptable tool for all hospitals across Canada and eventually beyond, particularly in regions that lack clear post-triage protocols.
Thanks
Acknowledgements
The rigor of this project would not have been possible without the support of Dr. Dionne, Dr. Dixon, and Dr. Hill, who took the time to evaluate our work and provide valuable feedback.
The reach of this project would not have been possible without the EAST Association, the Super Expo Science Association, as well as judges and sponsors, whose support pushed us to the next level and gave us the confidence that our work had tremendous potential .
Finally, this project would not have been possible without the support of Dawson College and Vanier College, who backed us throughout and whom we are proud to represent.
References
Beveridge R, Clarke B, Janes L, Savage N, Thompson J, Dodd G, Murray M, Nijssen-Jordan C, Warren D, Vadeboncoeur A. Implementation Guidelines for the Canadian Emergency Department Triage and Acuity Scale (CTAS). Canadian Association of Emergency Physicians [Online]. 1998 [cited 2025 Jan 1]. Available from: https://ctas-phctas.ca/wp-content/uploads/2018/05/ctased16_98.pdf
Ding Y, Park E, Nagarajan M, Grafstein E. Patient Prioritization in Emergency Department Triage Systems: An Empirical Study of Canadian Triage and Acuity Scale (CTAS). SSRN Electronic Journal [Online]. 2018 Jan 12 [cited 2025 Jan 1]. Available from: https://ssrn.com/abstract=2843932
Stanford DA, Sharif AB, McAlister C, Montgomery C, Bischak DP. Waiting time distributions in the accumulating priority queue. Queueing Systems [Online]. 2014 [cited 2025 Jan 1]. Available from: https://link.springer.com/article/10.1007/s11134-013-9382-6
Mojalal M, Stanford DA, Sharif AB. The delayed accumulating priority queue. Queueing Systems [Online]. 2019 [cited 2025 Jan 1]. Available from: https://link.springer.com/article/10.1007/s11134-019-09611-y
Cildoz M, Ibarra A, Mallor F. Accumulating priority queues versus pure priority queues for managing patients in emergency departments. Operations Research for Health Care [Online]. 2019 [cited 2025 Jan 1]. Available from:
https://www.sciencedirect.com/science/article/pii/S2211692318300985
Gouvernement du Quebec. Fichier horaire des données de la situation à l'urgence Ministère de la Santé et des Services sociaux [Online]. 2025 [cited 2025 Jan 1]. Available from: https://www.donneesquebec.ca/recherche/dataset/fichier-horaire-des-donnees-de-la-situation-a-l-urgence/resource/a9272cc9-8234-40d1-9806-9f6b4c75c20d
Images (21)
Awards (3)
- Special Award
- Silver Medal
- Selected for CWSF 2026
Competition history
- CWSF 2026
Related projects
ISEF · 2023
EmSafe: Investigating the Emergency Call Service in Australia and the Development of a Modern and Efficient Contact System
CWSF · 2026
Real-Time Triage: Enhancing patient prioritization through wearable technology.
CYSF · 2026
MediPass: A Pre-Arrival AI Triage and Redirection System to Reduce Emergency Room Overcrowding
JSHS · 2020
The Intelligent Medical Stapler: Ending the Emergency Room Crisis
ISEF · 2014
The PART* Program: Improving Emergency Response Times (Police and Ambulances Regulating Traffic)
CWSF · 2026
Precision Allocation of GLP1-RA and SGLT2i in Cardiac Rehabilitation
ISEF · 2020
The Intelligent Medical Stapler: Ending the Emergency Room Crisis
ISEF · 2021
Queue Control System
Closest projects by meaning, across every fair and year in the corpus.