![]() |
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a contracted network. More...
#include <CHRouter.h>
Data Structures | |
class | Unidirectional |
Public Types | |
typedef std::pair< const typename BASE::EdgeInfo *, const typename BASE::EdgeInfo * > | Meeting |
A meeting point of the two search scopes. More... | |
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 | |
void | buildContractionHierarchy (SUMOTime time, const V *const vehicle) |
void | buildPathFromMeeting (Meeting meeting, std::vector< const E *> &into) const |
normal routing methods More... | |
CHRouter (const std::vector< E *> &edges, bool unbuildIsWarning, typename BASE::Operation operation, const SUMOVehicleClass svc, SUMOTime weightPeriod, bool validatePermissions) | |
Constructor. More... | |
CHRouter (const std::vector< E *> &edges, bool unbuildIsWarning, typename BASE::Operation operation, const SUMOVehicleClass svc, SUMOTime weightPeriod, const typename CHBuilder< E, V >::Hierarchy *hierarchy) | |
Cloning constructor. 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 traveltime in the contracted graph. More... | |
virtual | ~CHRouter () |
Destructor. More... | |
Private Member Functions | |
const E * | getVia (const E *forwardFrom, const E *forwardTo) const |
Private Attributes | |
Unidirectional | myBackwardSearch |
const std::vector< E * > & | myEdges |
all edges with numerical ids More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
Unidirectional | myForwardSearch |
the unidirectional search queues More... | |
const CHBuilder< E, V >::Hierarchy * | myHierarchy |
CHBuilder< E, V > * | myHierarchyBuilder |
const SUMOVehicleClass | mySVC |
the permissions for which the hierarchy was constructed More... | |
SUMOTime | myValidUntil |
the validity duration of the current hierarchy (exclusive) More... | |
const SUMOTime | myWeightPeriod |
the validity duration of one weight interval More... | |
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 63 of file CHRouter.h.
typedef std::pair<const typename BASE::EdgeInfo*, const typename BASE::EdgeInfo*> CHRouter< E, V, BASE >::Meeting |
A meeting point of the two search scopes.
Definition at line 70 of file CHRouter.h.
typedef double(* CHRouter< E, V, BASE >::Operation) (const E *const, const V *const, double) |
Type of the function that is used to retrieve the edge effort.
Definition at line 67 of file CHRouter.h.
|
inline |
Constructor.
[in] | validatePermissions | Whether a multi-permission hierarchy shall be built If set to false, the net is pruned in synchronize() and the hierarchy is tailored to the svc |
Definition at line 225 of file CHRouter.h.
|
inline |
Cloning constructor.
Definition at line 243 of file CHRouter.h.
Destructor.
Definition at line 260 of file CHRouter.h.
References CHRouter< E, V, BASE >::myHierarchy, and CHRouter< E, V, BASE >::myHierarchyBuilder.
|
inline |
Definition at line 361 of file CHRouter.h.
References CHRouter< E, V, BASE >::myHierarchy, CHRouter< E, V, BASE >::myHierarchyBuilder, CHRouter< E, V, BASE >::myValidUntil, and CHRouter< E, V, BASE >::myWeightPeriod.
Referenced by CHRouter< E, V, BASE >::compute().
|
inline |
normal routing methods
Builds the path from marked edges
Definition at line 328 of file CHRouter.h.
References CHRouter< E, V, BASE >::getVia().
Referenced by CHRouter< E, V, BASE >::compute().
|
inlinevirtual |
Definition at line 268 of file CHRouter.h.
References MsgHandler::getWarningInstance(), CHRouter< E, V, BASE >::myEdges, CHRouter< E, V, BASE >::myErrorMsgHandler, CHRouter< E, V, BASE >::myHierarchy, CHRouter< E, V, BASE >::mySVC, CHRouter< E, V, BASE >::myValidUntil, CHRouter< E, V, BASE >::myWeightPeriod, SumoVehicleClassStrings, time2string(), and WRITE_MESSAGE.
|
inlinevirtual |
Builds the route between the given edges using the minimum traveltime in the contracted graph.
Definition at line 280 of file CHRouter.h.
References CHRouter< E, V, BASE >::buildContractionHierarchy(), CHRouter< E, V, BASE >::buildPathFromMeeting(), MsgHandler::inform(), CHRouter< E, V, BASE >::Unidirectional::init(), CHRouter< E, V, BASE >::myBackwardSearch, CHRouter< E, V, BASE >::myErrorMsgHandler, CHRouter< E, V, BASE >::myForwardSearch, CHRouter< E, V, BASE >::myHierarchy, CHRouter< E, V, BASE >::myValidUntil, CHRouter< E, V, BASE >::myWeightPeriod, CHRouter< E, V, BASE >::Unidirectional::step(), and toString().
|
inlineprivate |
Definition at line 376 of file CHRouter.h.
References CHRouter< E, V, BASE >::myHierarchy.
Referenced by CHRouter< E, V, BASE >::buildPathFromMeeting().
|
private |
Definition at line 396 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::compute().
|
private |
all edges with numerical ids
Definition at line 389 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::clone().
|
private |
the handler for routing errors
Definition at line 392 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::clone(), and CHRouter< E, V, BASE >::compute().
|
private |
the unidirectional search queues
Definition at line 395 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::compute().
|
private |
Definition at line 399 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::buildContractionHierarchy(), CHRouter< E, V, BASE >::clone(), CHRouter< E, V, BASE >::compute(), CHRouter< E, V, BASE >::getVia(), and CHRouter< E, V, BASE >::~CHRouter().
|
private |
Definition at line 398 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::buildContractionHierarchy(), and CHRouter< E, V, BASE >::~CHRouter().
|
private |
the permissions for which the hierarchy was constructed
Definition at line 408 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::clone().
the validity duration of the current hierarchy (exclusive)
Definition at line 405 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::buildContractionHierarchy(), CHRouter< E, V, BASE >::clone(), and CHRouter< E, V, BASE >::compute().
|
private |
the validity duration of one weight interval
Definition at line 402 of file CHRouter.h.
Referenced by CHRouter< E, V, BASE >::buildContractionHierarchy(), CHRouter< E, V, BASE >::clone(), and CHRouter< E, V, BASE >::compute().