SUMO - Simulation of Urban MObility
DijkstraRouterEffort< E, V, PF > Class Template Reference

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

#include <DijkstraRouterEffort.h>

Inheritance diagram for DijkstraRouterEffort< E, V, PF >:
Inheritance graph
Collaboration diagram for DijkstraRouterEffort< E, V, PF >:
Collaboration graph

Data Structures

struct  EdgeInfo
 
class  EdgeInfoByEffortComparator
 

Public Types

typedef SUMOReal(* Operation) (const E *const, const V *const, SUMOReal)
 

Public Member Functions

void buildPathFrom (const 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 effort at the given time The definition of the effort depends on the wished routing scheme. More...
 
 DijkstraRouterEffort (size_t noE, bool unbuildIsWarning, Operation effortOperation, Operation ttOperation)
 Constructor. More...
 
void endQuery (int visits)
 
SUMOReal getEffort (const E *const e, const V *const v, SUMOReal t) const
 
SUMOReal getTravelTime (const E *const e, const V *const v, SUMOReal t) const
 
void init ()
 
SUMOReal recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime) const
 
void setBulkMode (const bool mode)
 
void startQuery ()
 
virtual ~DijkstraRouterEffort ()
 Destructor. More...
 

Protected Attributes

bool myBulkMode
 whether we are currently operating several route queries in a bulk More...
 
Operation myOperation
 The object's operation to perform. More...
 

Private Attributes

EdgeInfoByEffortComparator myComparator
 
std::vector< EdgeInfomyEdgeInfos
 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...
 
Operation myTTOperation
 The object's operation to perform for travel times. More...
 

Detailed Description

template<class E, class V, class PF>
class DijkstraRouterEffort< E, V, PF >

Computes the shortest path through a network using the Dijkstra 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 66 of file DijkstraRouterEffort.h.

Member Typedef Documentation

template<class E, class V, class PF>
typedef SUMOReal(* DijkstraRouterEffort< E, V, PF >::Operation) (const E *const, const V *const, SUMOReal)

Definition at line 69 of file DijkstraRouterEffort.h.

Constructor & Destructor Documentation

template<class E, class V, class PF>
DijkstraRouterEffort< E, V, PF >::DijkstraRouterEffort ( size_t  noE,
bool  unbuildIsWarning,
Operation  effortOperation,
Operation  ttOperation 
)
inline

Constructor.

Definition at line 71 of file DijkstraRouterEffort.h.

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

Destructor.

Definition at line 80 of file DijkstraRouterEffort.h.

Member Function Documentation

template<class E, class V, class PF>
void DijkstraRouterEffort< E, V, PF >::buildPathFrom ( const EdgeInfo rbegin,
std::vector< const E * > &  edges 
)
inline
template<class E, class V, class PF>
virtual SUMOAbstractRouter<E, V>* DijkstraRouterEffort< E, V, PF >::clone ( ) const
inlinevirtual

Implements SUMOAbstractRouter< E, V >.

Definition at line 82 of file DijkstraRouterEffort.h.

template<class E, class V, class PF>
virtual void DijkstraRouterEffort< E, V, PF >::compute ( const E *  from,
const E *  to,
const V *const  vehicle,
SUMOTime  msTime,
std::vector< const E * > &  into 
)
inlinevirtual

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.

Implements SUMOAbstractRouter< E, V >.

Definition at line 152 of file DijkstraRouterEffort.h.

template<class E, class V, class PF>
void DijkstraRouterEffort< E, V, PF >::init ( )
inline
template<class E, class V, class PF>
SUMOReal DijkstraRouterEffort< E, V, PF >::recomputeCosts ( const std::vector< const E * > &  edges,
const V *const  v,
SUMOTime  msTime 
) const
inlinevirtual

Implements SUMOAbstractRouter< E, V >.

Definition at line 231 of file DijkstraRouterEffort.h.

template<class E, class V>
void SUMOAbstractRouter< E, V >::setBulkMode ( const bool  mode)
inlineinherited

Definition at line 101 of file SUMOAbstractRouter.h.

Referenced by RONet::createBulkRouteRequests().

Field Documentation

template<class E, class V, class PF>
EdgeInfoByEffortComparator DijkstraRouterEffort< E, V, PF >::myComparator
private
template<class E, class V, class PF>
std::vector<EdgeInfo*> DijkstraRouterEffort< E, V, PF >::myFrontierList
private
template<class E, class V, class PF>
Operation DijkstraRouterEffort< E, V, PF >::myTTOperation
private

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