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 SUMOReal(* Operation) (const E *const, const V *const, SUMOReal)
 Type of the function that is used to retrieve the edge effort. More...
 

Public Member Functions

 CHRouterWrapper (size_t dictSize, bool ignoreErrors, Operation operation, SUMOTime begin, SUMOTime weightPeriod)
 Constructor. More...
 
virtual SUMOAbstractRouter< E, V > * clone () const
 
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...
 
void endQuery (int visits)
 
SUMOReal getEffort (const E *const e, const V *const v, SUMOReal t) const
 
SUMOReal 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 SUMOReal >, CHRouterType * > RouterMap
 

Private Attributes

SUMOTime myBegin
 
size_t myDictSize
 number of edges with numerical id More...
 
bool myIgnoreErrors
 
RouterMap myRouters
 
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 68 of file CHRouterWrapper.h.

Member Typedef Documentation

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

Definition at line 124 of file CHRouterWrapper.h.

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

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

Definition at line 72 of file CHRouterWrapper.h.

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

Definition at line 125 of file CHRouterWrapper.h.

Constructor & Destructor Documentation

template<class E, class V, class PF>
CHRouterWrapper< E, V, PF >::CHRouterWrapper ( size_t  dictSize,
bool  ignoreErrors,
Operation  operation,
SUMOTime  begin,
SUMOTime  weightPeriod 
)
inline

Constructor.

Definition at line 76 of file CHRouterWrapper.h.

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

Definition at line 84 of file CHRouterWrapper.h.

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

Member Function Documentation

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

References CHRouterWrapper< E, V, PF >::myDictSize, CHRouterWrapper< E, V, PF >::myIgnoreErrors, CHRouterWrapper< E, V, PF >::myRouters, and CHRouterWrapper< E, V, PF >::myWeightPeriod.

template<class E, class V, class PF>
SUMOReal CHRouterWrapper< E, V, PF >::recomputeCosts ( const std::vector< const E * > &  edges,
const V *const  v,
SUMOTime  msTime 
) const
inlinevirtual
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>
SUMOTime CHRouterWrapper< E, V, PF >::myBegin
private

Definition at line 134 of file CHRouterWrapper.h.

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

template<class E, class V, class PF>
size_t CHRouterWrapper< E, V, PF >::myDictSize
private

number of edges with numerical id

Definition at line 130 of file CHRouterWrapper.h.

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

template<class E, class V, class PF>
bool CHRouterWrapper< E, V, PF >::myIgnoreErrors
private
template<class E, class V, class PF>
RouterMap CHRouterWrapper< E, V, PF >::myRouters
private
template<class E, class V, class PF>
SUMOTime CHRouterWrapper< E, V, PF >::myWeightPeriod
private

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