![]() |
Eclipse 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, typename SUMOAbstractRouter< E, V >::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, bool silent=false) |
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... | |
bool | computeLooped (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false) |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route. More... | |
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, const double t, const double effort) const |
bool | isProhibited (const E *const edge, const V *const vehicle) const |
virtual void | prohibit (const std::vector< E * > &) |
double | recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const |
void | setBulkMode (const bool mode) |
void | startQuery () |
void | updateViaCost (const E *const prev, const E *const e, const V *const v, double &time, double &effort, double &length) const |
void | updateViaEdgeCost (const E *viaEdge, const V *const v, double &time, double &effort, double &length) const |
~CHRouterWrapper () | |
Protected Attributes | |
bool | myBulkMode |
whether we are currently operating several route queries in a bulk More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
const bool | myHavePermissions |
whether edge permissions need to be considered More... | |
const bool | myHaveRestrictions |
whether edge restrictions need to be considered More... | |
Operation | myOperation |
The object's operation to perform. More... | |
std::vector< E * > | myProhibited |
Operation | myTTOperation |
The object's operation to perform for travel times. More... | |
Private Types | |
typedef CHRouter< E, V > | CHRouterType |
typedef std::map< std::pair< const SUMOVehicleClass, const double >, 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 |
long long int | myNumQueries |
long long int | myQueryStartTime |
the time spent querying in milliseconds More... | |
long long int | myQueryTimeSum |
long long int | myQueryVisits |
counters for performance logging More... | |
RouterMap | myRouters |
const std::string | myType |
the type of this router More... | |
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) |
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 63 of file CHRouterWrapper.h.
|
private |
Definition at line 109 of file CHRouterWrapper.h.
|
inherited |
Type of the function that is used to retrieve the edge effort.
Definition at line 96 of file SUMOAbstractRouter.h.
|
private |
Definition at line 112 of file CHRouterWrapper.h.
|
inline |
Constructor.
Definition at line 68 of file CHRouterWrapper.h.
|
inline |
Definition at line 79 of file CHRouterWrapper.h.
References CHRouterWrapper< E, V >::myRouters.
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 86 of file CHRouterWrapper.h.
References CHRouterWrapper< E, V >::myBegin, CHRouterWrapper< E, V >::myEdges, CHRouterWrapper< E, V >::myEnd, CHRouterWrapper< E, V >::myIgnoreErrors, CHRouterWrapper< E, V >::myMaxNumInstances, SUMOAbstractRouter< E, V >::myOperation, CHRouterWrapper< E, V >::myRouters, and CHRouterWrapper< E, V >::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 95 of file CHRouterWrapper.h.
References CHRouterWrapper< E, V >::myEdges, CHRouterWrapper< E, V >::myIgnoreErrors, CHRouterWrapper< E, V >::myRouters, and CHRouterWrapper< E, V >::myWeightPeriod.
|
inlineinherited |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route.
Definition at line 130 of file SUMOAbstractRouter.h.
Referenced by MSBaseVehicle::reroute(), and MSTriggeredRerouter::rerouteParkingArea().
|
inlineinherited |
Definition at line 225 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().
|
inlineinherited |
Definition at line 216 of file SUMOAbstractRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::compute(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), PedestrianRouter< E, L, N, V >::compute(), CHBuilder< E, V >::synchronize(), SUMOAbstractRouter< NBRouterEdge, NBVehicle >::updateViaCost(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::updateViaEdgeCost().
|
inlineinherited |
Definition at line 165 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), SUMOAbstractRouter< NBRouterEdge, NBVehicle >::updateViaCost(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::updateViaEdgeCost().
|
inlineinherited |
Definition at line 159 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::recomputeCosts().
|
inlinevirtualinherited |
Reimplemented in DijkstraRouter< E, V >, and AStarRouter< E, V >.
Definition at line 163 of file SUMOAbstractRouter.h.
Referenced by MSRoutingEngine::getRouterTT(), IntermodalRouter< E, L, N, V >::prohibit(), and MSRoutingEngine::reroute().
|
inlineinherited |
Definition at line 195 of file SUMOAbstractRouter.h.
Referenced by RORouteDef::addAlternative(), AStarRouter< E, V >::compute(), SUMOAbstractRouter< NBRouterEdge, NBVehicle >::computeLooped(), ROMAAssignments::computePath(), computeRoutes(), libsumo::Simulation::findRoute(), NBPTLineCont::getCost(), LandmarkLookupTable< E, V >::LandmarkLookupTable(), MSTriggeredRerouter::notifyEnter(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), and ROMAAssignments::sue().
|
inlineinherited |
Definition at line 230 of file SUMOAbstractRouter.h.
Referenced by ROMAAssignments::incremental().
|
inlineinherited |
Definition at line 220 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().
|
inlineinherited |
Definition at line 179 of file SUMOAbstractRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::compute(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::recomputeCosts().
|
inlineinherited |
Definition at line 169 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::updateViaCost().
|
private |
Definition at line 121 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone().
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 245 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::setBulkMode().
|
private |
all edges with numerical ids
Definition at line 117 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone(), and CHRouterWrapper< E, V >::compute().
|
private |
Definition at line 122 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone().
|
protectedinherited |
the handler for routing errors
Definition at line 236 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::clone(), CHRouter< E, V >::clone(), DijkstraRouter< E, V >::clone(), AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::computeLooped().
|
protectedinherited |
whether edge permissions need to be considered
Definition at line 248 of file SUMOAbstractRouter.h.
Referenced by CHRouter< E, V >::clone(), DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::isProhibited().
|
protectedinherited |
whether edge restrictions need to be considered
Definition at line 251 of file SUMOAbstractRouter.h.
Referenced by CHRouter< E, V >::clone(), DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::isProhibited().
|
private |
Definition at line 119 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone(), and CHRouterWrapper< E, V >::compute().
|
private |
Definition at line 124 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone().
|
privateinherited |
Definition at line 261 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::startQuery(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::~SUMOAbstractRouter().
|
protectedinherited |
The object's operation to perform.
Definition at line 239 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::clone(), CHRouter< E, V >::clone(), CHRouterWrapper< E, V >::clone(), DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::getEffort().
|
protectedinherited |
Definition at line 253 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::prohibit(), and DijkstraRouter< E, V >::prohibit().
|
privateinherited |
the time spent querying in milliseconds
Definition at line 263 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::endQuery(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::startQuery().
|
privateinherited |
Definition at line 264 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::endQuery(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::~SUMOAbstractRouter().
|
privateinherited |
counters for performance logging
Definition at line 260 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::endQuery(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::~SUMOAbstractRouter().
|
private |
Definition at line 114 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone(), CHRouterWrapper< E, V >::compute(), and CHRouterWrapper< E, V >::~CHRouterWrapper().
|
protectedinherited |
The object's operation to perform for travel times.
Definition at line 242 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< NBRouterEdge, NBVehicle >::getTravelTime().
|
privateinherited |
the type of this router
Definition at line 257 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< NBRouterEdge, NBVehicle >::~SUMOAbstractRouter().
|
private |
Definition at line 123 of file CHRouterWrapper.h.
Referenced by CHRouterWrapper< E, V >::clone(), and CHRouterWrapper< E, V >::compute().