Implement calculation of routes
When vehicles reroute because of an accident or similar, the route should of course be calculated in the first place. This is done using a typical shortest path algorithm (e.g. Dijkstra or A*). The algorithm is abstracted away from the Router
class in its own class (ShortestPath
) so vehicles can have a Router
instantiated with a reference to a ShortestPath
class.