path distance from end < distance from next point
This commit is contained in:
parent
3c4508b689
commit
f8864d2ecd
@ -73,7 +73,9 @@ class Window():
|
|||||||
s = to_collect_sorted[len(to_collect_sorted)-1]
|
s = to_collect_sorted[len(to_collect_sorted)-1]
|
||||||
for upoint in to_collect:
|
for upoint in to_collect:
|
||||||
if upoint in visited :
|
if upoint in visited :
|
||||||
path_distances.append(55555)
|
path_distances.append(100000)
|
||||||
|
elif dist(s,upoint) > dist(end,upoint):
|
||||||
|
path_distances.append(50000)
|
||||||
else:
|
else:
|
||||||
path_distances.append(dist(s,upoint))
|
path_distances.append(dist(s,upoint))
|
||||||
min_index = np.argmin(path_distances)
|
min_index = np.argmin(path_distances)
|
||||||
|
Loading…
Reference in New Issue
Block a user