From aa4a3fdec99043ae104f0db4b58350b538260dea Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 15 Apr 2021 20:51:02 +0200 Subject: [PATCH] Set initial distance to 0 in the greedy algorithm --- src/processing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/processing.py b/src/processing.py index 290fc74..d338b31 100644 --- a/src/processing.py +++ b/src/processing.py @@ -15,6 +15,7 @@ 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