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
PRINTandDRIVING_USAGEare at least necessary. Seemain.pyfor parameter explanations.SIMULATION_DATA (dict[str, Any]) – The simulation data.
DISTANCE_MATRIXis at least necessary. It is based onDISTANCE_FILE. Seemain.pyand 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.