ambulance_simulation.patient_arrival#
- ambulance_simulation.patient_arrival(env: Environment, patient_ID: int, patient_location_ID: int, patient_queue: deque, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any]) tuple[int, patient.Patient] #
Processes a patient arrival.
The patient is assigned to a hospital (in case the patient needs to be transported), a new Patient object is created and the Patient is appended to the patient_queue.
- Parameters:
env (sp.core.Environment) – The SimPy environment.
patient_ID (int) – The patient ID.
patient_location_ID (int) – The arrival location of the patient.
patient_queue (deque) – The patient queue.
SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameter
PRINT
is at least necessary. Note that methods that are called within this method may require more parameters. Seemain.py
for parameter explanations.SIMULATION_DATA (dict[str, Any]) – The simulation data.
output_patient
is at least necessary. Seemain.py
and the input data section on the ELASPY website for explanations. Note that methods that are called within this method may require more data.
- Returns:
hospital_location_ID (int) – The assigned hospital location ID.
new_patient (Patient) – The new Patient object.