Set initial distance to 0 in the greedy algorithm
This commit is contained in:
parent
193e9046eb
commit
aa4a3fdec9
|
@ -15,6 +15,7 @@ def get_first_solution(n, data):
|
||||||
)
|
)
|
||||||
furthest_index = distance_sum["distance"].astype(float).idxmax()
|
furthest_index = distance_sum["distance"].astype(float).idxmax()
|
||||||
furthest_row = distance_sum.iloc[furthest_index]
|
furthest_row = distance_sum.iloc[furthest_index]
|
||||||
|
furthest_row["distance"] = 0
|
||||||
return furthest_row
|
return furthest_row
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue