From c43f9c3b9a7f0e5f59fd008fc9f0ee07b8a9acbb Mon Sep 17 00:00:00 2001 From: UmbertoJr Date: Mon, 18 Nov 2019 11:33:04 +0100 Subject: [PATCH] local --- src/local_search.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/local_search.py b/src/local_search.py index 98b290a..f00026e 100644 --- a/src/local_search.py +++ b/src/local_search.py @@ -137,15 +137,7 @@ class TwoDotFiveOpt: return - old_link_len + changed_links_len @staticmethod - def loop2dot5opt(solution, instance, - max_num_of_changes=10000): # Iterate stoep2opt max_iter times (2-opt local search) - """ - - @param solution: - @param instance: - @param max_num_of_changes: - @return: - """ + def loop2dot5opt(solution, instance, max_num_of_changes=10000): matrix_dist = instance.dist_matrix actual_len = compute_lenght(solution, matrix_dist) new_tsp_sequence = np.copy(np.array(solution)) @@ -159,5 +151,4 @@ class TwoDotFiveOpt: else: return new_tsp_sequence.tolist() - # return new_tsp_sequence.tolist(), actual_len, uncross - return new_tsp_sequence.tolist() + return new_tsp_sequence.tolist() \ No newline at end of file