Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEPathManager::PathCalculator Class Reference

class used to calculate paths in nets More...

#include <GNEPathManager.h>

Collaboration diagram for GNEPathManager::PathCalculator:
[legend]

Public Member Functions

bool busStopConnected (const GNEAdditional *busStop, const GNEEdge *edge) const
 check if exist a path between the given busStop and edge (Either a valid lane or an acces) for pedestrians
std::vector< GNEEdge * > calculateDijkstraPath (const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &edges) const
 calculate Dijkstra path between a list of edges (for example, from-via-to edges)
std::vector< GNEEdge * > calculateDijkstraPath (const SUMOVehicleClass vClass, GNEEdge *fromEdge, GNEEdge *toEdge) const
 calculate Dijkstra path between one edge
std::vector< GNEEdge * > calculateDijkstraPath (const SUMOVehicleClass vClass, GNEEdge *fromEdge, GNEJunction *toJunction) const
 calculate Dijkstra path between from edge and to junction
std::vector< GNEEdge * > calculateDijkstraPath (const SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEEdge *toEdge) const
 calculate Dijkstra path between from junction and to edge
std::vector< GNEEdge * > calculateDijkstraPath (const SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEJunction *toJunction) const
 calculate Dijkstra path between two Junctions
void calculateReachability (const SUMOVehicleClass vClass, GNEEdge *originEdge)
 calculate reachability for given edge
bool consecutiveEdgesConnected (const SUMOVehicleClass vClass, const GNEEdge *from, const GNEEdge *to) const
 check if exist a path between the two given consecutive edges for the given VClass
void invalidatePathCalculator ()
 invalidate pathCalculator
bool isPathCalculatorUpdated () const
 check if pathCalculator is updated
 PathCalculator (const GNENet *net)
 constructor
void updatePathCalculator ()
 update DijkstraRouter (needed a good calculation of dijkstra path after modifying network)
 ~PathCalculator ()
 destructor

Private Member Functions

std::vector< GNEEdge * > optimizeJunctionPath (const std::vector< GNEEdge * > &edges) const
 optimize junction path

Private Attributes

SUMOAbstractRouter< NBRouterEdge, NBVehicle > * myDijkstraRouter
 SUMO Abstract myDijkstraRouter.
const GNENetmyNet
 pointer to net
bool myPathCalculatorUpdated
 flag for checking if path calculator is updated

Detailed Description

class used to calculate paths in nets

Definition at line 56 of file GNEPathManager.h.

Constructor & Destructor Documentation

◆ PathCalculator()

GNEPathManager::PathCalculator::PathCalculator ( const GNENet * net)

constructor

Definition at line 39 of file GNEPathManager.cpp.

References NBRouterEdge::getTravelTimeStatic(), myDijkstraRouter, myNet, and myPathCalculatorUpdated.

◆ ~PathCalculator()

GNEPathManager::PathCalculator::~PathCalculator ( )

destructor

Definition at line 50 of file GNEPathManager.cpp.

References myDijkstraRouter.

Member Function Documentation

◆ busStopConnected()

bool GNEPathManager::PathCalculator::busStopConnected ( const GNEAdditional * busStop,
const GNEEdge * edge ) const

◆ calculateDijkstraPath() [1/5]

std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath ( const SUMOVehicleClass vClass,
const std::vector< GNEEdge * > & edges ) const

calculate Dijkstra path between a list of edges (for example, from-via-to edges)

Definition at line 70 of file GNEPathManager.cpp.

References GNENet::getAttributeCarriers(), myDijkstraRouter, myPathCalculatorUpdated, and GNENetHelper::AttributeCarriers::retrieveEdge().

Referenced by calculateDijkstraPath(), calculateDijkstraPath(), calculateDijkstraPath(), calculateDijkstraPath(), GNERouteHandler::canReverse(), GNERouteHandler::canReverse(), GNERouteHandler::transformToRouteFlow(), and GNERouteHandler::transformToVehicle().

Here is the caller graph for this function:

◆ calculateDijkstraPath() [2/5]

std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath ( const SUMOVehicleClass vClass,
GNEEdge * fromEdge,
GNEEdge * toEdge ) const

calculate Dijkstra path between one edge

Definition at line 135 of file GNEPathManager.cpp.

References calculateDijkstraPath().

◆ calculateDijkstraPath() [3/5]

std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath ( const SUMOVehicleClass vClass,
GNEEdge * fromEdge,
GNEJunction * toJunction ) const

calculate Dijkstra path between from edge and to junction

Definition at line 141 of file GNEPathManager.cpp.

References calculateDijkstraPath(), GNEJunction::getGNEIncomingEdges(), and optimizeJunctionPath().

◆ calculateDijkstraPath() [4/5]

std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath ( const SUMOVehicleClass vClass,
GNEJunction * fromJunction,
GNEEdge * toEdge ) const

calculate Dijkstra path between from junction and to edge

Definition at line 158 of file GNEPathManager.cpp.

References calculateDijkstraPath(), GNEJunction::getGNEOutgoingEdges(), and optimizeJunctionPath().

◆ calculateDijkstraPath() [5/5]

std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath ( const SUMOVehicleClass vClass,
GNEJunction * fromJunction,
GNEJunction * toJunction ) const

calculate Dijkstra path between two Junctions

Definition at line 175 of file GNEPathManager.cpp.

References calculateDijkstraPath(), GNEJunction::getGNEIncomingEdges(), GNEJunction::getGNEOutgoingEdges(), and optimizeJunctionPath().

◆ calculateReachability()

◆ consecutiveEdgesConnected()

bool GNEPathManager::PathCalculator::consecutiveEdgesConnected ( const SUMOVehicleClass vClass,
const GNEEdge * from,
const GNEEdge * to ) const

check if exist a path between the two given consecutive edges for the given VClass

Definition at line 245 of file GNEPathManager.cpp.

References GNEHierarchicalElement::getChildLanes(), GNEEdge::getGNEConnections(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), NBEdge::Lane::permissions, and SVC_PEDESTRIAN.

Referenced by calculateReachability().

Here is the caller graph for this function:

◆ invalidatePathCalculator()

void GNEPathManager::PathCalculator::invalidatePathCalculator ( )

invalidate pathCalculator

Definition at line 322 of file GNEPathManager.cpp.

References myPathCalculatorUpdated.

◆ isPathCalculatorUpdated()

bool GNEPathManager::PathCalculator::isPathCalculatorUpdated ( ) const

check if pathCalculator is updated

Definition at line 316 of file GNEPathManager.cpp.

References myPathCalculatorUpdated.

◆ optimizeJunctionPath()

std::vector< GNEEdge * > GNEPathManager::PathCalculator::optimizeJunctionPath ( const std::vector< GNEEdge * > & edges) const
private

optimize junction path

Definition at line 328 of file GNEPathManager.cpp.

Referenced by calculateDijkstraPath(), calculateDijkstraPath(), and calculateDijkstraPath().

Here is the caller graph for this function:

◆ updatePathCalculator()

void GNEPathManager::PathCalculator::updatePathCalculator ( )

update DijkstraRouter (needed a good calculation of dijkstra path after modifying network)

Note
only needed if this path calculator requiere to use the calculateDijkstraPath(...) functions

Definition at line 56 of file GNEPathManager.cpp.

References NBRouterEdge::getTravelTimeStatic(), myDijkstraRouter, myNet, and myPathCalculatorUpdated.

Field Documentation

◆ myDijkstraRouter

SUMOAbstractRouter<NBRouterEdge, NBVehicle>* GNEPathManager::PathCalculator::myDijkstraRouter
private

SUMO Abstract myDijkstraRouter.

Definition at line 108 of file GNEPathManager.h.

Referenced by calculateDijkstraPath(), PathCalculator(), updatePathCalculator(), and ~PathCalculator().

◆ myNet

const GNENet* GNEPathManager::PathCalculator::myNet
private

pointer to net

Definition at line 102 of file GNEPathManager.h.

Referenced by PathCalculator(), and updatePathCalculator().

◆ myPathCalculatorUpdated

bool GNEPathManager::PathCalculator::myPathCalculatorUpdated
private

flag for checking if path calculator is updated

Definition at line 105 of file GNEPathManager.h.

Referenced by calculateDijkstraPath(), invalidatePathCalculator(), isPathCalculatorUpdated(), PathCalculator(), and updatePathCalculator().


The documentation for this class was generated from the following files: