Eclipse SUMO - Simulation of Urban MObility
GNEPathManager Class Reference

#include <GNEPathManager.h>

Collaboration diagram for GNEPathManager:
[legend]

Data Structures

class  PathCalculator
 class used to calculate paths in nets More...
 
class  PathDraw
 class used to mark path draw More...
 
class  PathElement
 class used for path elements More...
 
class  Segment
 segment More...
 

Public Member Functions

void calculateConsecutivePathEdges (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
 calculate consecutive path edges More...
 
void calculateConsecutivePathLanes (PathElement *pathElement, const std::vector< GNELane * > lanes)
 calculate consecutive path lanes More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
 calculate path lanes between list of edges (using dijkstra, require path calculator updated) More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNELane * > lanes)
 calculate path lanes between list of lanes (using dijkstra, require path calculator updated) More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEJunction *toJunction)
 calculate path between from junction and to junction (using dijkstra, require path calculator updated) More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, GNEJunction *fromJunction, GNELane *toLane)
 calculate path between from junction and to edge (using dijkstra, require path calculator updated) More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, GNELane *fromLane, GNEJunction *toJunction)
 calculate path between from edge and to junction(using dijkstra, require path calculator updated) More...
 
void calculatePath (PathElement *pathElement, SUMOVehicleClass vClass, GNELane *fromLane, GNELane *toLane)
 calculate path between from-to edges (using dijkstra, require path calculator updated) More...
 
void clearDemandPaths ()
 clear demand paths More...
 
void drawJunctionPathElements (const GUIVisualizationSettings &s, const GNEJunction *junction) const
 draw junction path elements More...
 
void drawLanePathElements (const GUIVisualizationSettings &s, const GNELane *lane) const
 draw lane path elements More...
 
void forceDrawPath (const GUIVisualizationSettings &s, const PathElement *pathElement) const
 force draw path (used carefully, ONLY when we're inspecting a path element, due slowdowns) More...
 
const GNELanegetFirstLane (const PathElement *pathElement) const
 get first lane associated with path element More...
 
PathCalculatorgetPathCalculator ()
 obtain instance of PathCalculator More...
 
PathDrawgetPathDraw ()
 obtain instance of PathDraw More...
 
const PathElementgetPathElement (const GUIGlObject *GLObject) const
 get path element More...
 
const std::vector< Segment * > & getPathElementSegments (PathElement *pathElement) const
 get path segments More...
 
 GNEPathManager (const GNENet *net)
 constructor More...
 
void invalidateJunctionPath (const GNEJunction *junction)
 invalidate junction path More...
 
void invalidateLanePath (const GNELane *lane)
 invalidate lane path More...
 
bool isPathValid (const PathElement *pathElement) const
 check if path element is valid More...
 
void removePath (PathElement *pathElement)
 remove path More...
 
 ~GNEPathManager ()
 destructor More...
 

Protected Member Functions

void addSegmentInJunctionSegments (Segment *segment, const GNEJunction *junction)
 add segments int junctionSegments (called by Segment constructor) More...
 
void addSegmentInLaneSegments (Segment *segment, const GNELane *lane)
 add segments int laneSegments (called by Segment constructor) More...
 
void buildPath (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > path, GNELane *fromLane, GNEJunction *fromJunction, GNELane *toLane, GNEJunction *toJunction)
 build path More...
 
void clearSegmentFromJunctionAndLaneSegments (Segment *segment)
 clear segments from junction and lane Segments (called by Segment destructor) More...
 
void clearSegments ()
 clear segments More...
 
bool connectedLanes (const GNELane *fromLane, const GNELane *toLane) const
 check if given lanes are connected More...
 

Protected Attributes

std::map< const GNEJunction *, std::vector< Segment * > > myJunctionSegments
 map with junction segments More...
 
std::map< const GNELane *, std::vector< Segment * > > myLaneSegments
 map with lane segments More...
 
PathCalculatormyPathCalculator
 PathCalculator instance. More...
 
PathDrawmyPathDraw
 PathDraw instance. More...
 
std::map< const PathElement *, std::vector< Segment * > > myPaths
 map with path element and their associated segments More...
 

Private Member Functions

 GNEPathManager (const GNEPathManager &)=delete
 Invalidated copy constructor. More...
 
void markLabelSegment (const std::vector< Segment * > &segments) const
 mark label segment More...
 
GNEPathManageroperator= (const GNEPathManager &)=delete
 Invalidated assignment operator. More...
 

Private Attributes

const std::vector< Segment * > myEmptySegments
 empty segments (used in getPathElementSegments) More...
 

Detailed Description

Definition at line 43 of file GNEPathManager.h.

Constructor & Destructor Documentation

◆ GNEPathManager() [1/2]

GNEPathManager::GNEPathManager ( const GNENet net)

constructor

Definition at line 611 of file GNEPathManager.cpp.

◆ ~GNEPathManager()

GNEPathManager::~GNEPathManager ( )

destructor

Definition at line 617 of file GNEPathManager.cpp.

References clearSegments(), myPathCalculator, and myPathDraw.

◆ GNEPathManager() [2/2]

GNEPathManager::GNEPathManager ( const GNEPathManager )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addSegmentInJunctionSegments()

void GNEPathManager::addSegmentInJunctionSegments ( Segment segment,
const GNEJunction junction 
)
protected

add segments int junctionSegments (called by Segment constructor)

Definition at line 955 of file GNEPathManager.cpp.

References myJunctionSegments.

Referenced by GNEPathManager::Segment::Segment().

Here is the caller graph for this function:

◆ addSegmentInLaneSegments()

void GNEPathManager::addSegmentInLaneSegments ( Segment segment,
const GNELane lane 
)
protected

add segments int laneSegments (called by Segment constructor)

Definition at line 949 of file GNEPathManager.cpp.

References myLaneSegments.

Referenced by GNEPathManager::Segment::Segment().

Here is the caller graph for this function:

◆ buildPath()

void GNEPathManager::buildPath ( PathElement pathElement,
SUMOVehicleClass  vClass,
const std::vector< GNEEdge * >  path,
GNELane fromLane,
GNEJunction fromJunction,
GNELane toLane,
GNEJunction toJunction 
)
protected

build path

Definition at line 1029 of file GNEPathManager.cpp.

References markLabelSegment(), GNEPathManager::Segment::markSegmentLabel(), myPaths, and removePath().

Referenced by calculatePath().

Here is the caller graph for this function:

◆ calculateConsecutivePathEdges()

void GNEPathManager::calculateConsecutivePathEdges ( PathElement pathElement,
SUMOVehicleClass  vClass,
const std::vector< GNEEdge * >  edges 
)

calculate consecutive path edges

Definition at line 758 of file GNEPathManager.cpp.

References calculateConsecutivePathLanes().

Referenced by GNEEdgeRelData::computePathElement(), GNERoute::computePathElement(), GNEDemandElementPlan::computePlanPathElement(), and GNEEdgeData::updateGeometry().

Here is the caller graph for this function:

◆ calculateConsecutivePathLanes()

void GNEPathManager::calculateConsecutivePathLanes ( PathElement pathElement,
const std::vector< GNELane * >  lanes 
)

calculate consecutive path lanes

Definition at line 773 of file GNEPathManager.cpp.

References markLabelSegment(), myPaths, and removePath().

Referenced by calculateConsecutivePathEdges(), GNELaneAreaDetector::computePathElement(), GNEOverheadWire::computePathElement(), and GNERoute::computePathElement().

Here is the caller graph for this function:

◆ calculatePath() [1/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
const std::vector< GNEEdge * >  edges 
)

calculate path lanes between list of edges (using dijkstra, require path calculator updated)

Definition at line 729 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), myPathCalculator, and removePath().

◆ calculatePath() [2/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
const std::vector< GNELane * >  lanes 
)

calculate path lanes between list of lanes (using dijkstra, require path calculator updated)

Definition at line 741 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), myPathCalculator, and removePath().

◆ calculatePath() [3/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
GNEJunction fromJunction,
GNEJunction toJunction 
)

calculate path between from junction and to junction (using dijkstra, require path calculator updated)

Definition at line 722 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), and myPathCalculator.

◆ calculatePath() [4/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
GNEJunction fromJunction,
GNELane toLane 
)

calculate path between from junction and to edge (using dijkstra, require path calculator updated)

Definition at line 714 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), GNELane::getParentEdge(), and myPathCalculator.

◆ calculatePath() [5/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
GNELane fromLane,
GNEJunction toJunction 
)

calculate path between from edge and to junction(using dijkstra, require path calculator updated)

Definition at line 706 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), GNELane::getParentEdge(), and myPathCalculator.

◆ calculatePath() [6/6]

void GNEPathManager::calculatePath ( PathElement pathElement,
SUMOVehicleClass  vClass,
GNELane fromLane,
GNELane toLane 
)

calculate path between from-to edges (using dijkstra, require path calculator updated)

Definition at line 698 of file GNEPathManager.cpp.

References buildPath(), GNEPathManager::PathCalculator::calculateDijkstraPath(), GNELane::getParentEdge(), and myPathCalculator.

Referenced by GNERide::computePathElement(), and GNEVehicle::computePathElement().

Here is the caller graph for this function:

◆ clearDemandPaths()

void GNEPathManager::clearDemandPaths ( )

clear demand paths

Definition at line 929 of file GNEPathManager.cpp.

References myPaths.

Referenced by GNENet::computeDemandElements().

Here is the caller graph for this function:

◆ clearSegmentFromJunctionAndLaneSegments()

void GNEPathManager::clearSegmentFromJunctionAndLaneSegments ( Segment segment)
protected

clear segments from junction and lane Segments (called by Segment destructor)

Definition at line 961 of file GNEPathManager.cpp.

References GNEPathManager::Segment::getJunction(), GNEPathManager::Segment::getLane(), myJunctionSegments, and myLaneSegments.

◆ clearSegments()

void GNEPathManager::clearSegments ( )
protected

clear segments

Definition at line 999 of file GNEPathManager.cpp.

References myPaths.

Referenced by ~GNEPathManager().

Here is the caller graph for this function:

◆ connectedLanes()

bool GNEPathManager::connectedLanes ( const GNELane fromLane,
const GNELane toLane 
) const
protected

check if given lanes are connected

Definition at line 1013 of file GNEPathManager.cpp.

References NBEdge::getConnectionsFromLane(), GNELane::getIndex(), GNEEdge::getNBEdge(), and GNELane::getParentEdge().

◆ drawJunctionPathElements()

void GNEPathManager::drawJunctionPathElements ( const GUIVisualizationSettings s,
const GNEJunction junction 
) const

draw junction path elements

Definition at line 852 of file GNEPathManager.cpp.

References myJunctionSegments.

Referenced by GNEJunction::drawJunctionChildren().

Here is the caller graph for this function:

◆ drawLanePathElements()

void GNEPathManager::drawLanePathElements ( const GUIVisualizationSettings s,
const GNELane lane 
) const

draw lane path elements

Definition at line 817 of file GNEPathManager.cpp.

References GNELane::drawOverlappedRoutes(), GNEViewNet::getDemandViewOptions(), GNEAttributeCarrier::getNet(), GNENet::getViewNet(), myLaneSegments, and GNEViewNetHelper::DemandViewOptions::showOverlappedRoutes().

Referenced by GNELane::drawChildren().

Here is the caller graph for this function:

◆ forceDrawPath()

void GNEPathManager::forceDrawPath ( const GUIVisualizationSettings s,
const PathElement pathElement 
) const

force draw path (used carefully, ONLY when we're inspecting a path element, due slowdowns)

Definition at line 872 of file GNEPathManager.cpp.

References GNEPathManager::PathElement::drawLanePartialGL(), myJunctionSegments, and myLaneSegments.

◆ getFirstLane()

const GNELane * GNEPathManager::getFirstLane ( const PathElement pathElement) const

get first lane associated with path element

Definition at line 687 of file GNEPathManager.cpp.

References myPaths.

◆ getPathCalculator()

◆ getPathDraw()

GNEPathManager::PathDraw * GNEPathManager::getPathDraw ( )

obtain instance of PathDraw

Definition at line 662 of file GNEPathManager.cpp.

References myPathDraw.

Referenced by GNEViewNet::doPaintGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().

Here is the caller graph for this function:

◆ getPathElement()

const GNEPathManager::PathElement * GNEPathManager::getPathElement ( const GUIGlObject GLObject) const

get path element

Definition at line 634 of file GNEPathManager.cpp.

References myPaths.

◆ getPathElementSegments()

const std::vector< GNEPathManager::Segment * > & GNEPathManager::getPathElementSegments ( GNEPathManager::PathElement pathElement) const

get path segments

Definition at line 652 of file GNEPathManager.cpp.

References myEmptySegments, and myPaths.

Referenced by GNEDemandElement::getEdgeStopIndex().

Here is the caller graph for this function:

◆ invalidateJunctionPath()

void GNEPathManager::invalidateJunctionPath ( const GNEJunction junction)

invalidate junction path

Definition at line 911 of file GNEPathManager.cpp.

References myJunctionSegments.

Referenced by GNENet::deleteJunction().

Here is the caller graph for this function:

◆ invalidateLanePath()

void GNEPathManager::invalidateLanePath ( const GNELane lane)

invalidate lane path

Definition at line 893 of file GNEPathManager.cpp.

References myLaneSegments.

Referenced by GNENet::deleteEdge(), and GNENet::deleteLane().

Here is the caller graph for this function:

◆ isPathValid()

bool GNEPathManager::isPathValid ( const PathElement pathElement) const

check if path element is valid

Definition at line 668 of file GNEPathManager.cpp.

References myPaths.

Referenced by GNERide::computePathElement(), GNERoute::computePathElement(), GNEContainer::drawGL(), GNEVehicle::drawGL(), and GNEVehicle::isDemandElementValid().

Here is the caller graph for this function:

◆ markLabelSegment()

void GNEPathManager::markLabelSegment ( const std::vector< Segment * > &  segments) const
private

mark label segment

Definition at line 1108 of file GNEPathManager.cpp.

Referenced by buildPath(), and calculateConsecutivePathLanes().

Here is the caller graph for this function:

◆ operator=()

GNEPathManager& GNEPathManager::operator= ( const GNEPathManager )
privatedelete

Invalidated assignment operator.

◆ removePath()

void GNEPathManager::removePath ( PathElement pathElement)

remove path

Definition at line 803 of file GNEPathManager.cpp.

References myPaths.

Referenced by buildPath(), calculateConsecutivePathLanes(), calculatePath(), GNERide::computePathElement(), and GNEDataInterval::removeGenericDataChild().

Here is the caller graph for this function:

Field Documentation

◆ myEmptySegments

const std::vector<Segment*> GNEPathManager::myEmptySegments
private

empty segments (used in getPathElementSegments)

Definition at line 400 of file GNEPathManager.h.

Referenced by getPathElementSegments().

◆ myJunctionSegments

std::map<const GNEJunction*, std::vector<Segment*> > GNEPathManager::myJunctionSegments
protected

◆ myLaneSegments

std::map<const GNELane*, std::vector<Segment*> > GNEPathManager::myLaneSegments
protected

◆ myPathCalculator

PathCalculator* GNEPathManager::myPathCalculator
protected

PathCalculator instance.

Definition at line 381 of file GNEPathManager.h.

Referenced by calculatePath(), getPathCalculator(), and ~GNEPathManager().

◆ myPathDraw

PathDraw* GNEPathManager::myPathDraw
protected

PathDraw instance.

Definition at line 384 of file GNEPathManager.h.

Referenced by getPathDraw(), and ~GNEPathManager().

◆ myPaths

std::map<const PathElement*, std::vector<Segment*> > GNEPathManager::myPaths
protected

map with path element and their associated segments

Definition at line 387 of file GNEPathManager.h.

Referenced by buildPath(), calculateConsecutivePathLanes(), clearDemandPaths(), clearSegments(), getFirstLane(), getPathElement(), getPathElementSegments(), isPathValid(), and removePath().


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