Undergraduate Computer Science student at The University of Manitoba
Implementation of Vehicle Re-routing
In the last post I mentioned the TraCI commands that woudl be useful for rerouting of emergency vehicles. I decided to make a simple network in NETEDIT and then added a few vehicles to try using some of the TaCI commands. For simplicity, I build a circular track in NETEDIT and had several vehicles driving in circles indefinitely. I added an intersection at one point of the track however, so I could try rerouting one of the vehicles. Easiest way to do this is to check if the simualtion timestep was above 200 in the main TraCI control loop, and if so, reroute one of the vehciles. Since it is unknown which edge the vehicle would be on at that time in advance, and not wanting to have to retreive this information in the control loop (minimize function calls at this time), I decidied to use the changeDestination command. Running the simualtion via TraCI, sure enough, once the time step exceeded 200, one of the vehicles stopped going in circles and turned down the offramp.
Now that I have some experience with these commands, I will try building some more complex scenarios, using detectors as analogues to road-side units, to detect certain states and reroute vehicles dynamically.
Screenshot of running circular network in SUMO for testing rerouting