coordinate_methods.calculate_new_coordinate#
- coordinate_methods.calculate_new_coordinate(driven_time: float, 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 coordinate of a driving ambulance.
The fraction of driven time compared to the total driving time is used for determining the new coordinate.
- Parameters:
driven_time (float) – The time that the ambulance has been driving until now.
source_location_ID (int) – The ID of the source location.
target_location_ID (int) – The ID of the target location.
siren_off (bool) – Whether the ambulance is driving without or with sirens on.
SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameters
NO_SIREN_PENALTY
andPRINT
are at least necessary. Seemain.py
for parameter explanations.SIMULATION_DATA (dict[str, Any]) – The simulation data.
SIREN_DRIVING_MATRIX
andNODES_REGION
are at least necessary. Seemain.py
and the input data section on the ELASPY website for explanations.
- Returns:
tuple[float, float] – A tuple with the new x and y coordinate.