相扑路线更换失败

2024-10-01 02:33:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我用相扑来分析芝加哥市区汽车的流动性。这个场景包含了城市的一小部分。你知道吗

我根据randomTrips工具生成车辆路线,然后使用duarouter工具清理路线。你知道吗

我使用Python语言和traci库来调用SUMO。这些调用根据不同的参数对车辆进行重新路由。当我调用该方法时出现问题“traci.vehicle.setRoute路径()". 你知道吗

由于这个问题没有提示我可以做什么来解决它,我试图设置相同的路线,车辆已经有,并发生了相同的错误。错误大多数时候都会发生,但有相同的例外,但路由存在于“路径”中。net.xml文件“文件。你知道吗

traci.vehicle.setRoute(vehicle, shortest_path)

我得到的错误消息是:

Traceback (most recent call last):

File "generic_its.py", line 106, in start_simulation run(network, begin, end, interval, route_log, replication, float(p))
File "generic_its.py", line 73, in run error_count, total_count = traffic_mannager.reroute_vehicles(road_network_graph, p, error_count, total_count)
File "/home/eros/Documentos/Projects/securesimulation/src/traffic_mannager.py", line 71, in reroute_vehicles traci.vehicle.setRoute(vehicle, shortest_path[1])
File "/usr/share/sumo/tools/traci/_vehicle.py", line 856, in setRoute self._connection._sendExact()
File "/usr/share/sumo/tools/traci/connection.py", line 104, in _sendExact raise TraCIException(prefix[1], _RESULTS[prefix[2]], err) TraCIException: Route replacement failed for 111

[已解决]

谢谢你的帮助!实际上,我通过更新我正在使用的库的版本解决了这个问题。你知道吗


Tags: 文件工具inpy路径路由count错误