better time management for optimizer

This commit is contained in:
2024-08-12 18:52:01 +02:00
parent a1fcc8d23b
commit 003b8d0f9c
6 changed files with 31 additions and 16 deletions

View File

@@ -33,6 +33,7 @@ class Landmark(BaseModel) :
return self.uuid.int
def __str__(self) -> str:
time_to_next_str = f", time_to_next={self.time_to_reach_next}" if self.time_to_reach_next else ""
return f'Landmark({self.type}): [{self.name} @{self.location}, score={self.attractiveness}{time_to_next_str}]'
time_to_next_str = f"time_to_next={self.time_to_reach_next}" if self.time_to_reach_next else ""
# return f'Landmark({self.type}): [{self.name} @{self.location}, score={self.attractiveness}{time_to_next_str}]'
return f'({self.type[:4]}), score={self.attractiveness}\tmain:{not self.is_secondary}\tduration={self.duration}\t{time_to_next_str}\t{self.name}'