ambulance_simulation.help_waiting_patients#

ambulance_simulation.help_waiting_patients(env: Environment, ambulances: list[ambulance.Ambulance], charging_stations: dict[str, dict[str, list[simpy.resources.resource.Resource | float]]], simulation_times: dict[str, numpy.ndarray], to_hospital_bool: ndarray, patient_queue: deque, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any])#

Checks in time intervals whether there are waiting patients that can be helped by ambulances.

Parameters:
  • env (sp.core.Environment) – The SimPy environment.

  • ambulances (list[Ambulance]) – A list of ambulances.

  • charging_stations (dict[str, dict[str, list[sp.resources.resource.Resource | float]]]) – The charging stations resources at all bases and all hospitals together with their charging speeds.

  • simulation_times (dict[str, np.ndarray]) – Contains the interarrival times, the on-site aid times and the drop-off times.

  • to_hospital_bool (np.ndarray) – Specifies for each patient whether transportation to the hospital is required or not.

  • patient_queue (deque) – The patient queue.

  • SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameters TIME_AFTER_LAST_ARRIVAL, PRINT and INTERVAL_CHECK_WP are at least necessary. Note that methods that are called within this method may require more parameters. See main.py for parameter explanations.

  • SIMULATION_DATA (dict[str, Any]) – The simulation data. TIME_LAST_ARRIVAL is at least necessary. It represents the arrival time of the last patient.