Eclipse SUMO - Simulation of Urban MObility
LandmarkLookupTable< E, V > Class Template Reference

Computes the shortest path through a network using the A* algorithm. More...

#include <AStarLookupTable.h>

Inheritance diagram for LandmarkLookupTable< E, V >:
Collaboration diagram for LandmarkLookupTable< E, V >:

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
 

Detailed Description

template<class E, class V>
class LandmarkLookupTable< E, V >

Computes the shortest path through a network using the A* algorithm.

The template parameters are:

Parameters
EThe edge class to use (MSEdge/ROEdge)
VThe vehicle class to use (MSVehicle/ROVehicle)
PFThe prohibition function to use (prohibited_withPermissions/noProhibitions)
ECThe 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.

Constructor & Destructor Documentation

◆ LandmarkLookupTable()

template<class E , class V >
LandmarkLookupTable< E, V >::LandmarkLookupTable ( const std::string &  filename,
const std::vector< E *> &  edges,
SUMOAbstractRouter< E, V > *  router,
const V *  defaultVehicle,
const std::string &  outfile,
const int  maxNumThreads 
)
inline

◆ ~LandmarkLookupTable()

template<class E , class V >
virtual LandmarkLookupTable< E, V >::~LandmarkLookupTable ( )
inlinevirtual

Definition at line 284 of file AStarLookupTable.h.

Member Function Documentation

◆ consistent()

template<class E , class V >
bool LandmarkLookupTable< E, V >::consistent ( ) const
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.

◆ getLandmark()

template<class E , class V >
std::string LandmarkLookupTable< E, V >::getLandmark ( int  i) const
inlineprivate

Definition at line 393 of file AStarLookupTable.h.

◆ lowerBound()

template<class E , class V >
double LandmarkLookupTable< E, V >::lowerBound ( const E *  from,
const E *  to,
double  speed,
double  speedFactor,
double  fromEffort,
double  toEffort 
) const
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 MAX2(), and UNREACHABLE.

Field Documentation

◆ myFirstNonInternal

template<class E , class V >
int LandmarkLookupTable< E, V >::myFirstNonInternal
private

Definition at line 343 of file AStarLookupTable.h.

◆ myFromLandmarkDists

template<class E , class V >
std::vector<std::vector<double> > LandmarkLookupTable< E, V >::myFromLandmarkDists
private

Definition at line 341 of file AStarLookupTable.h.

◆ myLandmarks

template<class E , class V >
std::map<std::string, int> LandmarkLookupTable< E, V >::myLandmarks
private

Definition at line 340 of file AStarLookupTable.h.

◆ myToLandmarkDists

template<class E , class V >
std::vector<std::vector<double> > LandmarkLookupTable< E, V >::myToLandmarkDists
private

Definition at line 342 of file AStarLookupTable.h.


The documentation for this class was generated from the following file: