eclipse-sumo/sumo

Using TraCI to add route with a stop

Closed this issue · 1 comments

when i use traci.route.add("trip", ["startEdge", "endEdge"]), i want set a stop in the middle edge the vehicle will pass, but the simulation will generate error shows "stop for vehicle '1' on lane 'e_2_0' is not downstream the current route."
looks like the "setstop" can not recognize the other edge the route include, it can only recognize the start and the end edge even if there is only one way
route.zip

This is not a bug. If you use a trip (a "route" consisting of start and end edge only) the final route is only calculated once the vehicle gets inserted not on creation to account for the current traffic situation or road blockings. If you add a single simulation step in your example before you add the stop it works.