Remove additional iteration from greedy algorithm
This commit is contained in:
parent
3aaf328a2c
commit
38585aa16b
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue