![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <SUMOAbstractRouter.h>
Data Structures | |
class | EdgeInfo |
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 | |
void | buildPathFrom (const typename SUMOAbstractRouter< E, V >::EdgeInfo *rbegin, std::vector< const E * > &edges) |
Builds the path from marked edges. More... | |
virtual SUMOAbstractRouter * | clone ()=0 |
virtual bool | compute (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)=0 |
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 | compute (const E *from, double fromPos, const E *to, double toPos, 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, also taking into account position along the edges to ensure currect handling of looped routes 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) |
const SUMOAbstractRouter< E, V >::EdgeInfo & | getEdgeInfo (int index) const |
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 |
const std::string & | getType () const |
void | init (const int edgeID, const SUMOTime msTime) |
bool | isProhibited (const E *const edge, const V *const vehicle) const |
virtual void | prohibit (const std::vector< E * > &toProhibit) |
double | recomputeCosts (const std::vector< const E * > &edges, const V *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const |
double | recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const |
virtual void | reset (const V *const vehicle) |
reset internal caches, used by CHRouter More... | |
void | setAutoBulkMode (const bool mode) |
virtual void | setBulkMode (const bool mode) |
double | setHint (const typename std::vector< const E * >::const_iterator routeBegin, const typename std::vector< const E * >::const_iterator routeEnd, const V *const v, SUMOTime msTime) |
void | startQuery () |
SUMOAbstractRouter (const std::string &type, bool unbuildIsWarning, Operation operation, Operation ttOperation, const bool havePermissions, const bool haveRestrictions) | |
Constructor. More... | |
SUMOAbstractRouter (SUMOAbstractRouter *other) | |
Copy Constructor. More... | |
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 |
virtual | ~SUMOAbstractRouter () |
Destructor. More... | |
Protected Attributes | |
bool | myAmClean |
whether we are already initialized More... | |
bool | myAutoBulkMode |
whether we are currently trying to detect bulk mode automatically More... | |
bool | myBulkMode |
whether we are currently operating several route queries in a bulk More... | |
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > | myEdgeInfos |
The container of edge information. More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > | myFound |
list of visited Edges (for resetting) More... | |
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > | myFrontierList |
A container for reusage of the min edge heap. 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 |
The list of explicitly prohibited edges. More... | |
Operation | myTTOperation |
The object's operation to perform for travel times. More... | |
Private Member Functions | |
SUMOAbstractRouter & | operator= (const SUMOAbstractRouter &s)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
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... | |
const std::string | myType |
the type of this router More... | |
The interface for routing the vehicles over the network.
Definition at line 46 of file SUMOAbstractRouter.h.
typedef double(* SUMOAbstractRouter< E, V >::Operation) (const E *const, const V *const, double) |
Type of the function that is used to retrieve the edge effort.
Definition at line 92 of file SUMOAbstractRouter.h.
|
inline |
Constructor.
Definition at line 95 of file SUMOAbstractRouter.h.
|
inline |
Copy Constructor.
Definition at line 111 of file SUMOAbstractRouter.h.
|
inlinevirtual |
Destructor.
Definition at line 127 of file SUMOAbstractRouter.h.
References elapsedMs2string(), SUMOAbstractRouter< E, V >::myNumQueries, SUMOAbstractRouter< E, V >::myQueryTimeSum, SUMOAbstractRouter< E, V >::myQueryVisits, SUMOAbstractRouter< E, V >::myType, toString(), and WRITE_MESSAGE.
|
inline |
Builds the path from marked edges.
Definition at line 359 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::EdgeInfo::edge, and SUMOAbstractRouter< E, V >::EdgeInfo::prev.
Referenced by AStarRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().
|
pure virtual |
Implemented in ROJTRRouter, AStarRouter< E, V >, CHRouter< E, V >, CHRouterWrapper< E, V >, DijkstraRouter< E, V >, IntermodalRouter< E, L, N, V >, PedestrianRouter< E, L, N, V >, and RailwayRouter< E, V >.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable().
|
pure virtual |
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.
Implemented in IntermodalRouter< E, L, N, V >, PedestrianRouter< E, L, N, V >, AStarRouter< E, V >, CHRouter< E, V >, CHRouterWrapper< E, V >, DijkstraRouter< E, V >, and RailwayRouter< E, V >.
Referenced by RailwayRouter< E, V >::_compute(), NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), MSTriggeredRerouter::addParkValues(), LIBSUMO_NAMESPACE::Vehicle::changeTarget(), IntermodalRouter< E, L, N, V >::compute(), SUMOAbstractRouter< E, V >::compute(), MSDispatch::computeDetourTime(), SUMOAbstractRouter< E, V >::computeLooped(), ROMAAssignments::computePath(), MSDispatch::computePickupTime(), MSDispatch_RouteExtension::dispatch(), LIBSUMO_NAMESPACE::Simulation::findRoute(), NBPTLineCont::getCost(), libsumo::Helper::getDrivingDistance(), MSBaseVehicle::insertStop(), LandmarkLookupTable< E, V >::LandmarkLookupTable(), MSTriggeredRerouter::notifyEnter(), MSDevice_Taxi::prepareStop(), RORouteDef::repairCurrentRoute(), MSBaseVehicle::replaceStop(), MSBaseVehicle::reroute(), MSBaseVehicle::rerouteBetweenStops(), and MSVehicle::rerouteParkingArea().
|
inline |
Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme.
Definition at line 183 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::computeLooped().
|
inline |
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 198 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::compute(), MsgHandler::informf(), SUMOAbstractRouter< E, V >::myErrorMsgHandler, SUMOAbstractRouter< E, V >::recomputeCosts(), and SVC_IGNORING.
Referenced by SUMOAbstractRouter< E, V >::compute(), and MSBaseVehicle::reroute().
|
inline |
Definition at line 334 of file SUMOAbstractRouter.h.
References SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::myQueryStartTime, SUMOAbstractRouter< E, V >::myQueryTimeSum, and SUMOAbstractRouter< E, V >::myQueryVisits.
Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().
|
inline |
Definition at line 169 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myEdgeInfos.
|
inline |
Definition at line 325 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myOperation.
Referenced by IntermodalRouter< E, L, N, V >::compute(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), PedestrianRouter< E, L, N, V >::compute(), SUMOAbstractRouter< E, V >::recomputeCosts(), SUMOAbstractRouter< E, V >::setHint(), CHBuilder< E, V >::synchronize(), SUMOAbstractRouter< E, V >::updateViaCost(), and SUMOAbstractRouter< E, V >::updateViaEdgeCost().
|
inline |
Definition at line 231 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myTTOperation.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), SUMOAbstractRouter< E, V >::updateViaCost(), and SUMOAbstractRouter< E, V >::updateViaEdgeCost().
|
inline |
Definition at line 165 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myType.
|
inline |
Definition at line 136 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myAmClean, SUMOAbstractRouter< E, V >::myEdgeInfos, SUMOAbstractRouter< E, V >::myFound, SUMOAbstractRouter< E, V >::myFrontierList, and STEPS2TIME.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setHint().
|
inline |
Definition at line 227 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myHavePermissions, and SUMOAbstractRouter< E, V >::myHaveRestrictions.
Referenced by SUMOAbstractRouter< E, V >::recomputeCosts(), and SUMOAbstractRouter< E, V >::setHint().
|
privatedelete |
Invalidated assignment operator.
|
inlinevirtual |
Reimplemented in CHRouter< E, V >, CHRouterWrapper< E, V >, IntermodalRouter< E, L, N, V >, PedestrianRouter< E, L, N, V >, and RailwayRouter< E, V >.
Definition at line 347 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myEdgeInfos, and SUMOAbstractRouter< E, V >::myProhibited.
Referenced by IntermodalRouter< E, L, N, V >::prohibit(), PedestrianRouter< E, L, N, V >::prohibit(), and RailwayRouter< E, V >::prohibit().
|
inline |
Definition at line 282 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::getEffort(), SUMOAbstractRouter< E, V >::recomputeCosts(), and STEPS2TIME.
|
inline |
Definition at line 261 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::isProhibited(), STEPS2TIME, and SUMOAbstractRouter< E, V >::updateViaCost().
Referenced by RORouteDef::addAlternative(), MSTriggeredRerouter::addParkValues(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), MSDispatch::computeDetourTime(), SUMOAbstractRouter< E, V >::computeLooped(), ROMAAssignments::computePath(), MSDispatch::computePickupTime(), computeRoutes(), LIBSUMO_NAMESPACE::Simulation::findRoute(), NBPTLineCont::getCost(), MSBaseVehicle::insertStop(), LandmarkLookupTable< E, V >::LandmarkLookupTable(), MSTriggeredRerouter::notifyEnter(), SUMOAbstractRouter< E, V >::recomputeCosts(), MSBaseVehicle::replaceStop(), MSBaseVehicle::reroute(), MSBaseVehicle::rerouteBetweenStops(), MSVehicle::rerouteParkingArea(), and ROMAAssignments::sue().
|
inlinevirtual |
reset internal caches, used by CHRouter
Reimplemented in CHRouter< E, V >.
Definition at line 161 of file SUMOAbstractRouter.h.
References UNUSED_PARAMETER.
Referenced by computeRoutes(), and ROMAAssignments::incremental().
|
inline |
Definition at line 343 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myAutoBulkMode.
Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable().
|
inlinevirtual |
Reimplemented in IntermodalRouter< E, L, N, V >.
Definition at line 339 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::myBulkMode.
Referenced by ROMAAssignments::computePath(), ROMAAssignments::incremental(), and IntermodalRouter< E, L, N, V >::setBulkMode().
|
inline |
Definition at line 294 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::EdgeInfo::edge, SUMOAbstractRouter< E, V >::EdgeInfo::effort, SUMOAbstractRouter< E, V >::getEffort(), SUMOAbstractRouter< E, V >::init(), SUMOAbstractRouter< E, V >::isProhibited(), SUMOAbstractRouter< E, V >::myEdgeInfos, SUMOAbstractRouter< E, V >::myFound, STEPS2TIME, and SUMOAbstractRouter< E, V >::updateViaCost().
|
inline |
Definition at line 329 of file SUMOAbstractRouter.h.
References SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::myNumQueries, and SUMOAbstractRouter< E, V >::myQueryStartTime.
Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().
|
inline |
Definition at line 245 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::getEffort(), SUMOAbstractRouter< E, V >::getTravelTime(), and SUMOAbstractRouter< E, V >::updateViaEdgeCost().
Referenced by IntermodalRouter< E, L, N, V >::compute(), SUMOAbstractRouter< E, V >::recomputeCosts(), and SUMOAbstractRouter< E, V >::setHint().
|
inline |
Definition at line 235 of file SUMOAbstractRouter.h.
References SUMOAbstractRouter< E, V >::getEffort(), and SUMOAbstractRouter< E, V >::getTravelTime().
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::updateViaCost().
|
protected |
whether we are already initialized
Definition at line 385 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::init().
|
protected |
whether we are currently trying to detect bulk mode automatically
Definition at line 382 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouter< E, V >::clone(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setAutoBulkMode().
|
protected |
whether we are currently operating several route queries in a bulk
Definition at line 379 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setBulkMode().
|
protected |
The container of edge information.
Definition at line 397 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::AStarRouter(), AStarRouter< E, V >::clone(), DijkstraRouter< E, V >::clone(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), DijkstraRouter< E, V >::DijkstraRouter(), SUMOAbstractRouter< E, V >::getEdgeInfo(), SUMOAbstractRouter< E, V >::init(), SUMOAbstractRouter< E, V >::prohibit(), and SUMOAbstractRouter< E, V >::setHint().
|
protected |
the handler for routing errors
Definition at line 370 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(), SUMOAbstractRouter< E, V >::computeLooped(), and RailwayRouter< E, V >::ensureInternalRouter().
|
protected |
list of visited Edges (for resetting)
Definition at line 402 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), SUMOAbstractRouter< E, V >::init(), and SUMOAbstractRouter< E, V >::setHint().
|
protected |
A container for reusage of the min edge heap.
Definition at line 400 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::init().
|
protected |
whether edge permissions need to be considered
Definition at line 388 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::clone(), CHRouter< E, V >::clone(), CHRouterWrapper< E, V >::clone(), DijkstraRouter< E, V >::clone(), RailwayRouter< E, V >::ensureInternalRouter(), and SUMOAbstractRouter< E, V >::isProhibited().
|
protected |
whether edge restrictions need to be considered
Definition at line 391 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::clone(), CHRouter< E, V >::clone(), DijkstraRouter< E, V >::clone(), RailwayRouter< E, V >::ensureInternalRouter(), and SUMOAbstractRouter< E, V >::isProhibited().
|
private |
Definition at line 410 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::startQuery(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().
|
protected |
The object's operation to perform.
Definition at line 373 of file SUMOAbstractRouter.h.
Referenced by AStarRouter< E, V >::clone(), CHRouter< E, V >::clone(), CHRouterWrapper< E, V >::clone(), DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< E, V >::getEffort().
|
protected |
The list of explicitly prohibited edges.
Definition at line 394 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::prohibit().
|
private |
the time spent querying in milliseconds
Definition at line 412 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::endQuery(), and SUMOAbstractRouter< E, V >::startQuery().
|
private |
Definition at line 413 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::endQuery(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().
|
private |
counters for performance logging
Definition at line 409 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::endQuery(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().
|
protected |
The object's operation to perform for travel times.
Definition at line 376 of file SUMOAbstractRouter.h.
Referenced by DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< E, V >::getTravelTime().
|
private |
the type of this router
Definition at line 406 of file SUMOAbstractRouter.h.
Referenced by SUMOAbstractRouter< E, V >::getType(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().