![]() |
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a contracted network. More...
#include <CHRouter.h>
Data Structures | |
struct | EdgeInfo |
class | Unidirectional |
Public Types | |
typedef std::pair< const EdgeInfo *, const 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, Operation operation, const SUMOVehicleClass svc, SUMOTime weightPeriod, bool validatePermissions) | |
Constructor. More... | |
CHRouter (const std::vector< E *> &edges, bool unbuildIsWarning, 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... | |
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 () |
virtual | ~CHRouter () |
Destructor. More... | |
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 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 69 of file CHRouter.h.
typedef std::pair<const EdgeInfo*, const EdgeInfo*> CHRouter< E, V, PF >::Meeting |
A meeting point of the two search scopes.
Definition at line 110 of file CHRouter.h.
typedef double(* CHRouter< 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 73 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 266 of file CHRouter.h.
|
inline |
Cloning constructor.
Definition at line 284 of file CHRouter.h.
Destructor.
Definition at line 301 of file CHRouter.h.
References CHRouter< E, V, PF >::myHierarchy, and CHRouter< E, V, PF >::myHierarchyBuilder.
|
inline |
Definition at line 415 of file CHRouter.h.
References max, CHRouter< E, V, PF >::myHierarchy, CHRouter< E, V, PF >::myHierarchyBuilder, CHRouter< E, V, PF >::myValidUntil, and CHRouter< E, V, PF >::myWeightPeriod.
Referenced by CHRouter< E, V, PF >::compute().
|
inline |
normal routing methods
Builds the path from marked edges
Definition at line 382 of file CHRouter.h.
References CHRouter< E, V, PF >::EdgeInfo::edge, CHRouter< E, V, PF >::getVia(), and CHRouter< E, V, PF >::EdgeInfo::prev.
Referenced by CHRouter< E, V, PF >::compute().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 309 of file CHRouter.h.
References MsgHandler::getWarningInstance(), CHRouter< E, V, PF >::myEdges, CHRouter< E, V, PF >::myErrorMsgHandler, CHRouter< E, V, PF >::myHierarchy, SUMOAbstractRouter< E, V >::myOperation, CHRouter< E, V, PF >::mySVC, CHRouter< E, V, PF >::myValidUntil, CHRouter< E, V, PF >::myWeightPeriod, SumoVehicleClassStrings, time2string(), and WRITE_MESSAGE.
|
inlinevirtual |
Builds the route between the given edges using the minimum traveltime in the contracted graph.
Implements SUMOAbstractRouter< E, V >.
Definition at line 321 of file CHRouter.h.
References CHRouter< E, V, PF >::buildContractionHierarchy(), CHRouter< E, V, PF >::buildPathFromMeeting(), SUMOAbstractRouter< E, V >::endQuery(), MsgHandler::inform(), CHRouter< E, V, PF >::Unidirectional::init(), max, CHRouter< E, V, PF >::myBackwardSearch, CHRouter< E, V, PF >::myErrorMsgHandler, CHRouter< E, V, PF >::myForwardSearch, CHRouter< E, V, PF >::myHierarchy, CHRouter< E, V, PF >::myValidUntil, CHRouter< E, V, PF >::myWeightPeriod, SUMOAbstractRouter< E, V >::startQuery(), CHRouter< E, V, PF >::Unidirectional::step(), and toString().
|
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().
|
inlineprivate |
Definition at line 430 of file CHRouter.h.
References CHRouter< E, V, PF >::myHierarchy.
Referenced by CHRouter< E, V, PF >::buildPathFromMeeting().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, V >.
Definition at line 367 of file CHRouter.h.
References SUMOAbstractRouter< E, V >::getEffort(), and STEPS2TIME.
|
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 450 of file CHRouter.h.
Referenced by CHRouter< 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 443 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::clone().
|
private |
the handler for routing errors
Definition at line 446 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::clone(), and CHRouter< E, V, PF >::compute().
|
private |
the unidirectional search queues
Definition at line 449 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::compute().
|
private |
Definition at line 453 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::buildContractionHierarchy(), CHRouter< E, V, PF >::clone(), CHRouter< E, V, PF >::compute(), CHRouter< E, V, PF >::getVia(), and CHRouter< E, V, PF >::~CHRouter().
|
private |
Definition at line 452 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::buildContractionHierarchy(), and CHRouter< E, V, PF >::~CHRouter().
|
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 |
the permissions for which the hierarchy was constructed
Definition at line 462 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::clone().
the validity duration of the current hierarchy (exclusive)
Definition at line 459 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::buildContractionHierarchy(), CHRouter< E, V, PF >::clone(), and CHRouter< E, V, PF >::compute().
the validity duration of one weight interval
Definition at line 456 of file CHRouter.h.
Referenced by CHRouter< E, V, PF >::buildContractionHierarchy(), CHRouter< E, V, PF >::clone(), and CHRouter< E, V, PF >::compute().