ambulance.Ambulance.calculate_battery_reduction_and_distance_driving#

static Ambulance.calculate_battery_reduction_and_distance_driving(source_location_ID: int, target_location_ID: int, siren_off: bool, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any]) tuple[float, float]#

Calculates the battery reduction and distance during driving.

Parameters:
  • source_location_ID (int) – The initial location (i.e., source) of the ambulance.

  • target_location_ID (int) – The target location the ambulance drove to.

  • siren_off (bool) – Whether the siren is on or off.

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

  • SIMULATION_DATA (dict[str, Any]) – The simulation data. DISTANCE_MATRIX is at least necessary. It is based on DISTANCE_FILE. See main.py and the input data section on the ELASPY website for explanations.

Returns:

  • battery_reduction (float) – The battery reduction during driving in kWh.

  • distance_travelled (float) – The distance travelled in kilometers.