![]() |
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a contracted network. More...
#include <CHRouterWrapper.h>
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 |
Computes the shortest path through a contracted network.
The template parameters are:
E | The edge class to use (MSEdge/ROEdge) |
V | The vehicle class to use (MSVehicle/ROVehicle) |
PF | The 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 72 of file CHRouterWrapper.h.
|
private |
Definition at line 168 of file CHRouterWrapper.h.
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 76 of file CHRouterWrapper.h.
|
private |
Definition at line 195 of file CHRouterWrapper.h.
|
inline |
Constructor.
Definition at line 80 of file CHRouterWrapper.h.
|
inline |
Definition at line 91 of file CHRouterWrapper.h.
References CHRouterWrapper< E, V, PF >::myRouters.
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 100 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, SUMOAbstractRouter< E, V >::myOperation, CHRouterWrapper< E, V, PF >::myRouters, and CHRouterWrapper< E, V, PF >::myWeightPeriod.
|
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 111 of file CHRouterWrapper.h.
References max, 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.
|
inlineinherited |
Definition at line 96 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), and CHRouter< E, V, PF >::compute().
|
inlineinherited |
Definition at line 87 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), CHRouterWrapper< E, V, PF >::recomputeCosts(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::recomputeCosts(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::recomputeCosts(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::recomputeCosts(), CHRouter< E, V, PF >::recomputeCosts(), and CHBuilder< E, V >::synchronize().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 152 of file CHRouterWrapper.h.
References SUMOAbstractRouter< E, V >::getEffort(), STEPS2TIME, and WRITE_WARNING.
|
inlineinherited |
Definition at line 101 of file SUMOAbstractRouter.h.
Referenced by ROMAAssignments::incremental().
|
inlineinherited |
Definition at line 91 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), and CHRouter< E, V, PF >::compute().
|
private |
Definition at line 204 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 110 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), and SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::setBulkMode().
|
private |
all edges with numerical ids
Definition at line 200 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().
|
private |
Definition at line 205 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().
|
private |
Definition at line 202 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().
|
private |
Definition at line 207 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().
|
protectedinherited |
The object's operation to perform.
Definition at line 107 of file SUMOAbstractRouter.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::clone(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::clone(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::clone(), CHRouter< E, V, PF >::clone(), and SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::getEffort().
|
private |
Definition at line 197 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), CHRouterWrapper< E, V, PF >::compute(), and CHRouterWrapper< E, V, PF >::~CHRouterWrapper().
|
private |
Definition at line 206 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V, PF >::clone(), and CHRouterWrapper< E, V, PF >::compute().