ambulance.Ambulance.select_charging_station#

static Ambulance.select_charging_station(charging_stations_location: dict[str, list[simpy.resources.resource.Resource | float]], location_ID: int, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any])#

Selects a charging station based on current availability.

Parameters:
  • charging_stations_location (dict[str, list[sp.resources.resource.Resource | float]]) – The charging stations resources at all locations of the same type (bases or hospitals) together with their charging speeds.

  • location_ID (int) – The location ID.

  • SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameter PRINT is at least necessary. See main.py for parameter explanations.

  • SIMULATION_DATA (dict[str, Any]) – The simulation data. nr_times_no_fast_no_regular_available is at least necessary. It represents the number of times no fast and regular chargers were available.

Raises:

Exception – If invalid input is detected.

Returns:

  • sp.resources.resource.Resource – The selected charger.

  • float – The charging speed in kW of the selected charger.