Implement Rerouting of Cars detecting issue
Description
We need to support rerouting of vehicles that have received a message announcing an issue.
Implementation Details
In order to do so, once a vehicle has detected such a message, the preset path of the vehicle must be swapped for a new path using traci. Starting from the current edge
, we must calculate a new route to the vehicle's destination. This may be done using SUMO's internal routing mechanism. In order to trigger rerouting, vehicles that are aware of the issue may set the effort of the issue's origin edge accordingly using the setEffort()
method.
NOTE: For simple scenarios, the edge effort should be set to infty
, for more complex scenarios, the effort should be calculated from the metadata passed in the issue message. The default effort value is -1.
When the message triggering an edge effort change is removed from a vehicle's message store, the edge's effort should also be reset to the default value to prevent 'biased' routing.