![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the A* algorithm. More...
#include <AStarLookupTable.h>
Public Member Functions | |
bool | consistent () const |
whether the heuristic ist consistent (found nodes are always visited on the shortest path the first time) More... | |
LandmarkLookupTable (const std::string &filename, const std::vector< E * > &edges, SUMOAbstractRouter< E, V > *router, const V *defaultVehicle, const std::string &outfile, const int maxNumThreads) | |
double | lowerBound (const E *from, const E *to, double speed, double speedFactor, double fromEffort, double toEffort) const |
provide a lower bound on the distance between from and to (excluding traveltime of both edges) More... | |
virtual | ~LandmarkLookupTable () |
Private Member Functions | |
std::string | getLandmark (int i) const |
Private Attributes | |
int | myFirstNonInternal |
std::vector< std::vector< double > > | myFromLandmarkDists |
std::map< std::string, int > | myLandmarks |
std::vector< std::vector< double > > | myToLandmarkDists |
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) |
PF | The prohibition function to use (prohibited_withPermissions/noProhibitions) |
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 101 of file AStarLookupTable.h.
|
inline |
Definition at line 103 of file AStarLookupTable.h.
References FXWorkerThread::Pool::add(), SUMOAbstractRouter< E, V >::clone(), SUMOAbstractRouter< E, V >::compute(), StringTokenizer::get(), LandmarkLookupTable< E, V >::getLandmark(), MAX2(), LandmarkLookupTable< E, V >::myFirstNonInternal, LandmarkLookupTable< E, V >::myFromLandmarkDists, LandmarkLookupTable< E, V >::myLandmarks, LandmarkLookupTable< E, V >::myToLandmarkDists, SUMOAbstractRouter< E, V >::recomputeCosts(), StringTokenizer::size(), FXWorkerThread::Pool::size(), StringUtils::toDouble(), UNUSED_PARAMETER, FXWorkerThread::Pool::waitAll(), and WRITE_WARNING.
|
inlinevirtual |
Definition at line 284 of file AStarLookupTable.h.
|
inlinevirtual |
whether the heuristic ist consistent (found nodes are always visited on the shortest path the first time)
Implements AbstractLookupTable< E, V >.
Definition at line 335 of file AStarLookupTable.h.
|
inlineprivate |
Definition at line 393 of file AStarLookupTable.h.
References LandmarkLookupTable< E, V >::myLandmarks.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable(), and LandmarkLookupTable< E, V >::lowerBound().
|
inlinevirtual |
provide a lower bound on the distance between from and to (excluding traveltime of both edges)
Implements AbstractLookupTable< E, V >.
Definition at line 287 of file AStarLookupTable.h.
References LandmarkLookupTable< E, V >::getLandmark(), MAX2(), LandmarkLookupTable< E, V >::myFirstNonInternal, LandmarkLookupTable< E, V >::myFromLandmarkDists, LandmarkLookupTable< E, V >::myLandmarks, LandmarkLookupTable< E, V >::myToLandmarkDists, and UNREACHABLE.
|
private |
Definition at line 343 of file AStarLookupTable.h.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable(), and LandmarkLookupTable< E, V >::lowerBound().
|
private |
Definition at line 341 of file AStarLookupTable.h.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable(), and LandmarkLookupTable< E, V >::lowerBound().
|
private |
Definition at line 340 of file AStarLookupTable.h.
Referenced by LandmarkLookupTable< E, V >::getLandmark(), LandmarkLookupTable< E, V >::LandmarkLookupTable(), and LandmarkLookupTable< E, V >::lowerBound().
|
private |
Definition at line 342 of file AStarLookupTable.h.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable(), and LandmarkLookupTable< E, V >::lowerBound().