Remove additional iteration from greedy algorithm

This commit is contained in:
coolneng 2021-05-19 18:26:56 +02:00
parent 3aaf328a2c
commit 38585aa16b
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ def greedy_algorithm(n, m, data):
solutions = DataFrame(columns=["point", "distance"]) solutions = DataFrame(columns=["point", "distance"])
first_solution = get_first_solution(n, data) first_solution = get_first_solution(n, data)
solutions = solutions.append(first_solution, ignore_index=True) solutions = solutions.append(first_solution, ignore_index=True)
for _ in range(m): for _ in range(m - 1):
element = explore_solutions(solutions, data) element = explore_solutions(solutions, data)
solutions = solutions.append(element) solutions = solutions.append(element)
data = remove_duplicates( data = remove_duplicates(