diff --git a/src/processing.py b/src/processing.py index 9bf06f8..0539c7a 100644 --- a/src/processing.py +++ b/src/processing.py @@ -15,7 +15,6 @@ def get_first_solution(n, data): ) furthest_index = distance_sum["distance"].astype(float).idxmax() furthest_row = distance_sum.iloc[furthest_index] - furthest_row["distance"] = 0 return furthest_row @@ -105,10 +104,10 @@ def execute_algorithm(choice, n, m, data): def show_results(solutions, time_delta): distance_sum = solutions["distance"].sum() - duplicates = solutions.duplicated() + duplicates = solutions.duplicated().any() print(solutions) print("Total distance: " + str(distance_sum)) - if solutions[duplicates].empty: + if not duplicates: print("No duplicates found") print("Execution time: " + str(time_delta))