Agent Based ED Waiting Time Model
Emergency department staffing training model. The service rates are illustrative.
Patient flow: Waiting → workload → Diagnosis → consultation → Discharged. Patients in Waiting can also leave without being seen. That branch has a zero hourly probability up to 20 waiting patients, then increases by 0.015 per additional waiting patient up to 0.60.
Doctor and Nurses set the total roster when a run starts. Each staff agent draws a random whole-hour start and works one continuous eight-hour Busy shift per 24-hour cycle. Shifts can cross midnight and repeat at the same time each day within a run. Off Duty covers the other sixteen hours. The first result sample is recorded before roster initialization.
Each Busy doctor and nurse contributes two patients per hour of preparation capacity to workload. Each Busy doctor also contributes three consultations per hour. These rates reflect the model's assumed split of doctors' working time. Off Duty staff contribute zero capacity. The capacity is shared across the relevant queue.
Use Staff Duty States in the simulation results to see Busy and Off Duty counts by role. Use the patient results to see Waiting, Diagnosis, Discharged, and Leaving ED Without Being Seen. Waiting plus Diagnosis is the number of patients still in the department.
Patient arrivals: the first day has approximately ten arrivals per hour from 08:00 until midnight, tapering until 02:00 the next day. From 02:00 to 08:00, each six-minute interval has a 20% chance of one arrival. Simulation coverage is set in Settings.
Spatial capacity combines usable floor space and treatment-equipment availability in patient-equivalent places. The illustrative default is 20. Current occupancy is Waiting plus Diagnosis. Workload preparation capacity is multiplied by Min(1, Max(0, Spatial capacity) / Max(1, occupancy)). At 40 patients and a capacity of 20, preparation capacity is 50% of the Busy-staff capacity. Over-capacity patients remain in the department while preparation slows. A value of 0 stops new preparation. Adjust the slider to compare crowded and under-capacity conditions.