From: Wilmer A. <war...@my...> - 2013-03-29 03:58:09
|
Hello, I am sorry to post this topic again but I am having some difficulties understanding reroutes in TraCI. I am attaching a zip file that when expanded will contain runner3.py and a folder with the network files, the simulation works this way: 1. runner3.py will start the simulation which consists of cars initially routed to go from south to north using the center of a rectangular grid network. 2. The first car is set to stop and all following cars, after t = 20 seconds, are rerouted with either* traci.vehicle.rerouteEffort()* or * traci.vehicle.rerouteTraveltime()*. 3. In order to select what kind of reroute to use the # sign shuld be changed from on type of reroute to the other in the following block of code in runner3.py if time > 20000: traci.vehicle.rerouteEffort(carList[0]) #traci.vehicle.rerouteTraveltime(carList[0]) 4. In order to see the original routing of the cars, the previous block of code and the instruction: traci.vehicle.setStop("0", "2/2to2/3", pos=20.0, laneIndex=0, duration=2147483647)should be eliminated Results 1. traci.vehicle.rerouteTraveltime() appears not to work as no route change happens even though DijkstraRouterTT respond the queries. 2. traci.vehicle.rerouteEffort() seems to work OK even though in the example that I provide it provides the same rerouted route to all vehicles and that route is not the shortest. Intuitively I would expect ”traci.vehicle.rerouteEffort()” to provide the alternate shortest route and “traci.vehicle.rerouteTraveltime()” to produce the alternate fastest route. Is there any thing wrong in my interpretation? Help is greatly appreciated. Thank you, Wilmer |