added dataclass

This commit is contained in:
2024-05-23 10:39:14 +02:00
committed by Remy Moll
parent 0525cb8a2f
commit ddc6073fbb
2 changed files with 17 additions and 16 deletions

View File

@@ -1,14 +1,15 @@
from scipy.optimize import linprog
import numpy as np
from scipy.linalg import block_diag
from dataclasses import dataclass
# Defines the landmark class (aka some place there is to visit)
class landmark :
def __init__(self, name: str, attractiveness: int, loc: tuple):
self.name = name
self.attractiveness = attractiveness
self.loc = loc
@dataclass
class Landmark :
name : str
attractiveness : int
loc : tuple
# Convert the solution of the optimization into the list of edges to follow. Order is taken into account
def untangle(resx: list) :