permafixed ?

This commit is contained in:
2024-07-16 09:01:58 +02:00
parent 4896e95617
commit 50bc8150c8
7 changed files with 50 additions and 958 deletions

View File

@@ -31,7 +31,7 @@ def test4(coordinates: tuple[float, float]) -> List[Landmark]:
sightseeing=Preference(
name='sightseeing',
type=LandmarkType(landmark_type='sightseeing'),
score = 0),
score = 5),
nature=Preference(
name='nature',
type=LandmarkType(landmark_type='nature'),
@@ -58,21 +58,22 @@ def test4(coordinates: tuple[float, float]) -> List[Landmark]:
landmarks_short.insert(0, start)
landmarks_short.append(finish)
max_walking_time = 50 # minutes
max_walking_time = 480 # minutes
detour = 0 # minutes
# First stage optimization
base_tour = solve_optimization(landmarks_short, max_walking_time, True)
# Second stage using linear optimization
if detour != 0 or len(base_tour) <= 4:
refined_tour = refine_optimization(landmarks, base_tour, max_walking_time+detour, True)
refined_tour = refine_optimization(landmarks, base_tour, max_walking_time, detour, True)
return refined_tour
test4(tuple((48.8344400, 2.3220540))) # Café Chez César
#test4(tuple((48.8344400, 2.3220540))) # Café Chez César
#test4(tuple((48.8375946, 2.2949904))) # Point random
#test4(tuple((47.377859, 8.540585))) # Zurich HB
#test4(tuple((45.7576485, 4.8330241))) # Lyon Bellecour
test4(tuple((45.7576485, 4.8330241))) # Lyon Bellecour
#test4(tuple((48.5848435, 7.7332974))) # Strasbourg Gare