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 double(* Operation) (const E *const, const V *const, double)
 

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 ()
 
virtual bool 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 (const std::vector< E *> &edges, bool unbuildIsWarning, Operation effortOperation, Operation ttOperation)
 Constructor. More...
 
 DijkstraRouterEffort (const std::vector< EdgeInfo > &edgeInfos, bool unbuildIsWarning, Operation effortOperation, Operation ttOperation)
 
void endQuery (int visits)
 
double getEffort (const E *const e, const V *const v, double t) const
 
double getTravelTime (const E *const e, const V *const v, double t) const
 
void init ()
 
double 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

◆ Operation

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

Definition at line 69 of file DijkstraRouterEffort.h.

Constructor & Destructor Documentation

◆ DijkstraRouterEffort() [1/2]

template<class E, class V, class PF>
DijkstraRouterEffort< E, V, PF >::DijkstraRouterEffort ( const std::vector< E *> &  edges,
bool  unbuildIsWarning,
Operation  effortOperation,
Operation  ttOperation 
)
inline

Constructor.

Definition at line 120 of file DijkstraRouterEffort.h.

◆ DijkstraRouterEffort() [2/2]

template<class E, class V, class PF>
DijkstraRouterEffort< E, V, PF >::DijkstraRouterEffort ( const std::vector< EdgeInfo > &  edgeInfos,
bool  unbuildIsWarning,
Operation  effortOperation,
Operation  ttOperation 
)
inline

Definition at line 128 of file DijkstraRouterEffort.h.

◆ ~DijkstraRouterEffort()

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

Destructor.

Definition at line 137 of file DijkstraRouterEffort.h.

Member Function Documentation

◆ buildPathFrom()

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

◆ clone()

template<class E, class V, class PF>
virtual SUMOAbstractRouter<E, V>* DijkstraRouterEffort< E, V, PF >::clone ( )
inlinevirtual

Implements SUMOAbstractRouter< E, V >.

Definition at line 139 of file DijkstraRouterEffort.h.

◆ compute()

template<class E, class V, class PF>
virtual bool 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 162 of file DijkstraRouterEffort.h.

◆ endQuery()

◆ getEffort()

◆ getTravelTime()

template<class E, class V, class PF>
double DijkstraRouterEffort< E, V, PF >::getTravelTime ( const E *const  e,
const V *const  v,
double  t 
) const
inline

◆ init()

template<class E, class V, class PF>
void DijkstraRouterEffort< E, V, PF >::init ( )
inline

◆ recomputeCosts()

template<class E, class V, class PF>
double 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 242 of file DijkstraRouterEffort.h.

◆ setBulkMode()

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

Definition at line 101 of file SUMOAbstractRouter.h.

Referenced by ROMAAssignments::incremental().

◆ startQuery()

Field Documentation

◆ myBulkMode

◆ myComparator

template<class E, class V, class PF>
EdgeInfoByEffortComparator DijkstraRouterEffort< E, V, PF >::myComparator
private

◆ myEdgeInfos

◆ myErrorMsgHandler

◆ myFound

◆ myFrontierList

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

◆ myOperation

◆ myTTOperation

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: