Hi,
I am trying to use rerouters to change dynamically my route (keeping the destination fixed). I have initialized my network with multiple vehicles with a specific route to each vehicle, that are added into the network at multiple intervals of time. The next
step is to reroute all the vehicles dynamically, using TraCI. For this, I can see two of the possible options listed on the documentation:
- Using rerouteTravelTime
if traci.vehicle.getWaitingTime(VID[v]) > 600:
traci.vehicle.rerouteTraveltime(VID[v],True)
But, I dont know where I am going wrong, I am unable to reroute.
where VID is a list of all my vehicles. - Using device.rerouting. as listed on the webpage https://sumo.dlr.de/docs/Demand/Automatic_Routing.html
But, I do not understand how exactly I must use these commands. Also, how different are these two methods. I would really appreciate it if anyone comments on the exact syntax, the difference in two methods, and also any other suggestions to serve my main purpose.
Thank you,
PSK
|