added dataclass
This commit is contained in:
@@ -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) :
|
||||
|
Reference in New Issue
Block a user