fixed timing and optimizer speed
This commit is contained in:
		| @@ -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( | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user