![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEPathManager.h>
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 | |
void | calculateConsecutivePathLanes (PathElement *pathElement, const std::vector< GNELane * > lanes) |
calculate consecutive path lanes | |
void | calculatePathEdges (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges) |
calculate path edges (using dijkstra, require path calculator updated) | |
void | calculatePathJunctions (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEJunction * > junctions) |
calculate path junctions (using dijkstra, require path calculator updated) | |
void | calculatePathLanes (PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNELane * > lanes) |
calculate path lanes (using dijkstra, require path calculator updated) | |
void | clearDemandPaths () |
clear demand paths | |
void | drawJunctionPathElements (const GUIVisualizationSettings &s, const GNEJunction *junction) |
draw junction path elements | |
void | drawLanePathElements (const GUIVisualizationSettings &s, const GNELane *lane) |
draw lane path elements | |
void | forceDrawPath (const GUIVisualizationSettings &s, const PathElement *pathElement) const |
force draw path (used carefully, ONLY when we're inspecting a path element, due slowdowns) | |
const GNELane * | getFirstLane (const PathElement *pathElement) const |
get first lane associated with path element | |
PathCalculator * | getPathCalculator () |
obtain instance of PathCalculator | |
PathDraw * | getPathDraw () |
obtain instance of PathDraw | |
const PathElement * | getPathElement (const GUIGlObject *GLObject) const |
get path element | |
const std::vector< Segment * > & | getPathElementSegments (PathElement *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 PathElement *pathElement) const |
check if path element is valid | |
void | removePath (PathElement *pathElement) |
remove path | |
~GNEPathManager () | |
destructor | |
Protected Member Functions | |
void | addSegmentInJunctionSegments (Segment *segment, const GNEJunction *junction) |
add segments int junctionSegments (called by Segment constructor) | |
void | addSegmentInLaneSegments (Segment *segment, const GNELane *lane) |
add segments int laneSegments (called by Segment constructor) | |
void | clearSegmentFromJunctionAndLaneSegments (Segment *segment) |
clear segments from junction and lane Segments (called by Segment destructor) | |
void | clearSegments () |
clear segments | |
bool | connectedLanes (const GNELane *fromLane, const GNELane *toLane) const |
check if given lanes are connected | |
Protected Attributes | |
std::map< const GNEJunction *, std::set< Segment * > > | myJunctionSegments |
map with junction segments | |
std::map< const GNELane *, std::set< Segment * > > | myLaneSegments |
map with lane segments | |
PathCalculator * | myPathCalculator |
PathCalculator instance. | |
PathDraw * | myPathDraw |
PathDraw instance. | |
std::map< const PathElement *, std::vector< Segment * > > | myPaths |
map with path element and their associated segments | |
Private Member Functions | |
GNEPathManager (const GNEPathManager &)=delete | |
Invalidated copy constructor. | |
GNEPathManager & | operator= (const GNEPathManager &)=delete |
Invalidated assignment operator. | |
Private Attributes | |
const std::vector< Segment * > | myEmptySegments |
empty segments (used in getPathElementSegments) | |
Definition at line 41 of file GNEPathManager.h.
GNEPathManager::GNEPathManager | ( | const GNENet * | net | ) |
constructor
Definition at line 578 of file GNEPathManager.cpp.
GNEPathManager::~GNEPathManager | ( | ) |
destructor
Definition at line 584 of file GNEPathManager.cpp.
References clearSegments(), myPathCalculator, and myPathDraw.
|
privatedelete |
Invalidated copy constructor.
|
protected |
add segments int junctionSegments (called by Segment constructor)
Definition at line 975 of file GNEPathManager.cpp.
References myJunctionSegments.
Referenced by GNEPathManager::Segment::Segment().
add segments int laneSegments (called by Segment constructor)
Definition at line 969 of file GNEPathManager.cpp.
References myLaneSegments.
Referenced by GNEPathManager::Segment::Segment().
void GNEPathManager::calculateConsecutivePathEdges | ( | PathElement * | pathElement, |
SUMOVehicleClass | vClass, | ||
const std::vector< GNEEdge * > | edges | ||
) |
calculate consecutive path edges
Definition at line 760 of file GNEPathManager.cpp.
References calculateConsecutivePathLanes().
Referenced by GNEEdgeRelData::computePathElement(), GNERoute::computePathElement(), GNETranship::computePathElement(), GNEWalk::computePathElement(), and GNEEdgeData::updateGeometry().
void GNEPathManager::calculateConsecutivePathLanes | ( | PathElement * | pathElement, |
const std::vector< GNELane * > | lanes | ||
) |
calculate consecutive path lanes
Definition at line 775 of file GNEPathManager.cpp.
References myPaths.
Referenced by calculateConsecutivePathEdges(), GNELaneAreaDetector::computePathElement(), GNEOverheadWire::computePathElement(), and GNERoute::computePathElement().
void GNEPathManager::calculatePathEdges | ( | PathElement * | pathElement, |
SUMOVehicleClass | vClass, | ||
const std::vector< GNEEdge * > | edges | ||
) |
calculate path edges (using dijkstra, require path calculator updated)
Definition at line 662 of file GNEPathManager.cpp.
References GNEPathManager::PathCalculator::calculateDijkstraPath(), GNEPathManager::Segment::markSegmentLabel(), myPathCalculator, myPaths, GNEPathManager::Segment::setNextSegment(), and GNEPathManager::Segment::setPreviousSegment().
Referenced by calculatePathJunctions(), and calculatePathLanes().
void GNEPathManager::calculatePathJunctions | ( | PathElement * | pathElement, |
SUMOVehicleClass | vClass, | ||
const std::vector< GNEJunction * > | junctions | ||
) |
calculate path junctions (using dijkstra, require path calculator updated)
Definition at line 748 of file GNEPathManager.cpp.
References GNEPathManager::PathCalculator::calculateDijkstraPath(), calculatePathEdges(), and myPathCalculator.
Referenced by GNEPersonTrip::computePathElement(), GNEVehicle::computePathElement(), and GNEWalk::computePathElement().
void GNEPathManager::calculatePathLanes | ( | PathElement * | pathElement, |
SUMOVehicleClass | vClass, | ||
const std::vector< GNELane * > | lanes | ||
) |
calculate path lanes (using dijkstra, require path calculator updated)
Definition at line 733 of file GNEPathManager.cpp.
References calculatePathEdges().
Referenced by GNEPersonTrip::computePathElement(), GNERide::computePathElement(), GNETranship::computePathElement(), GNETransport::computePathElement(), GNEVehicle::computePathElement(), and GNEWalk::computePathElement().
void GNEPathManager::clearDemandPaths | ( | ) |
clear demand paths
Definition at line 949 of file GNEPathManager.cpp.
References myPaths.
Referenced by GNENet::computeDemandElements().
|
protected |
clear segments from junction and lane Segments (called by Segment destructor)
Definition at line 981 of file GNEPathManager.cpp.
References GNEPathManager::Segment::getJunction(), GNEPathManager::Segment::getLane(), myJunctionSegments, and myLaneSegments.
|
protected |
clear segments
Definition at line 1007 of file GNEPathManager.cpp.
References myPaths.
Referenced by ~GNEPathManager().
|
protected |
check if given lanes are connected
Definition at line 1021 of file GNEPathManager.cpp.
References NBEdge::getConnectionsFromLane(), GNELane::getIndex(), GNEEdge::getNBEdge(), and GNELane::getParentEdge().
void GNEPathManager::drawJunctionPathElements | ( | const GUIVisualizationSettings & | s, |
const GNEJunction * | junction | ||
) |
draw junction path elements
Definition at line 873 of file GNEPathManager.cpp.
References myJunctionSegments.
Referenced by GNEJunction::drawGL().
void GNEPathManager::drawLanePathElements | ( | const GUIVisualizationSettings & | s, |
const GNELane * | lane | ||
) |
draw lane path elements
Definition at line 839 of file GNEPathManager.cpp.
References GNELane::drawOverlappedRoutes(), GNEViewNet::getDemandViewOptions(), GNEAttributeCarrier::getNet(), GNENet::getViewNet(), myLaneSegments, and GNEViewNetHelper::DemandViewOptions::showOverlappedRoutes().
Referenced by GNELane::drawGL().
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 892 of file GNEPathManager.cpp.
References GNEPathManager::PathElement::drawPartialGL(), myJunctionSegments, and myLaneSegments.
Referenced by GNEViewNet::doPaintGL(), GNEViewNet::drawDeleteDottedContour(), GNEPersonTrip::drawGL(), GNERide::drawGL(), GNEWalk::drawGL(), and GNEViewNet::drawSelectDottedContour().
const GNELane * GNEPathManager::getFirstLane | ( | const PathElement * | pathElement | ) | const |
get first lane associated with path element
Definition at line 652 of file GNEPathManager.cpp.
References myPaths.
Referenced by GNEDemandElement::getBeginPosition().
GNEPathManager::PathCalculator * GNEPathManager::getPathCalculator | ( | ) |
obtain instance of PathCalculator
Definition at line 595 of file GNEPathManager.cpp.
References myPathCalculator.
Referenced by GNEDemandElement::buildMenuCommandRouteLength(), GNENet::computeDemandElements(), GNEVehicle::getDemandElementProblem(), GNEVehicle::isDemandElementValid(), GNEApplicationWindow::onCmdComputePathManager(), GNEViewNet::onCmdLaneReachability(), GNEApplicationWindow::onUpdComputePathManager(), GNEPathCreator::Path::Path(), GNEPathCreator::Path::Path(), GNEConnection::setAttribute(), GNECrossing::setAttribute(), GNEEdge::setAttribute(), GNEJunction::setAttribute(), GNELane::setAttribute(), GNEPathCreator::setPossibleCandidates(), GNEPathCreator::setSpecialCandidates(), GNERouteHandler::transformToRouteFlow(), and GNERouteHandler::transformToVehicle().
GNEPathManager::PathDraw * GNEPathManager::getPathDraw | ( | ) |
obtain instance of PathDraw
Definition at line 629 of file GNEPathManager.cpp.
References myPathDraw.
Referenced by GNEViewNet::doPaintGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), and GNEDemandElement::drawPersonPlanPartial().
const GNEPathManager::PathElement * GNEPathManager::getPathElement | ( | const GUIGlObject * | GLObject | ) | const |
get path element
Definition at line 601 of file GNEPathManager.cpp.
References myPaths.
Referenced by GNEViewNet::drawDeleteDottedContour(), and GNEViewNet::drawSelectDottedContour().
const std::vector< GNEPathManager::Segment * > & GNEPathManager::getPathElementSegments | ( | GNEPathManager::PathElement * | pathElement | ) | const |
get path segments
Definition at line 619 of file GNEPathManager.cpp.
References myEmptySegments, and myPaths.
Referenced by GNEDemandElement::getEdgeStopIndex().
void GNEPathManager::invalidateJunctionPath | ( | const GNEJunction * | junction | ) |
invalidate junction path
Definition at line 931 of file GNEPathManager.cpp.
References myJunctionSegments.
Referenced by GNENet::deleteJunction().
void GNEPathManager::invalidateLanePath | ( | const GNELane * | lane | ) |
invalidate lane path
Definition at line 913 of file GNEPathManager.cpp.
References myLaneSegments.
Referenced by GNENet::deleteEdge(), and GNENet::deleteLane().
bool GNEPathManager::isPathValid | ( | const PathElement * | pathElement | ) | const |
check if path element is valid
Definition at line 635 of file GNEPathManager.cpp.
References myPaths.
Referenced by GNERide::computePathElement(), GNERoute::computePathElement(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), and GNEVehicle::isDemandElementValid().
|
privatedelete |
Invalidated assignment operator.
void GNEPathManager::removePath | ( | PathElement * | pathElement | ) |
remove path
Definition at line 825 of file GNEPathManager.cpp.
References myPaths.
Referenced by GNEDataInterval::removeGenericDataChild().
|
private |
empty segments (used in getPathElementSegments)
Definition at line 402 of file GNEPathManager.h.
Referenced by getPathElementSegments().
|
protected |
map with junction segments
Definition at line 398 of file GNEPathManager.h.
Referenced by addSegmentInJunctionSegments(), clearSegmentFromJunctionAndLaneSegments(), drawJunctionPathElements(), forceDrawPath(), and invalidateJunctionPath().
map with lane segments
Definition at line 395 of file GNEPathManager.h.
Referenced by addSegmentInLaneSegments(), clearSegmentFromJunctionAndLaneSegments(), drawLanePathElements(), forceDrawPath(), and invalidateLanePath().
|
protected |
PathCalculator instance.
Definition at line 386 of file GNEPathManager.h.
Referenced by calculatePathEdges(), calculatePathJunctions(), getPathCalculator(), and ~GNEPathManager().
|
protected |
PathDraw instance.
Definition at line 389 of file GNEPathManager.h.
Referenced by getPathDraw(), and ~GNEPathManager().
|
protected |
map with path element and their associated segments
Definition at line 392 of file GNEPathManager.h.
Referenced by calculateConsecutivePathLanes(), calculatePathEdges(), clearDemandPaths(), clearSegments(), getFirstLane(), getPathElement(), getPathElementSegments(), isPathValid(), and removePath().