ambulance.Ambulance.process_patient#
- Ambulance.process_patient(patient_ID: int, patient_location_ID: int, hospital_location_ID: int, simulation_times: dict[str, numpy.ndarray], charging_stations_hospitals: dict[str, list[simpy.resources.resource.Resource | float]], to_hospital_bool: ndarray, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any])#
Processes a patient.
The ambulance first drives to the patient, then performs on-site treatment. If the patient needs to be transported to the hospital, the ambulance drives to the hospital and then drops the patient off.
- Parameters:
patient_ID (int) – The patient ID.
patient_location_ID (int) – The arrival location of the patient.
hospital_location_ID (int) – The assigned hospital (in case the patient needs to be transported).
simulation_times (dict[str, np.ndarray]) – Contains the interarrival times, the on-site aid times and the drop-off times.
charging_stations_hospitals (dict[str, list[sp.resources.resource.Resource | float]]) – The charging stations resources at all hospitals together with their charging speeds.
to_hospital_bool (np.ndarray) – Specifies for each patient whether transportation to the hospital is required or not.
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.
- Raises:
Exception –
If an ambulance is already helping a patient. 2. If more than one patient was assigned to the ambulance.