This is the flat top-down twin of the 3D ER-triage lab, driven by the identical queueing rules. Patients (dots) arrive on the left at random Emergency Severity Index level (1 critical/red to 5 non-urgent/blue) and wait in the queue lane until a bed on the right frees up. Priority mode always sends the most severe waiting patient to the next free bed; First-come mode ignores severity and treats strictly by arrival order. The longer a patient waits, the more their condition deteriorates — a level-1 patient who is still waiting becomes an adverse event.
bed ← argmin(severity, arrivalTime) // priority mode
bed ← argmin(arrivalTime) // first-come mode
severity(t) -= 1 every (12s / decayRate) spent waiting
- Arrival rate — patients entering the department per minute.
- Treatment beds — the department's limited resource.
- Deterioration speed — how quickly an untreated patient's condition worsens.
- Triage strategy — compare adverse-event counts under priority vs naive FIFO at the same load.