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 208 of file GNEPathManager.h.

Constructor & Destructor Documentation

◆ PathCalculator()

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

◆ ~PathCalculator()

GNEPathManager::PathCalculator::~PathCalculator ( )

destructor

Definition at line 247 of file GNEPathManager.cpp.

Member Function Documentation

◆ busStopConnected()

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

◆ calculateDijkstraPath() [1/5]

◆ 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 332 of file GNEPathManager.cpp.

◆ 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 338 of file GNEPathManager.cpp.

References GNEJunction::getGNEIncomingEdges().

◆ 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 355 of file GNEPathManager.cpp.

References GNEJunction::getGNEOutgoingEdges().

◆ 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 372 of file GNEPathManager.cpp.

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

◆ calculateReachability()

void GNEPathManager::PathCalculator::calculateReachability ( const SUMOVehicleClass  vClass,
GNEEdge originEdge 
)

◆ 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 442 of file GNEPathManager.cpp.

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

Referenced by GNEVehicle::getDemandElementProblem().

Here is the caller graph for this function:

◆ invalidatePathCalculator()

void GNEPathManager::PathCalculator::invalidatePathCalculator ( )

invalidate pathCalculator

Definition at line 519 of file GNEPathManager.cpp.

Referenced by GNEConnection::setAttribute(), GNECrossing::setAttribute(), GNEEdge::setAttribute(), GNEJunction::setAttribute(), and GNELane::setAttribute().

Here is the caller graph for this function:

◆ isPathCalculatorUpdated()

bool GNEPathManager::PathCalculator::isPathCalculatorUpdated ( ) const

check if pathCalculator is updated

Definition at line 513 of file GNEPathManager.cpp.

Referenced by GNENet::computeDemandElements(), GNEApplicationWindow::onCmdComputePathManager(), and GNEApplicationWindow::onUpdComputePathManager().

Here is the caller graph for this function:

◆ optimizeJunctionPath()

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

optimize junction path

Definition at line 525 of file GNEPathManager.cpp.

◆ 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 253 of file GNEPathManager.cpp.

References NBRouterEdge::getTravelTimeStatic().

Referenced by GNENet::computeDemandElements(), and GNEApplicationWindow::onCmdComputePathManager().

Here is the caller graph for this function:

Field Documentation

◆ myDijkstraRouter

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

SUMO Abstract myDijkstraRouter.

Definition at line 260 of file GNEPathManager.h.

Referenced by PathCalculator().

◆ myNet

const GNENet* GNEPathManager::PathCalculator::myNet
private

pointer to net

Definition at line 254 of file GNEPathManager.h.

Referenced by PathCalculator().

◆ myPathCalculatorUpdated

bool GNEPathManager::PathCalculator::myPathCalculatorUpdated
private

flag for checking if path calculator is updated

Definition at line 257 of file GNEPathManager.h.


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