Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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...

Public Member Functions

void calculateConsecutivePathEdges (GNEPathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > &edges, const int firstLaneIndex=-1, const int lastLaneIndex=-1)
 calculate consecutive path edges
void calculateConsecutivePathLanes (GNEPathElement *pathElement, const std::vector< GNELane * > &lanes)
 calculate consecutive path lanes
void calculatePath (GNEPathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > &edges)
 calculate path lanes between list of edges (using dijkstra, require path calculator updated)
void calculatePath (GNEPathElement *pathElement, SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEJunction *toJunction)
 calculate path between from junction and to junction (using dijkstra, require path calculator updated)
void calculatePath (GNEPathElement *pathElement, SUMOVehicleClass vClass, GNEJunction *fromJunction, GNELane *toLane)
 calculate path between from junction and to edge (using dijkstra, require path calculator updated)
void calculatePath (GNEPathElement *pathElement, SUMOVehicleClass vClass, GNELane *fromLane, GNEJunction *toJunction)
 calculate path between from edge and to junction(using dijkstra, require path calculator updated)
void calculatePath (GNEPathElement *pathElement, SUMOVehicleClass vClass, GNELane *fromLane, GNELane *toLane)
 calculate path between from-to edges (using dijkstra, require path calculator updated)
void clearSegments ()
 clear segments
void drawJunctionPathElements (const GUIVisualizationSettings &s, const GNEJunction *junction) const
 draw junction path elements
void drawLanePathElements (const GUIVisualizationSettings &s, const GNELane *lane) const
 draw lane path elements
const GNELanegetFirstLane (const GNEPathElement *pathElement) const
 get first lane associated with path element
PathCalculatorgetPathCalculator ()
 obtain instance of PathCalculator
PathDrawgetPathDraw ()
 obtain instance of PathDraw
const GNEPathElementgetPathElement (const GUIGlObject *GLObject) const
 get path element
const std::vector< GNESegment * > & getPathElementSegments (GNEPathElement *pathElement) const
 get path segments
 GNEPathManager (const GNENet *net)
 constructor
void invalidateJunctionPath (const GNEJunction *junction)
 invalidate junction path
void invalidateLanePath (const GNELane *lane)
 invalidate lane path
bool isPathValid (const GNEPathElement *pathElement) const
 check if path element is valid
void redrawPathElements (const GUIVisualizationSettings &s) const
 redraw path elements saved in gViewObjectsHandler buffer
void removePath (GNEPathElement *pathElement)
 remove path
 ~GNEPathManager ()
 destructor

Protected Member Functions

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

Protected Attributes

bool myCleaningSegments = false
 flag for clear segments quickly
std::map< const GNEJunction *, std::set< GNESegment * > > myJunctionSegments
 map with junction segments
std::map< const GNELane *, std::set< GNESegment * > > myLaneSegments
 map with lane segments
PathCalculatormyPathCalculator
 PathCalculator instance.
PathDrawmyPathDraw
 PathDraw instance.
std::map< const GNEPathElement *, std::vector< GNESegment * > > myPaths
 map with path element and their associated segments

Private Member Functions

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

Private Attributes

const std::vector< GNESegment * > myEmptySegments
 empty segments (used in getPathElementSegments)

Friends

class GNESegment
 friend class declaration

Detailed Description

Definition at line 48 of file GNEPathManager.h.

Constructor & Destructor Documentation

◆ GNEPathManager() [1/2]

GNEPathManager::GNEPathManager ( const GNENet * net)

constructor

Definition at line 430 of file GNEPathManager.cpp.

References myPathCalculator, and myPathDraw.

Referenced by GNEPathManager(), and operator=().

Here is the caller graph for this function:

◆ ~GNEPathManager()

GNEPathManager::~GNEPathManager ( )

destructor

Definition at line 436 of file GNEPathManager.cpp.

References clearSegments(), myPathCalculator, and myPathDraw.

◆ GNEPathManager() [2/2]

GNEPathManager::GNEPathManager ( const GNEPathManager & )
privatedelete

Invalidated copy constructor.

References GNEPathManager().

Member Function Documentation

◆ addSegmentInJunctionSegments()

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

add segments int junctionSegments (called by GNESegment constructor)

Definition at line 771 of file GNEPathManager.cpp.

References GNESegment, and myJunctionSegments.

◆ addSegmentInLaneSegments()

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

add segments int laneSegments (called by GNESegment constructor)

Definition at line 765 of file GNEPathManager.cpp.

References GNESegment, and myLaneSegments.

◆ buildPath()

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

build path

Definition at line 815 of file GNEPathManager.cpp.

References GNESegment, markLabelSegment(), GNESegment::markSegmentLabel(), myPaths, and removePath().

Referenced by calculatePath(), calculatePath(), calculatePath(), calculatePath(), and calculatePath().

Here is the caller graph for this function:

◆ calculateConsecutivePathEdges()

void GNEPathManager::calculateConsecutivePathEdges ( GNEPathElement * pathElement,
SUMOVehicleClass vClass,
const std::vector< GNEEdge * > & edges,
const int firstLaneIndex = -1,
const int lastLaneIndex = -1 )

calculate consecutive path edges

Definition at line 560 of file GNEPathManager.cpp.

References calculateConsecutivePathLanes().

◆ calculateConsecutivePathLanes()

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

calculate consecutive path lanes

Definition at line 592 of file GNEPathManager.cpp.

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

Referenced by calculateConsecutivePathEdges().

Here is the caller graph for this function:

◆ calculatePath() [1/5]

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

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

Definition at line 548 of file GNEPathManager.cpp.

References buildPath(), myPathCalculator, and removePath().

◆ calculatePath() [2/5]

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

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

Definition at line 541 of file GNEPathManager.cpp.

References buildPath(), and myPathCalculator.

◆ calculatePath() [3/5]

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

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

Definition at line 533 of file GNEPathManager.cpp.

References buildPath(), GNELane::getParentEdge(), and myPathCalculator.

◆ calculatePath() [4/5]

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

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

Definition at line 525 of file GNEPathManager.cpp.

References buildPath(), GNELane::getParentEdge(), and myPathCalculator.

◆ calculatePath() [5/5]

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

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

Definition at line 517 of file GNEPathManager.cpp.

References buildPath(), GNELane::getParentEdge(), and myPathCalculator.

◆ clearSegmentFromJunctionAndLaneSegments()

void GNEPathManager::clearSegmentFromJunctionAndLaneSegments ( GNESegment * segment)
protected

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

Definition at line 777 of file GNEPathManager.cpp.

References GNESegment::getJunction(), GNESegment::getLane(), GNESegment, myJunctionSegments, and myLaneSegments.

◆ clearSegments()

void GNEPathManager::clearSegments ( )

clear segments

Definition at line 745 of file GNEPathManager.cpp.

References myCleaningSegments, myJunctionSegments, myLaneSegments, and 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 799 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 669 of file GNEPathManager.cpp.

References gViewObjectsHandler, and myJunctionSegments.

◆ drawLanePathElements()

◆ getFirstLane()

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

get first lane associated with path element

Definition at line 506 of file GNEPathManager.cpp.

References myPaths.

◆ getPathCalculator()

GNEPathManager::PathCalculator * GNEPathManager::getPathCalculator ( )

obtain instance of PathCalculator

Definition at line 447 of file GNEPathManager.cpp.

References myPathCalculator.

Referenced by GNERouteHandler::canReverse(), GNERouteHandler::canReverse(), GNEPathCreator::Path::Path(), GNEPathCreator::Path::Path(), GNEPlanCreator::PlanPath::PlanPath(), GNEPlanCreator::PlanPath::PlanPath(), GNEPlanCreator::PlanPath::PlanPath(), GNERouteHandler::transformToRouteFlow(), and GNERouteHandler::transformToVehicle().

Here is the caller graph for this function:

◆ getPathDraw()

GNEPathManager::PathDraw * GNEPathManager::getPathDraw ( )

obtain instance of PathDraw

Definition at line 481 of file GNEPathManager.cpp.

References myPathDraw.

◆ getPathElement()

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

get path element

Definition at line 453 of file GNEPathManager.cpp.

References myPaths.

◆ getPathElementSegments()

const std::vector< GNESegment * > & GNEPathManager::getPathElementSegments ( GNEPathElement * pathElement) const

get path segments

Definition at line 471 of file GNEPathManager.cpp.

References myEmptySegments, and myPaths.

◆ invalidateJunctionPath()

void GNEPathManager::invalidateJunctionPath ( const GNEJunction * junction)

invalidate junction path

Definition at line 727 of file GNEPathManager.cpp.

References myJunctionSegments.

◆ invalidateLanePath()

void GNEPathManager::invalidateLanePath ( const GNELane * lane)

invalidate lane path

Definition at line 709 of file GNEPathManager.cpp.

References myLaneSegments.

◆ isPathValid()

bool GNEPathManager::isPathValid ( const GNEPathElement * pathElement) const

check if path element is valid

Definition at line 487 of file GNEPathManager.cpp.

References myPaths.

◆ markLabelSegment()

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

mark label segment

Definition at line 894 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.

References GNEPathManager().

◆ redrawPathElements()

void GNEPathManager::redrawPathElements ( const GUIVisualizationSettings & s) const

redraw path elements saved in gViewObjectsHandler buffer

Definition at line 689 of file GNEPathManager.cpp.

References gViewObjectsHandler, and myPaths.

◆ removePath()

void GNEPathManager::removePath ( GNEPathElement * pathElement)

remove path

Definition at line 622 of file GNEPathManager.cpp.

References myPaths.

Referenced by buildPath(), calculateConsecutivePathLanes(), and calculatePath().

Here is the caller graph for this function:

◆ GNESegment

Field Documentation

◆ myCleaningSegments

bool GNEPathManager::myCleaningSegments = false
protected

flag for clear segments quickly

Definition at line 241 of file GNEPathManager.h.

Referenced by clearSegments().

◆ myEmptySegments

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

empty segments (used in getPathElementSegments)

Definition at line 248 of file GNEPathManager.h.

Referenced by getPathElementSegments().

◆ myJunctionSegments

std::map<const GNEJunction*, std::set<GNESegment*> > GNEPathManager::myJunctionSegments
protected

◆ myLaneSegments

std::map<const GNELane*, std::set<GNESegment*> > GNEPathManager::myLaneSegments
protected

◆ myPathCalculator

PathCalculator* GNEPathManager::myPathCalculator
protected

◆ myPathDraw

PathDraw* GNEPathManager::myPathDraw
protected

PathDraw instance.

Definition at line 229 of file GNEPathManager.h.

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

◆ myPaths

std::map<const GNEPathElement*, std::vector<GNESegment*> > GNEPathManager::myPaths
protected

map with path element and their associated segments

Definition at line 232 of file GNEPathManager.h.

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


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