Use a more conservative heuristic

This commit is contained in:
Emi Simpson 2023-02-12 11:10:15 -05:00
parent c31b532a88
commit 8904060f3a
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
1 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class World:
The following assumptions are made to speed up the process, at the cost of
accuracy:
- All tiles have the exact same movement speed (600 milliseconds / meter)
- All tiles have the exact same movement speed (500 milliseconds / meter)
- All tiles are in-bounds
- All tiles are at the same elevation
@ -269,7 +269,7 @@ class World:
>>> world = World([], lon_scale = 500, lat_scale = 400)
>>> world.heuristic(Point(0, 0), Point(3, 5))
1632000
1360000
"""
# Taxicab distance in each direction
@ -290,7 +290,7 @@ class World:
# TODO: Test whether adding in elevation is beneficial
estimated_speed = 600 # milliseconds / meter = microseconds / millimeters
estimated_speed = 500 # milliseconds / meter = microseconds / millimeters
return estimated_speed * total_flat_distance