Search code examples
sumo

Split edges in SUMO must be specified in traci setRoute?


i have a given network and i want to set different speed limits per edge. i use the sumo functionality as mentioned here https://sumo.dlr.de/docs/Networks/PlainXML.html#road_segment_refining

so if the network was with road e1 leading to e2. i split e1 at pos 100 now i have a network with e1,e1.100,e2

currently I'm having issues with setting the route [e1,e2], traci.exceptions.TraCIException: Route replacement failed
i want to use traci setRoute but without indicating e1.100. is it possible?


Solution

  • No, not directly. The route always needs to contain all edges the car is going to drive (except for junction internal edges). You could however call traci.simulation.findRoute beforehand or use traci.vehicle.setTarget if there is only one route (or the desired route is the fastest) to your destination.