![]() |
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the A* algorithm. More...
#include <AStarRouter.h>
Data Structures | |
class | EdgeInfoComparator |
Public Types | |
typedef FullLookupTable< E, V > | FLT |
typedef LandmarkLookupTable< E, V > | LMLT |
typedef AbstractLookupTable< E, V > | LookupTable |
Public Member Functions | |
AStarRouter (const std::vector< E *> &edges, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr< const LookupTable > lookup=0) | |
Constructor. More... | |
AStarRouter (const std::vector< typename BASE::EdgeInfo > &edgeInfos, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr< const LookupTable > lookup=0) | |
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 travel time. More... | |
void | init () |
virtual | ~AStarRouter () |
Destructor. More... | |
Protected Attributes | |
EdgeInfoComparator | myComparator |
std::vector< typename BASE::EdgeInfo > | myEdgeInfos |
The container of edge information. More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
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... | |
const std::shared_ptr< const LookupTable > | myLookupTable |
the lookup table for travel time heuristics More... | |
double | myMaxSpeed |
maximum speed in the network More... | |
Computes the shortest path through a network using the A* 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 78 of file AStarRouter.h.
typedef FullLookupTable<E, V> AStarRouter< E, V, BASE >::FLT |
Definition at line 81 of file AStarRouter.h.
typedef LandmarkLookupTable<E, V> AStarRouter< E, V, BASE >::LMLT |
Definition at line 82 of file AStarRouter.h.
typedef AbstractLookupTable<E, V> AStarRouter< E, V, BASE >::LookupTable |
Definition at line 80 of file AStarRouter.h.
|
inline |
Constructor.
Definition at line 100 of file AStarRouter.h.
|
inline |
Definition at line 111 of file AStarRouter.h.
|
inlinevirtual |
Destructor.
Definition at line 123 of file AStarRouter.h.
|
inline |
Builds the path from marked edges.
Definition at line 293 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
inlinevirtual |
Definition at line 125 of file AStarRouter.h.
|
inlinevirtual |
Builds the route between the given edges using the minimum travel time.
Definition at line 143 of file AStarRouter.h.
|
inline |
Definition at line 129 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
protected |
Definition at line 311 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
protected |
The container of edge information.
Definition at line 304 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::AStarRouter(), AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
protected |
the handler for routing errors
Definition at line 314 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
protected |
list of visited Edges (for resetting)
Definition at line 309 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::init().
|
protected |
A container for reusage of the min edge heap.
Definition at line 307 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::init().
|
protected |
the lookup table for travel time heuristics
Definition at line 317 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().
|
protected |
maximum speed in the network
Definition at line 320 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::AStarRouter(), and AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute().