![]() |
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the Dijkstra algorithm. More...
#include <DijkstraRouter.h>


Data Structures | |
| class | EdgeInfo |
| class | EdgeInfoByEffortComparator |
Public Member Functions | |
| void | buildPathFrom (const EdgeInfo *rbegin, std::vector< const E *> &edges) |
| Builds the path from marked edges. More... | |
| virtual SUMOAbstractRouter< E, V > * | clone () |
| virtual bool | compute (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E *> &into) |
| Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme. More... | |
| DijkstraRouter (const std::vector< E *> &edges, bool unbuildIsWarning, typename BASE::Operation effortOperation, typename BASE::Operation ttOperation=nullptr, bool silent=false, EffortCalculator *calc=nullptr) | |
| Constructor. More... | |
| const EdgeInfo & | getEdgeInfo (int index) const |
| void | init () |
| virtual | ~DijkstraRouter () |
| Destructor. More... | |
Private Member Functions | |
| DijkstraRouter (const std::vector< EdgeInfo > &edgeInfos, bool unbuildIsWarning, typename BASE::Operation effortOperation, typename BASE::Operation ttOperation, bool silent, EffortCalculator *calc) | |
Private Attributes | |
| EdgeInfoByEffortComparator | myComparator |
| std::vector< EdgeInfo > | myEdgeInfos |
| The container of edge information. More... | |
| MsgHandler *const | myErrorMsgHandler |
| the handler for routing errors More... | |
| EffortCalculator *const | myExternalEffort |
| std::vector< EdgeInfo * > | myFound |
| list of visited Edges (for resetting) More... | |
| std::vector< EdgeInfo * > | myFrontierList |
| A container for reusage of the min edge heap. More... | |
| bool | mySilent |
| whether to supress warning/error if no route was found More... | |
Computes the shortest path through a network using the Dijkstra algorithm.
The template parameters are:
| E | The edge class to use (MSEdge/ROEdge) |
| V | The vehicle class to use (MSVehicle/ROVehicle) |
| BASE | The base class to use (SUMOAbstractRouterPermissions/SUMOAbstractRouter) |
The router is edge-based. It must know the number of edges for internal reasons and whether a missing connection between two given edges (unbuild route) shall be reported as an error or as a warning.
Definition at line 63 of file DijkstraRouter.h.
|
inline |
Constructor.
Definition at line 123 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::EdgeInfo::EdgeInfo(), and DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inlinevirtual |
Destructor.
Definition at line 134 of file DijkstraRouter.h.
|
inlineprivate |
Definition at line 282 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::EdgeInfo::EdgeInfo(), and DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Builds the path from marked edges.
Definition at line 268 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::EdgeInfo::edge, and DijkstraRouter< E, V, BASE >::EdgeInfo::prev.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
inlinevirtual |
|
inlinevirtual |
Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme.
Definition at line 155 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::buildPathFrom(), DijkstraRouter< E, V, BASE >::EdgeInfo::edge, DijkstraRouter< E, V, BASE >::EdgeInfo::effort, getTravelTime(), MsgHandler::inform(), DijkstraRouter< E, V, BASE >::init(), DijkstraRouter< E, V, BASE >::EdgeInfo::leaveTime, DijkstraRouter< E, V, BASE >::myComparator, DijkstraRouter< E, V, BASE >::myEdgeInfos, DijkstraRouter< E, V, BASE >::myErrorMsgHandler, DijkstraRouter< E, V, BASE >::myExternalEffort, DijkstraRouter< E, V, BASE >::myFound, DijkstraRouter< E, V, BASE >::myFrontierList, DijkstraRouter< E, V, BASE >::mySilent, DijkstraRouter< E, V, BASE >::EdgeInfo::prev, STEPS2TIME, SVC_IGNORING, toString(), EffortCalculator::update(), DijkstraRouter< E, V, BASE >::EdgeInfo::via, and DijkstraRouter< E, V, BASE >::EdgeInfo::visited.
Referenced by PedestrianRouter< E, L, N, V >::compute().
|
inline |
Definition at line 277 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Definition at line 140 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myFound, and DijkstraRouter< E, V, BASE >::myFrontierList.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
private |
Definition at line 310 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
private |
The container of edge information.
Definition at line 303 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), DijkstraRouter< E, V, BASE >::compute(), DijkstraRouter< E, V, BASE >::DijkstraRouter(), and DijkstraRouter< E, V, BASE >::getEdgeInfo().
|
private |
the handler for routing errors
Definition at line 295 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().
|
private |
Definition at line 300 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().
|
private |
list of visited Edges (for resetting)
Definition at line 308 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute(), and DijkstraRouter< E, V, BASE >::init().
|
private |
A container for reusage of the min edge heap.
Definition at line 306 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute(), and DijkstraRouter< E, V, BASE >::init().
|
private |
whether to supress warning/error if no route was found
Definition at line 298 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().