53 const bool firstSegment,
const bool lastSegment);
392 std::map<const PathElement*, std::vector<Segment*> >
myPaths;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
SumoXMLTag
Numbers representing SUMO-XML - element names.
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
A NBNetBuilder extended by visualisation and editing capabilities.
class used to calculate paths in nets
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 updatePathCalculator()
update path calculator (called when SuperModes Demand or Data is selected)
bool isPathCalculatorUpdated() const
check if pathCalculator is updated
SUMOAbstractRouter< NBRouterEdge, NBVehicle > * myDijkstraRouter
SUMO Abstract myDijkstraRouter.
void invalidatePathCalculator()
invalidate pathCalculator
void calculateReachability(const SUMOVehicleClass vClass, GNEEdge *originEdge)
calculate reachability for given edge
std::vector< GNEEdge * > optimizeJunctionPath(const std::vector< GNEEdge * > &edges) const
optimize junction path
bool myPathCalculatorUpdated
flag for checking if path calculator is updated
~PathCalculator()
destructor
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 pedest...
std::vector< GNEEdge * > calculateDijkstraPath(const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra path between a list of partial edges
const GNENet * myNet
pointer to net
class used to mark path draw
bool drawPathGeometry(const bool dottedElement, const GNELane *lane, SumoXMLTag tag)
check if path element geometry must be drawn in the given lane
std::map< const std::pair< const GNELane *, const GNELane * >, std::set< SumoXMLTag > > myLane2laneDrawedElements
map for saving tags drawn in junctions
void clearPathDraw()
clear path draw
std::map< const GNELane *, std::set< SumoXMLTag > > myLaneDrawedElements
map for saving tags drawn in lanes
class used for path elements
PathElement(const PathElement &)=delete
Invalidated copy constructor.
bool isDataElement() const
check if pathElement is a data element
const int myOption
pathElement option
virtual GNELane * getLastPathLane() const =0
get last path lane
bool isDemandElement() const
check if pathElement is a demand element
virtual void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment, const double offsetFront) const =0
Draws partial object (lane)
virtual double getPathElementArrivalValue() const =0
get path element arrival lane pos
bool isNetworkElement() const
check if pathElement is a network element
virtual void computePathElement()=0
compute pathElement
virtual ~PathElement()
destructor
virtual double getPathElementDepartValue() const =0
get path element depart lane pos
virtual Position getPathElementDepartPos() const =0
get path element depart position
virtual bool isPathElementSelected() const =0
check if path element is selectd
bool isAdditionalElement() const
check if pathElement is an additional element
virtual Position getPathElementArrivalPos() const =0
get path element arrival position
bool isRoute() const
check if pathElement is a route
PathElement()=delete
invalidate default constructor
virtual void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *fromLane, const GNELane *toLane, const GNEPathManager::Segment *segment, const double offsetFront) const =0
Draws partial object (junction)
PathElement & operator=(const PathElement &)=delete
Invalidated assignment operator.
virtual GNELane * getFirstPathLane() const =0
get first path lane
const GNELane * getPreviousLane() const
get previous lane
const GNELane * myNextLane
next lane
Segment & operator=(const Segment &)=delete
Invalidated assignment operator.
Segment * myNextSegment
pointer to next segment (use for draw red line)
PathElement * getPathElement() const
get path element
Segment * getPreviousSegment() const
get previous segment
void setNextSegment(Segment *nexSegment)
set next segment
void setPreviousSegment(Segment *nexSegment)
set previous segment
const GNELane * myLane
lane associated with this segment
const bool myLastSegment
lastSegment
GNEPathManager * myPathManager
path manager
const GNEJunction * getJunction() const
get junction associated with this segment
const GNELane * getNextLane() const
get next lane
PathElement * myPathElement
path element
Segment * myPreviousSegment
pointer to previous segment (use for draw red line)
bool isLabelSegment() const
check if segment is label segment
Segment(const Segment &)=delete
Invalidated copy constructor.
void markSegmentLabel()
mark segment as middle segment
Segment()
default constructor
bool myLabelSegment
flag for check if this segment is a label segment
Segment * getNextSegment() const
get next segment
const GNELane * getLane() const
get lane associated with this segment
const GNEJunction * myJunction
junction associated with this segment
bool isLastSegment() const
check if segment is the last path's segment
bool isFirstSegment() const
check if segment is the first path's segment
const GNELane * myPreviousLane
previous lane
const bool myFirstSegment
first segment
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
const std::vector< Segment * > & getPathElementSegments(PathElement *pathElement) const
get path segments
const std::vector< Segment * > myEmptySegments
empty segments (used in getPathElementSegments)
void addSegmentInJunctionSegments(Segment *segment, const GNEJunction *junction)
add segments int junctionSegments (called by Segment constructor)
std::map< const GNEJunction *, std::set< Segment * > > myJunctionSegments
map with junction segments
void invalidateJunctionPath(const GNEJunction *junction)
invalidate junction path
const PathElement * getPathElement(const GUIGlObject *GLObject) const
get path element
PathDraw * getPathDraw()
obtain instance of PathDraw
GNEPathManager & operator=(const GNEPathManager &)=delete
Invalidated assignment operator.
void clearSegments()
clear segments
PathCalculator * myPathCalculator
PathCalculator instance.
void invalidateLanePath(const GNELane *lane)
invalidate lane path
void clearDemandPaths()
clear demand paths
void calculateConsecutivePathEdges(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
calculate consecutive path edges
void addSegmentInLaneSegments(Segment *segment, const GNELane *lane)
add segments int laneSegments (called by Segment constructor)
bool connectedLanes(const GNELane *fromLane, const GNELane *toLane) const
check if given lanes are connected
void calculatePathJunctions(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEJunction * > junctions)
calculate path junctions (using dijkstra, require path calculator updated)
std::map< const PathElement *, std::vector< Segment * > > myPaths
map with path element and their associated segments
void drawLanePathElements(const GUIVisualizationSettings &s, const GNELane *lane)
draw lane path elements
void removePath(PathElement *pathElement)
remove path
GNEPathManager(const GNEPathManager &)=delete
Invalidated copy constructor.
std::map< const GNELane *, std::set< Segment * > > myLaneSegments
map with lane segments
void clearSegmentFromJunctionAndLaneSegments(Segment *segment)
clear segments from junction and lane Segments (called by Segment destructor)
PathDraw * myPathDraw
PathDraw instance.
void calculatePathEdges(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
calculate path edges (using dijkstra, require path calculator updated)
void drawJunctionPathElements(const GUIVisualizationSettings &s, const GNEJunction *junction)
draw junction 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)
~GNEPathManager()
destructor
const GNELane * getFirstLane(const PathElement *pathElement) const
get first lane associated with path element
void calculatePathLanes(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNELane * > lanes)
calculate path lanes (using dijkstra, require path calculator updated)
bool isPathValid(const PathElement *pathElement) const
check if path element is valid
void calculateConsecutivePathLanes(PathElement *pathElement, const std::vector< GNELane * > lanes)
calculate consecutive path lanes
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.