SUMO路线更换失败

时间:2019-05-16 17:58:14

标签: python sumo

我正在使用SUMO,以便我可以分析芝加哥市汽车的城市机动性。该场景只占城市的一小部分。

我根据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

0 个答案:

没有答案