Set initial distance to 0 in the greedy algorithm
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user