path distance from end < distance from next point

This commit is contained in:
Maciej Sobkowiak 2019-06-10 02:23:22 +02:00
parent 3c4508b689
commit f8864d2ecd

View File

@ -73,7 +73,9 @@ class Window():
s = to_collect_sorted[len(to_collect_sorted)-1]
for upoint in to_collect:
if upoint in visited :
path_distances.append(55555)
path_distances.append(100000)
elif dist(s,upoint) > dist(end,upoint):
path_distances.append(50000)
else:
path_distances.append(dist(s,upoint))
min_index = np.argmin(path_distances)