|
SUMO - Simulation of Urban MObility
|
Computes the shortest path through a network using the dijkstra algorithm. More...
#include <TraCIDijkstraRouter.h>
Data Structures | |
| struct | EdgeInfo |
| class | EdgeInfoByEffortComperator |
| class | EdgeInfoCont |
Public Member Functions | |
| void | buildPathFrom (EdgeInfo *rbegin, std::vector< const E * > &edges) |
| Builds the path from marked edges. | |
| virtual void | compute (const E *from, const E *to, const MSVehicle *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. | |
| virtual SUMOReal | getEffort (const E *const e, SUMOReal t) const |
| SUMOReal | recomputeCosts (const std::vector< const E * > &edges, const MSVehicle *const v, SUMOTime msTime) const |
| TraCIDijkstraRouter (size_t noE) | |
| Constructor. | |
| virtual | ~TraCIDijkstraRouter () |
| Destructor. | |
Protected Member Functions | |
| void | clearTemporaryStorages (std::vector< bool > *edgeList, EdgeInfoCont *consecutionList) |
| Saves the temporary storages for further usage. | |
Protected Attributes | |
| size_t | myNoE |
| The network to use. | |
| InstancePool< EdgeInfoCont > | myReusableEdgeInfoLists |
| A container for reusage of edge consecution lists. | |
| InstancePool< std::vector< bool > > | myReusableEdgeLists |
| A container for reusage of examined edges lists. | |
Computes the shortest path through a network using the dijkstra algorithm.
The template parameters are:
| E | The edge class to use (MSEdge/ROEdge) |
This router is basically the same as the SUMODijkstraRouter, except for the following: If start and destination edge are the same, the computed route does not consist of just the starting edge. Instead, if there is a path from the starting edge through the network back to itself, the route will consist of this path, containing the same edge both at the beginning and at the end. Furthermore, no vehicle is regarded to determine the efforts of the edges, therefore no prohibition function is used.
Definition at line 62 of file TraCIDijkstraRouter.h.
| TraCIDijkstraRouter< E >::TraCIDijkstraRouter | ( | size_t | noE | ) | [inline] |
Constructor.
Definition at line 65 of file TraCIDijkstraRouter.h.
| virtual TraCIDijkstraRouter< E >::~TraCIDijkstraRouter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 69 of file TraCIDijkstraRouter.h.
| void TraCIDijkstraRouter< E >::buildPathFrom | ( | EdgeInfo * | rbegin, |
| std::vector< const E * > & | edges | ||
| ) | [inline] |
Builds the path from marked edges.
Definition at line 217 of file TraCIDijkstraRouter.h.
References TraCIDijkstraRouter< E >::EdgeInfo::edge, and TraCIDijkstraRouter< E >::EdgeInfo::prev.
Referenced by TraCIDijkstraRouter< E >::compute().
| void TraCIDijkstraRouter< E >::clearTemporaryStorages | ( | std::vector< bool > * | edgeList, |
| EdgeInfoCont * | consecutionList | ||
| ) | [inline, protected] |
Saves the temporary storages for further usage.
Definition at line 291 of file TraCIDijkstraRouter.h.
References InstancePool< T >::addFreeInstance(), TraCIDijkstraRouter< E >::myReusableEdgeInfoLists, and TraCIDijkstraRouter< E >::myReusableEdgeLists.
Referenced by TraCIDijkstraRouter< E >::compute().
| virtual void TraCIDijkstraRouter< E >::compute | ( | const E * | from, |
| const E * | to, | ||
| const MSVehicle *const | vehicle, | ||
| SUMOTime | msTime, | ||
| std::vector< const E * > & | into | ||
| ) | [inline, 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.
Implements SUMOAbstractRouter< E, MSVehicle >.
Definition at line 135 of file TraCIDijkstraRouter.h.
References TraCIDijkstraRouter< E >::EdgeInfoCont::add(), TraCIDijkstraRouter< E >::buildPathFrom(), TraCIDijkstraRouter< E >::clearTemporaryStorages(), TraCIDijkstraRouter< E >::EdgeInfo::edge, TraCIDijkstraRouter< E >::EdgeInfo::effort, TraCIDijkstraRouter< E >::EdgeInfoCont::getEffort(), TraCIDijkstraRouter< E >::getEffort(), InstancePool< T >::getFreeInstance(), TraCIDijkstraRouter< E >::myNoE, TraCIDijkstraRouter< E >::myReusableEdgeInfoLists, TraCIDijkstraRouter< E >::myReusableEdgeLists, TraCIDijkstraRouter< E >::EdgeInfoCont::reset(), STEPS2TIME, SUMOReal, and UNUSED_PARAMETER.
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest().
| virtual SUMOReal TraCIDijkstraRouter< E >::getEffort | ( | const E *const | e, |
| SUMOReal | t | ||
| ) | const [inline, virtual] |
Definition at line 123 of file TraCIDijkstraRouter.h.
References MSNet::getInstance(), MSLane::getLength(), MSLane::getMaxSpeed(), and SUMOReal.
Referenced by TraCIDijkstraRouter< E >::compute(), and TraCIDijkstraRouter< E >::recomputeCosts().
| SUMOReal TraCIDijkstraRouter< E >::recomputeCosts | ( | const std::vector< const E * > & | edges, |
| const MSVehicle *const | v, | ||
| SUMOTime | msTime | ||
| ) | const [inline, virtual] |
Implements SUMOAbstractRouter< E, MSVehicle >.
Definition at line 205 of file TraCIDijkstraRouter.h.
References TraCIDijkstraRouter< E >::getEffort(), STEPS2TIME, SUMOReal, and UNUSED_PARAMETER.
size_t TraCIDijkstraRouter< E >::myNoE [protected] |
The network to use.
Definition at line 300 of file TraCIDijkstraRouter.h.
Referenced by TraCIDijkstraRouter< E >::compute().
InstancePool<EdgeInfoCont> TraCIDijkstraRouter< E >::myReusableEdgeInfoLists [protected] |
A container for reusage of edge consecution lists.
Definition at line 306 of file TraCIDijkstraRouter.h.
Referenced by TraCIDijkstraRouter< E >::clearTemporaryStorages(), and TraCIDijkstraRouter< E >::compute().
InstancePool<std::vector<bool> > TraCIDijkstraRouter< E >::myReusableEdgeLists [protected] |
A container for reusage of examined edges lists.
Definition at line 303 of file TraCIDijkstraRouter.h.
Referenced by TraCIDijkstraRouter< E >::clearTemporaryStorages(), and TraCIDijkstraRouter< E >::compute().