SUMO - Simulation of Urban MObility
TraCIDijkstraRouter< E > Class Template Reference

Computes the shortest path through a network using the dijkstra algorithm. More...

#include <TraCIDijkstraRouter.h>

Inheritance diagram for TraCIDijkstraRouter< E >:
SUMOAbstractRouter< E, MSVehicle >

Data Structures

struct  EdgeInfo
class  EdgeInfoByEffortComperator
class  EdgeInfoCont

Public Member Functions

void buildPathFrom (EdgeInfo *rbegin, std::vector< const E * > &edges)
 Builds the path from marked edges.
virtual void compute (const E *from, const E *to, const MSVehicle *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.
void endQuery (int visits)
virtual SUMOReal getEffort (const E *const e, SUMOReal t) const
virtual void prepare (const E *, const MSVehicle *, bool)
SUMOReal recomputeCosts (const std::vector< const E * > &edges, const MSVehicle *const v, SUMOTime msTime) const
void startQuery ()
 TraCIDijkstraRouter (size_t noE)
 Constructor.
virtual ~TraCIDijkstraRouter ()
 Destructor.

Protected Member Functions

void clearTemporaryStorages (std::vector< bool > *edgeList, EdgeInfoCont *consecutionList)
 Saves the temporary storages for further usage.

Protected Attributes

size_t myNoE
 The network to use.
InstancePool< EdgeInfoContmyReusableEdgeInfoLists
 A container for reusage of edge consecution lists.
InstancePool< std::vector< bool > > myReusableEdgeLists
 A container for reusage of examined edges lists.

Detailed Description

template<class E>
class TraCIDijkstraRouter< E >

Computes the shortest path through a network using the dijkstra algorithm.

The template parameters are:

Parameters:
EThe edge class to use (MSEdge/ROEdge)

This router is basically the same as the SUMODijkstraRouter, except for the following: If start and destination edge are the same, the computed route does not consist of just the starting edge. Instead, if there is a path from the starting edge through the network back to itself, the route will consist of this path, containing the same edge both at the beginning and at the end. Furthermore, no vehicle is regarded to determine the efforts of the edges, therefore no prohibition function is used.

Definition at line 62 of file TraCIDijkstraRouter.h.


Constructor & Destructor Documentation

template<class E>
TraCIDijkstraRouter< E >::TraCIDijkstraRouter ( size_t  noE) [inline]

Constructor.

Definition at line 65 of file TraCIDijkstraRouter.h.

template<class E>
virtual TraCIDijkstraRouter< E >::~TraCIDijkstraRouter ( ) [inline, virtual]

Destructor.

Definition at line 70 of file TraCIDijkstraRouter.h.


Member Function Documentation

template<class E>
void TraCIDijkstraRouter< E >::buildPathFrom ( EdgeInfo rbegin,
std::vector< const E * > &  edges 
) [inline]

Builds the path from marked edges.

Definition at line 218 of file TraCIDijkstraRouter.h.

References TraCIDijkstraRouter< E >::EdgeInfo::edge, and TraCIDijkstraRouter< E >::EdgeInfo::prev.

Referenced by TraCIDijkstraRouter< E >::compute().

template<class E>
void TraCIDijkstraRouter< E >::clearTemporaryStorages ( std::vector< bool > *  edgeList,
EdgeInfoCont consecutionList 
) [inline, protected]
template<class E>
virtual SUMOReal TraCIDijkstraRouter< E >::getEffort ( const E *const  e,
SUMOReal  t 
) const [inline, virtual]
virtual void SUMOAbstractRouter< E, MSVehicle >::prepare ( const E *  ,
const MSVehicle ,
bool   
) [inline, virtual, inherited]

Definition at line 80 of file SUMOAbstractRouter.h.

template<class E>
SUMOReal TraCIDijkstraRouter< E >::recomputeCosts ( const std::vector< const E * > &  edges,
const MSVehicle *const  v,
SUMOTime  msTime 
) const [inline, virtual]

Field Documentation

template<class E>
size_t TraCIDijkstraRouter< E >::myNoE [protected]

The network to use.

Definition at line 301 of file TraCIDijkstraRouter.h.

Referenced by TraCIDijkstraRouter< E >::compute().

A container for reusage of edge consecution lists.

Definition at line 307 of file TraCIDijkstraRouter.h.

Referenced by TraCIDijkstraRouter< E >::clearTemporaryStorages(), and TraCIDijkstraRouter< E >::compute().

template<class E>
InstancePool<std::vector<bool> > TraCIDijkstraRouter< E >::myReusableEdgeLists [protected]

A container for reusage of examined edges lists.

Definition at line 304 of file TraCIDijkstraRouter.h.

Referenced by TraCIDijkstraRouter< E >::clearTemporaryStorages(), and TraCIDijkstraRouter< E >::compute().


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines