Обновить wrapper.py

This commit is contained in:
2025-10-29 15:54:47 +03:00
parent 82158fea68
commit e18edce982

View File

@@ -22,5 +22,12 @@ if __name__=='__main__':
user_position.append(val_output['coordinates']['lon'])
else:
print('Адрес не найден')
route = build_route(found_points, mapping,user_position,user_time,5)
n_nodes = len(mapping)
allow_extend = any(v[1] for v in mapping.values())
print(len(mapping),allow_extend)
route =0
if allow_extend:
while n_nodes <= 5 and (route := build_route(found_points, mapping, user_position, user_time, n_nodes,strategy='random') or route): n_nodes += 1
else:
route= build_route(found_points, mapping, user_position, user_time, n_nodes,strategy='random')
print(route)