![]() |
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) |
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... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors 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 93 of file DijkstraRouter.h.
|
inlineprivate |
Definition at line 241 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Builds the path from marked edges.
Definition at line 227 of file DijkstraRouter.h.
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 114 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::buildPathFrom(), getTravelTime(), MsgHandler::inform(), DijkstraRouter< E, V, BASE >::init(), 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, STEPS2TIME, SVC_IGNORING, toString(), and EffortCalculator::update().
Referenced by PedestrianRouter< E, L, N, V >::compute().
|
inline |
Definition at line 236 of file DijkstraRouter.h.
References DijkstraRouter< E, V, BASE >::myEdgeInfos.
|
inline |
Definition at line 99 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 269 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::compute().
|
private |
The container of edge information.
Definition at line 262 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 254 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().
|
private |
Definition at line 259 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 267 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 265 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 257 of file DijkstraRouter.h.
Referenced by DijkstraRouter< E, V, BASE >::clone(), and DijkstraRouter< E, V, BASE >::compute().