Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Change route dynamically

1) This error most likely occurs because the destination edge is not reachable from the current vehicle edge.
2) you can use traci.simulation.findRoute() to get a list of edges as well as the estimated travel time (if a route exists). Alternatively, you can use vehicle.getRoute to get the list of edges after a successful call to changeTarget
3) Autocomplete does not work with the python client because it uses some advanced coding techniques to modify the domain objects. Instead, use the documentation at http://sumo.dlr.de/daily/pydoc/traci.html

regards,
Jakob

2018-08-07 10:08 GMT+02:00 mohsen hs <mohsenhs82@xxxxxxxxx>:
Dear SUMO users and developers, 


I would like to change the route dynamically via traci, but I face some challenges and appreciate that if you could assist.

1- by using 
aa=traci.vehicle.getIDList()
traci.vehicle.changeTarget(aa[0], "53i")

SUMO throws this error: traci.exceptions.TraCIException: Route replacement failed for left_0
left_0 is the ID of the vehicle.


2- How can I get a list of edges from the current location (by using getRoadID) to the new target "53i" in this case?  

3- I am using visual studio (VS) for connecting to traci and notice that it does not have the autocomplete function, is there a guide about enabling this in VS?


Many thanks
Mohsen

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top