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

Computes the shortest path through a contracted network. More...

#include <CHRouterWrapper.h>

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

Public Types

typedef double(* Operation) (const E *const, const V *const, double)
 Type of the function that is used to retrieve the edge effort. More...
 

Public Member Functions

 CHRouterWrapper (const std::vector< E *> &edges, const bool ignoreErrors, Operation operation, const SUMOTime begin, const SUMOTime end, const SUMOTime weightPeriod, const int numThreads)
 Constructor. More...
 
virtual SUMOAbstractRouter< E, V > * clone ()
 
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...
 
void endQuery (int visits)
 
double getEffort (const E *const e, const V *const v, double t) const
 
double recomputeCosts (const std::vector< const E *> &edges, const V *const v, SUMOTime msTime) const
 
void setBulkMode (const bool mode)
 
void startQuery ()
 
 ~CHRouterWrapper ()
 

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 Types

typedef CHRouter< E, V, noProhibitions< E, V > > CHRouterType
 
typedef std::map< std::pair< const SUMOVehicleClass, const double >, std::vector< CHRouterType * > > RouterMap
 

Private Attributes

const SUMOTime myBegin
 
const std::vector< E * > & myEdges
 all edges with numerical ids More...
 
const SUMOTime myEnd
 
const bool myIgnoreErrors
 
const int myMaxNumInstances
 
RouterMap myRouters
 
const SUMOTime myWeightPeriod
 

Detailed Description

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

Computes the shortest path through a contracted network.

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)

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 71 of file CHRouterWrapper.h.

Member Typedef Documentation

◆ CHRouterType

template<class E, class V, class PF>
typedef CHRouter<E, V, noProhibitions<E, V> > CHRouterWrapper< E, V, PF >::CHRouterType
private

Definition at line 167 of file CHRouterWrapper.h.

◆ Operation

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

Type of the function that is used to retrieve the edge effort.

Definition at line 75 of file CHRouterWrapper.h.

◆ RouterMap

template<class E, class V, class PF>
typedef std::map<std::pair<const SUMOVehicleClass, const double>, std::vector<CHRouterType*> > CHRouterWrapper< E, V, PF >::RouterMap
private

Definition at line 194 of file CHRouterWrapper.h.

Constructor & Destructor Documentation

◆ CHRouterWrapper()

template<class E, class V, class PF>
CHRouterWrapper< E, V, PF >::CHRouterWrapper ( const std::vector< E *> &  edges,
const bool  ignoreErrors,
Operation  operation,
const SUMOTime  begin,
const SUMOTime  end,
const SUMOTime  weightPeriod,
const int  numThreads 
)
inline

Constructor.

Definition at line 79 of file CHRouterWrapper.h.

◆ ~CHRouterWrapper()

template<class E, class V, class PF>
CHRouterWrapper< E, V, PF >::~CHRouterWrapper ( )
inline

Definition at line 90 of file CHRouterWrapper.h.

References CHRouterWrapper< E, V, PF >::myRouters.

Member Function Documentation

◆ clone()

◆ compute()

template<class E, class V, class PF>
bool CHRouterWrapper< 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 110 of file CHRouterWrapper.h.

References CHRouterWrapper< E, V, PF >::myBegin, CHRouterWrapper< E, V, PF >::myEdges, CHRouterWrapper< E, V, PF >::myEnd, CHRouterWrapper< E, V, PF >::myIgnoreErrors, CHRouterWrapper< E, V, PF >::myMaxNumInstances, CHRouterWrapper< E, V, PF >::myRouters, and CHRouterWrapper< E, V, PF >::myWeightPeriod.

◆ endQuery()

◆ getEffort()

◆ recomputeCosts()

template<class E, class V, class PF>
double CHRouterWrapper< E, V, PF >::recomputeCosts ( const std::vector< const E *> &  edges,
const V *const  v,
SUMOTime  msTime 
) const
inlinevirtual

◆ setBulkMode()

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

Definition at line 100 of file SUMOAbstractRouter.h.

Referenced by ROMAAssignments::incremental().

◆ startQuery()

Field Documentation

◆ myBegin

template<class E, class V, class PF>
const SUMOTime CHRouterWrapper< E, V, PF >::myBegin
private

◆ myBulkMode

◆ myEdges

template<class E, class V, class PF>
const std::vector<E*>& CHRouterWrapper< E, V, PF >::myEdges
private

all edges with numerical ids

Definition at line 199 of file CHRouterWrapper.h.

Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().

◆ myEnd

template<class E, class V, class PF>
const SUMOTime CHRouterWrapper< E, V, PF >::myEnd
private

◆ myIgnoreErrors

template<class E, class V, class PF>
const bool CHRouterWrapper< E, V, PF >::myIgnoreErrors
private

◆ myMaxNumInstances

template<class E, class V, class PF>
const int CHRouterWrapper< E, V, PF >::myMaxNumInstances
private

◆ myOperation

◆ myRouters

template<class E, class V, class PF>
RouterMap CHRouterWrapper< E, V, PF >::myRouters
private

◆ myWeightPeriod

template<class E, class V, class PF>
const SUMOTime CHRouterWrapper< E, V, PF >::myWeightPeriod
private

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