more coherent base types

This commit is contained in:
2024-07-17 13:22:43 +02:00
parent 4a291a69c9
commit 14a7f555df
3 changed files with 12 additions and 19 deletions

View File

@@ -1,9 +1,9 @@
from pydantic import BaseModel
from .landmarktype import LandmarkType
from typing import Optional, Literal
class Preference(BaseModel) :
name: str
type: LandmarkType # should match the attributes of the Preferences class
type: Literal['sightseeing', 'nature', 'shopping']
score: int # score could be from 1 to 5
# Input for optimization
@@ -17,12 +17,5 @@ class Preferences(BaseModel) :
# Shopping (diriger plutôt vers des zones / rues commerçantes)
shopping : Preference
""" # Food (price low or high. Combien on veut dépenser pour manger à midi/soir)
food_budget : Preference
# Tolérance au détour (ce qui détermine (+ ou -) le chemin emprunté)
detour_tol : Preference"""
max_time_minute: Optional[int] = 6*60
detour_tolerance_minute: Optional[int] = 0