![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the Dijkstra algorithm. More...
#include <DijkstraRouter.h>
Data Structures | |
class | EdgeInfoByEffortComparator |
Public Member Functions | |
void | buildPathFrom (const typename BASE::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, bool silent=false) |
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 BASE::EdgeInfo & | getEdgeInfo (int index) const |
void | init () |
virtual | ~DijkstraRouter () |
Destructor. More... | |
Private Member Functions | |
DijkstraRouter (const std::vector< typename BASE::EdgeInfo > &edgeInfos, bool unbuildIsWarning, typename BASE::Operation effortOperation, typename BASE::Operation ttOperation, bool silent, EffortCalculator *calc) | |
Private Attributes | |
EdgeInfoByEffortComparator | myComparator |
std::vector< typename BASE::EdgeInfo > | myEdgeInfos |
The container of edge information. More... | |
EffortCalculator *const | myExternalEffort |
std::vector< typename BASE::EdgeInfo * > | myFound |
list of visited Edges (for resetting) More... | |
std::vector< typename BASE::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 82 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inlinevirtual |
Destructor.
Definition at line 92 of file DijkstraRouter.h.
|
inlineprivate |
Definition at line 244 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Builds the path from marked edges.
Definition at line 230 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
inlinevirtual |
Definition at line 94 of file DijkstraRouter.h.
References MsgHandler::getWarningInstance(), DijkstraRouter< E, V, BASE >::myEdgeInfos, DijkstraRouter< E, V, BASE >::myExternalEffort, and DijkstraRouter< E, V, BASE >::mySilent.
|
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 113 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::buildPathFrom(), Named::getIDSecure(), getTravelTime(), DijkstraRouter< E, V, BASE >::init(), DijkstraRouter< E, V, BASE >::myComparator, DijkstraRouter< E, V, BASE >::myEdgeInfos, DijkstraRouter< E, V, BASE >::myExternalEffort, DijkstraRouter< E, V, BASE >::myFound, DijkstraRouter< E, V, BASE >::myFrontierList, DijkstraRouter< E, V, BASE >::mySilent, EffortCalculator::setInitialState(), STEPS2TIME, SVC_IGNORING, toString(), and EffortCalculator::update().
Referenced by PedestrianRouter< E, L, N, V >::compute().
|
inline |
Definition at line 239 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Definition at line 98 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 268 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
private |
The container of edge information.
Definition at line 261 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 |
Definition at line 258 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 266 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 264 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 256 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().