gpt4 book ai didi

incorporate traffic signal waiting time into travel time using osmnx(使用osmnx将交通信号等待时间合并到出行时间中)

转载 作者:bug小助手 更新时间:2023-10-24 21:53:34 35 4
gpt4 key购买 nike



ox.shortest_path allows me to find a route that minimizes travel time. However, the aggregate travel time as computed in this osmnx example (https://github.com/gboeing/osmnx-examples/blob/main/notebooks/02-routing-speed-time.ipynb) only computes travel time on the edge, without considering waiting time in front of traffic lights:

Ox.Shorest_Path允许我找到一条最大限度地减少旅行时间的路线。然而,在此osmnx示例中计算的总出行时间(https://github.com/gboeing/osmnx-examples/blob/main/notebooks/02-routing-speed-time.ipynb)仅计算边缘的出行时间,而不考虑红绿灯前的等待时间:


# compare the two routes
route1_length = int(sum(ox.utils_graph.route_to_gdf(G, route1, "length")["length"]))
route2_length = int(sum(ox.utils_graph.route_to_gdf(G, route2, "length")["length"]))
route1_time = int(sum(ox.utils_graph.route_to_gdf(G, route1, "travel_time")["travel_time"]))
route2_time = int(sum(ox.utils_graph.route_to_gdf(G, route2, "travel_time")["travel_time"]))
print("Route 1 is", route1_length, "meters and takes", route1_time, "seconds.")
print("Route 2 is", route2_length, "meters and takes", route2_time, "seconds.")

The "highway" tag for nodes lists if there are traffic signals (i.e. "traffic_signals"). I think I can probably find out how many nodes on the route have traffic_signals, and maybe assume the wait time for each traffic signal is 20 seconds.

节点的“高速公路”标签列出了是否有交通信号(即“TRAFFORM_SIGNAS”)。我想我大概可以找出路线上有多少个节点有交通信号,并假设每个交通信号的等待时间是20秒。


Are there better ways to estimate routing time while taking into account the waiting time in front of a signal?

有没有更好的方法来估计路线时间,同时考虑到信号灯前的等待时间?


更多回答
优秀答案推荐
更多回答

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com