fixed timing and optimizer speed
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m49s
Build and release APK / Build APK (pull_request) Successful in 5m40s

This commit is contained in:
2024-09-10 16:50:12 +02:00
parent 20f20da9c5
commit 3475990e5f
5 changed files with 11 additions and 11 deletions

View File

@@ -318,6 +318,7 @@ class LandmarkManager:
if "viewpoint" in tag:
score += self.viewpoint_bonus
duration = 10
if "image" in tag:
score += self.image_bonus
@@ -334,7 +335,6 @@ class LandmarkManager:
if tag == "building" and elem.tag('building') in ['retail', 'supermarket', 'parking']:
skip = True
break
# Get additional information
# if tag == 'wikipedia' :
@@ -352,14 +352,14 @@ class LandmarkManager:
score = score_function(score)
if "place_of_worship" in elem.tags().values() :
score = int(score*self.church_coeff)
duration = 20
duration = 15
elif "museum" in elem.tags().values() :
score = int(score*self.church_coeff)
duration = 60
else :
duration = 30
duration = 5
# Generate the landmark and append it to the list
landmark = Landmark(

View File

@@ -193,7 +193,7 @@ class Optimizer:
for j, spot2 in enumerate(landmarks) :
t = get_time(spot1.location, spot2.location) + spot1.duration
dist_table[j] = t
closest = sorted(dist_table)[:22]
closest = sorted(dist_table)[:20]
for i, dist in enumerate(dist_table) :
if dist not in closest :
dist_table[i] = 32700