From 0f3a13736b96749b340e7e76909f8d8cf484421f Mon Sep 17 00:00:00 2001 From: UmbertoJr Date: Mon, 18 Nov 2019 08:26:35 +0100 Subject: [PATCH] constructive --- src/constructive_algorithms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constructive_algorithms.py b/src/constructive_algorithms.py index 4f5a556..70c5acf 100644 --- a/src/constructive_algorithms.py +++ b/src/constructive_algorithms.py @@ -31,10 +31,10 @@ class nearest_neighbor: return np.array(tour) @staticmethod - def best_nn(self, instance_): + def best_nn(instance_): solutions, lens = [], [] for start in range(instance_.nPoints): - new_solution = self.nn(instance_, starting_node=start) + new_solution = nearest_neighbor.nn(instance_, starting_node=start) solutions.append(new_solution) lens.append(compute_lenght(new_solution, instance_.dist_matrix))