From f39fb0aa0bb49b2d8698f1bbb3231962ef0154ef Mon Sep 17 00:00:00 2001 From: UmbertoJr Date: Mon, 18 Nov 2019 07:03:34 +0100 Subject: [PATCH] constructive algorithms --- src/__init__.py | 3 +++ src/constructive_algorithms.py | 1 + src/utils.py | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index 3bc0b72..73a3036 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -2,8 +2,11 @@ import os if 'AI' in os.getcwd(): from src.utils import * + from src.constructive_algorithms import * + from src.local_search import * from src.TSP_solver import * from src.io_tsp import * + else: from AI2019.src.utils import * from AI2019.src.TSP_solver import * diff --git a/src/constructive_algorithms.py b/src/constructive_algorithms.py index 413a0d6..ddf1d19 100644 --- a/src/constructive_algorithms.py +++ b/src/constructive_algorithms.py @@ -1,4 +1,5 @@ import os +import numpy as np if 'AI' in os.getcwd(): from src.utils import * else: diff --git a/src/utils.py b/src/utils.py index 43d2f76..613ff65 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,4 +1,3 @@ -import numpy as np def compute_lenght(solution, dist_matrix): total_length = 0