SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the Dijkstra algorithm. More...
#include <AStarRouter.h>
Data Structures | |
struct | EdgeInfo |
class | EdgeInfoComparator |
Public Types | |
typedef std::vector< std::vector< SUMOReal > > | LookupTable |
typedef SUMOReal(* | Operation) (const E *const, const V *const, SUMOReal) |
Public Member Functions | |
AStarRouter (size_t noE, bool unbuildIsWarning, Operation operation, const LookupTable *const lookup=0) | |
Constructor. More... | |
void | buildPathFrom (EdgeInfo *rbegin, std::vector< const E * > &edges) |
Builds the path from marked edges. More... | |
virtual SUMOAbstractRouter< E, V > * | clone () const |
virtual void | 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 | endQuery (int visits) |
SUMOReal | getEffort (const E *const e, const V *const v, SUMOReal t) const |
void | init () |
virtual void | prepare (const E *, const V *, bool) |
SUMOReal | recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime) const |
void | startQuery () |
virtual | ~AStarRouter () |
Destructor. More... | |
Static Public Member Functions | |
static LookupTable * | createLookupTable (const std::string &filename, const int size) |
Protected Attributes | |
EdgeInfoComparator | myComparator |
std::vector< EdgeInfo > | myEdgeInfos |
The container of edge information. More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
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... | |
const LookupTable *const | myLookupTable |
the lookup table for travel time heuristics More... | |
Operation | myOperation |
The object's operation to perform. 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) |
PF | The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) |
EC | The class to retrieve the effort for an edge from |
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 71 of file AStarRouter.h.
typedef std::vector<std::vector<SUMOReal> > AStarRouter< E, V, PF >::LookupTable |
Definition at line 75 of file AStarRouter.h.
typedef SUMOReal(* AStarRouter< E, V, PF >::Operation) (const E *const, const V *const, SUMOReal) |
Definition at line 74 of file AStarRouter.h.
|
inline |
Constructor.
Definition at line 77 of file AStarRouter.h.
|
inlinevirtual |
Destructor.
Definition at line 87 of file AStarRouter.h.
|
inline |
Builds the path from marked edges.
Definition at line 263 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 89 of file AStarRouter.h.
|
inlinevirtual |
Builds the route between the given edges using the minimum travel time.
Implements SUMOAbstractRouter< E, V >.
Definition at line 174 of file AStarRouter.h.
|
inlinestatic |
Definition at line 93 of file AStarRouter.h.
|
inlineinherited |
Definition at line 100 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), BulkStarRouter< E, V, PF >::compute(), and CHRouter< E, V, PF >::compute().
|
inlineinherited |
Definition at line 91 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), BulkStarRouter< E, V, PF >::compute(), CHRouterWrapper< E, V, PF >::recomputeCosts(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::recomputeCosts(), BulkStarRouter< E, V, PF >::recomputeCosts(), CHRouter< E, V, PF >::recomputeCosts(), and CHRouter< E, V, PF >::synchronize().
|
inline |
Definition at line 160 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
inlinevirtualinherited |
Reimplemented in BulkStarRouter< E, V, PF >.
Definition at line 87 of file SUMOAbstractRouter.h.
Referenced by RORouteAggregator::processAllRoutes().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 249 of file AStarRouter.h.
|
inlineinherited |
Definition at line 95 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), BulkStarRouter< E, V, PF >::compute(), and CHRouter< E, V, PF >::compute().
|
protected |
Definition at line 281 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
protected |
The container of edge information.
Definition at line 274 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::AStarRouter(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
protected |
the handler for routing errors
Definition at line 284 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
protected |
list of visited Edges (for resetting)
Definition at line 279 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), and AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::init().
|
protected |
A container for reusage of the min edge heap.
Definition at line 277 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), and AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::init().
|
protected |
the lookup table for travel time heuristics
Definition at line 287 of file AStarRouter.h.
Referenced by AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), and AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute().
|
protectedinherited |
The object's operation to perform.
Definition at line 107 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::clone(), CHRouterWrapper< E, V, PF >::clone(), BulkStarRouter< E, V, PF >::clone(), CHRouter< E, V, PF >::clone(), and SUMOAbstractRouter< E, PedestrianTrip< E, N > >::getEffort().