Eclipse SUMO - Simulation of Urban MObility
NBNode.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // The representation of a single node
18 /****************************************************************************/
19 #ifndef NBNode_h
20 #define NBNode_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
29 #include <deque>
30 #include <utility>
31 #include <string>
32 #include <set>
33 #include <utils/common/StdDefs.h>
34 #include <utils/common/Named.h>
35 #include <utils/geom/Bresenham.h>
36 #include <utils/geom/GeomHelper.h>
38 #include <utils/geom/Position.h>
41 #include "NBEdge.h"
42 #include "NBConnection.h"
43 #include "NBConnectionDefs.h"
44 #include "NBContHelper.h"
45 
46 
47 // ===========================================================================
48 // class declarations
49 // ===========================================================================
50 class NBRequest;
51 class NBDistrict;
52 class OptionsCont;
54 class NBTypeCont;
56 class NBDistrictCont;
57 class OutputDevice;
58 
59 
60 // ===========================================================================
61 // class definitions
62 // ===========================================================================
67 class NBNode : public Named, public Parameterised {
68  friend class NBNodeCont;
69  friend class GNEJunction; // < used for visualization (NETEDIT)
70  friend class NBNodesEdgesSorter; // < sorts the edges
71  friend class NBNodeTypeComputer; // < computes type
72  friend class NBEdgePriorityComputer; // < computes priorities of edges per intersection
73  friend class NBNodeShapeComputer; // < computes node's shape
74 
75 public:
88  public:
93  ApproachingDivider(const EdgeVector& approaching, NBEdge* currentOutgoing);
94 
97 
99  int numAvailableLanes() const {
100  return (int)myAvailableLanes.size();
101  }
102 
104  void execute(const int src, const int dest);
105 
107  std::deque<int>* spread(const std::vector<int>& approachingLanes, int dest) const;
108 
109  private:
112 
115 
117  std::vector<int> myAvailableLanes;
118 
121 
122  private:
125 
126  };
127 
131  struct Crossing : public Parameterised {
133  Crossing(const NBNode* _node, const EdgeVector& _edges, double _width, bool _priority, int _customTLIndex, int _customTLIndex2, const PositionVector& _customShape);
135  const NBNode* node;
141  double customWidth;
143  double width;
145  std::string id;
147  std::string prevWalkingArea;
149  std::string nextWalkingArea;
151  bool priority;
161  std::string tlID;
163  bool valid;
164  };
165 
166 
170  struct WalkingArea {
172  WalkingArea(const std::string& _id, double _width) :
173  id(_id),
174  width(_width) {
175  }
177  std::string id;
179  double width;
185  std::vector<std::string> nextCrossings;
187  std::vector<std::string> nextSidewalks;
189  std::vector<std::string> prevSidewalks;
191  bool hasCustomShape = false;
193  int minNextCrossingEdges = std::numeric_limits<int>::max();
195  int minPrevCrossingEdges = std::numeric_limits<int>::max();
196  };
197 
199  std::set<const NBEdge*, ComparatorIdLess> edges;
201  };
202 
204  static const int FORWARD;
205  static const int BACKWARD;
206 
208  static const double UNSPECIFIED_RADIUS;
209 
211  static const int AVOID_WIDE_RIGHT_TURN;
212  static const int AVOID_WIDE_LEFT_TURN;
213  static const int FOUR_CONTROL_POINTS;
215  static const int SCURVE_IGNORE;
216 
217 public:
223  NBNode(const std::string& id, const Position& position, SumoXMLNodeType type);
224 
230  NBNode(const std::string& id, const Position& position, NBDistrict* district = 0);
231 
233  ~NBNode();
234 
241  void reinit(const Position& position, SumoXMLNodeType type,
242  bool updateEdgeGeometries = false);
243 
247  const Position& getPosition() const {
248  return myPosition;
249  }
250 
252  Position getCenter() const;
253 
255  const EdgeVector& getIncomingEdges() const {
256  return myIncomingEdges;
257  }
258 
260  const EdgeVector& getOutgoingEdges() const {
261  return myOutgoingEdges;
262  }
263 
265  const EdgeVector& getEdges() const {
266  return myAllEdges;
267  }
268 
273  return myType;
274  }
275 
277  double getRadius() const {
278  return myRadius;
279  }
280 
282  bool getKeepClear() const {
283  return myKeepClear;
284  }
285 
288  return myRightOfWay;
289  }
290 
293  return myFringeType;
294  }
296 
299 
303 
306 
308  void removeTrafficLights();
309 
313  bool isTLControlled() const {
314  return myTrafficLights.size() != 0;
315  }
316 
318  const std::set<NBTrafficLightDefinition*>& getControllingTLS() const {
319  return myTrafficLights;
320  }
321 
323  void invalidateTLS(NBTrafficLightLogicCont& tlCont, bool removedConnections, bool addedConnections);
324 
326  void shiftTLConnectionLaneIndex(NBEdge* edge, int offset, int threshold = -1);
328 
329 
332 
344 
345 
348 
352  void reshiftPosition(double xoff, double yoff);
353 
355  void mirrorX();
357 
359  void addIncomingEdge(NBEdge* edge);
360 
362  void addOutgoingEdge(NBEdge* edge);
363 
365  void computeLanes2Lanes();
366 
368  void computeLogic(const NBEdgeCont& ec);
369 
371  void computeLogic2(bool checkLaneFoes);
372 
374  bool writeLogic(OutputDevice& into) const;
375 
376  const std::string getFoes(int linkIndex) const;
377  const std::string getResponse(int linkIndex) const;
378 
380  Position getEmptyDir() const;
381 
386  bool hasIncoming(const NBEdge* const e) const;
387 
392  bool hasOutgoing(const NBEdge* const e) const;
393 
395  NBEdge* getOppositeIncoming(NBEdge* e) const;
396 
399 
402 
404  void removeDoubleEdges();
405 
407  NBEdge* getConnectionTo(NBNode* n) const;
408 
410  void addSortedLinkFoes(const NBConnection& mayDrive, const NBConnection& mustStop);
411 
413  NBEdge* getPossiblySplittedIncoming(const std::string& edgeid);
414 
416  NBEdge* getPossiblySplittedOutgoing(const std::string& edgeid);
417 
419  void removeEdge(NBEdge* edge, bool removeFromConnections = true);
420 
430  bool isLeftMover(const NBEdge* const from, const NBEdge* const to) const;
431 
440  bool mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, int toLane, bool includePedCrossings) const;
441 
448  bool mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const Crossing& crossing) const;
449 
451  static bool rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane,
452  const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane,
453  bool lefthand = false);
454 
456  bool turnFoes(const NBEdge* from, const NBEdge* to, int fromLane,
457  const NBEdge* from2, const NBEdge* to2, int fromLane2,
458  bool lefthand = false) const;
459 
468  bool forbids(const NBEdge* const possProhibitorFrom, const NBEdge* const possProhibitorTo,
469  const NBEdge* const possProhibitedFrom, const NBEdge* const possProhibitedTo,
470  bool regardNonSignalisedLowerPriority) const;
471 
479  bool foes(const NBEdge* const from1, const NBEdge* const to1,
480  const NBEdge* const from2, const NBEdge* const to2) const;
481 
488  LinkDirection getDirection(const NBEdge* const incoming, const NBEdge* const outgoing, bool leftHand = false) const;
489 
491  LinkState getLinkState(const NBEdge* incoming, NBEdge* outgoing,
492  int fromLane, int toLane, bool mayDefinitelyPass, const std::string& tlID) const;
493 
497  void computeNodeShape(double mismatchThreshold);
498 
500  const PositionVector& getShape() const;
501 
503  void setCustomShape(const PositionVector& shape);
504 
506  void setRadius(double radius) {
507  myRadius = radius;
508  }
509 
511  void setKeepClear(bool keepClear) {
512  myKeepClear = keepClear;
513  }
514 
516  void setRightOfWay(RightOfWay rightOfWay) {
517  myRightOfWay = rightOfWay;
518  }
519 
521  void setFringeType(FringeType fringeType) {
522  myFringeType = fringeType;
523  }
524 
526  bool hasCustomShape() const {
527  return myHaveCustomPoly;
528  }
529 
531  bool checkIsRemovable() const;
532 
534  bool checkIsRemovableReporting(std::string& reason) const;
535 
537  std::vector<std::pair<NBEdge*, NBEdge*> > getEdgesToJoin() const;
538 
540  bool isNearDistrict() const;
541 
543  bool isDistrict() const;
544 
546  bool needsCont(const NBEdge* fromE, const NBEdge* otherFromE,
547  const NBEdge::Connection& c, const NBEdge::Connection& otherC) const;
548 
550  bool tlsContConflict(const NBEdge* from, const NBEdge::Connection& c,
551  const NBEdge* foeFrom, const NBEdge::Connection& foe) const;
552 
553 
561  PositionVector computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError = 0, int shapeFlag = 0) const;
562 
573  PositionVector computeSmoothShape(const PositionVector& begShape, const PositionVector& endShape, int numPoints,
574  bool isTurnaround, double extrapolateBeg, double extrapolateEnd,
575  NBNode* recordError = 0, int shapeFlag = 0) const;
577  static PositionVector bezierControlPoints(const PositionVector& begShape, const PositionVector& endShape,
578  bool isTurnaround, double extrapolateBeg, double extrapolateEnd,
579  bool& ok, NBNode* recordError = 0, double straightThresh = DEG2RAD(5),
580  int shapeFlag = 0);
581 
582 
584  double getDisplacementError() const {
585  return myDisplacementError;
586  }
587 
589  void replaceIncoming(NBEdge* which, NBEdge* by, int laneOff);
590 
592  void replaceIncoming(const EdgeVector& which, NBEdge* by);
593 
595  void replaceOutgoing(NBEdge* which, NBEdge* by, int laneOff);
596 
598  void replaceOutgoing(const EdgeVector& which, NBEdge* by);
599 
601  int guessCrossings();
602 
603  /* @brief check whether a crossing should be build for the candiate edges and build 0 to n crossings
604  * @param[in] candidates The candidate vector of edges to be crossed
605  * @return The number of crossings built
606  * */
607  int checkCrossing(EdgeVector candidates);
608 
611 
613  void buildInnerEdges();
614 
618  int buildCrossings();
619 
623  void buildWalkingAreas(int cornerDetail);
624 
627 
629  EdgeVector edgesBetween(const NBEdge* e1, const NBEdge* e2) const;
630 
632  bool crossingBetween(const NBEdge* e1, const NBEdge* e2) const;
633 
636  return myBlockedConnections;
637  }
638 
640  bool geometryLike() const;
641  bool geometryLike(const EdgeVector& incoming, const EdgeVector& outgoing) const;
642 
644  void setRoundabout();
645 
647  NBNode::Crossing* addCrossing(EdgeVector edges, double width, bool priority, int tlIndex = -1, int tlIndex2 = -1,
648  const PositionVector& customShape = PositionVector::EMPTY, bool fromSumoNet = false);
649 
651  void addWalkingAreaShape(EdgeVector edges, const PositionVector& shape);
652 
654  void removeCrossing(const EdgeVector& edges);
655 
657  void discardAllCrossings(bool rejectAll);
658 
660  void discardWalkingareas();
661 
665  }
666 
668  std::vector<Crossing*> getCrossings() const;
669  inline const std::vector<Crossing*>& getCrossingsIncludingInvalid() const {
670  return myCrossings;
671  }
672 
674  inline const std::vector<WalkingArea>& getWalkingAreas() const {
675  return myWalkingAreas;
676  }
677 
678  const std::vector<WalkingAreaCustomShape>& getWalkingAreaCustomShapes() const {
680  }
681 
683  Crossing* getCrossing(const std::string& id) const;
684 
686  Crossing* getCrossing(const EdgeVector& edges, bool hardFail = true) const;
687 
688  /* @brief set tl indices of this nodes crossing starting at the given index
689  * @return Whether a custom index was used
690  */
691  bool setCrossingTLIndices(const std::string& tlID, int startIndex);
692 
694  int numNormalConnections() const;
695 
697  void avoidOverlap();
698 
700  bool rightOnRedConflict(int index, int foeIndex) const;
701 
703  void sortEdges(bool useNodeShape);
704 
706  int getConnectionIndex(const NBEdge* from, const NBEdge::Connection& con) const;
707 
713  public:
715  explicit nodes_by_id_sorter() { }
716 
718  int operator()(NBNode* n1, NBNode* n2) const {
719  return n1->getID() < n2->getID();
720  }
721  };
722 
727  public:
730 
732  int operator()(NBEdge* e1, NBEdge* e2) const {
733  UNUSED_PARAMETER(e2);
734  return e1->getFromNode() == myNode;
735  }
736 
737  private:
740 
741  };
742 
744  static std::string getNodeIDFromInternalLane(const std::string id);
745 
746 
748  static bool isTrafficLight(SumoXMLNodeType type);
749 
751  bool isSimpleContinuation(bool checkLaneNumbers = true, bool checkWidth = false) const;
752 
754  void markBentPriority(bool isBent) {
755  myIsBentPriority = isBent;
756  }
757 
759  bool isBentPriority() const {
760  return myIsBentPriority;
761  }
762 
764  bool typeWasGuessed() const {
765  return myTypeWasGuessed;
766  }
767 
769  bool isConstantWidthTransition() const;
770 
772  std::vector<std::pair<Position, std::string> > getEndPoints() const;
773 
774 private:
777 
779  void getEdgesThatApproach(NBEdge* currentOutgoing, EdgeVector& approaching);
780 
782  void replaceInConnectionProhibitions(NBEdge* which, NBEdge* by, int whichLaneOff, int byLaneOff);
783 
785  void remapRemoved(NBTrafficLightLogicCont& tc, NBEdge* removed, const EdgeVector& incoming, const EdgeVector& outgoing);
786 
788  bool forbidsPedestriansAfter(std::vector<std::pair<NBEdge*, bool> > normalizedLanes, int startIndex);
789 
792 
794  static bool isLongEnough(NBEdge* out, double minLength);
795 
798 
800  void displaceShapeAtWidthChange(const NBEdge* from, const NBEdge::Connection& con, PositionVector& fromShape, PositionVector& toShape) const;
801 
803  static bool includes(const std::set<NBEdge*, ComparatorIdLess>& super,
804  const std::set<const NBEdge*, ComparatorIdLess>& sub);
805 
806  NBEdge* getNextCompatibleOutgoing(const NBEdge* incoming, SVCPermissions vehPerm, EdgeVector::const_iterator start, bool clockwise) const;
807 
808 private:
811 
814 
817 
820 
822  std::vector<Crossing*> myCrossings;
823 
825  std::vector<WalkingArea> myWalkingAreas;
826 
828  std::vector<WalkingAreaCustomShape> myWalkingAreaCustomShapes;
829 
832 
835 
838 
841 
844 
847 
849  std::set<NBTrafficLightDefinition*> myTrafficLights;
850 
852  double myRadius;
853 
856 
859 
862 
865 
868 
871 
872  /* @brief whether this junction is a bent priority junction (main direction turns)
873  * @note see NBEdgePriorityComputer
874  */
876 
879 
880 
881 private:
883  NBNode(const NBNode& s);
884 
886  NBNode& operator=(const NBNode& s);
887 };
888 
889 
890 #endif
891 
892 /****************************************************************************/
893 
NBNode::edge_by_direction_sorter::edge_by_direction_sorter
edge_by_direction_sorter(NBNode *n)
constructor
Definition: NBNode.h:729
NBNode::ApproachingDivider::~ApproachingDivider
~ApproachingDivider()
Destructor.
Definition: NBNode.cpp:128
NBNode::getResponse
const std::string getResponse(int linkIndex) const
Definition: NBNode.cpp:978
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:31
NBNode::FORWARD
static const int FORWARD
edge directions (for pedestrian related stuff)
Definition: NBNode.h:204
NBNode::WalkingArea::minPrevCrossingEdges
int minPrevCrossingEdges
minimum number of edges crossed by incoming crossings
Definition: NBNode.h:195
NBNode::hasOutgoing
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
Definition: NBNode.cpp:1537
NBNode::getEdgesThatApproach
void getEdgesThatApproach(NBEdge *currentOutgoing, EdgeVector &approaching)
returns a list of edges which are connected to the given outgoing edge
Definition: NBNode.cpp:1367
NBNode::foes
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
Definition: NBNode.cpp:1820
FringeType
FringeType
algorithms for computing right of way
Definition: SUMOXMLDefinitions.h:1110
NBConnectionDefs.h
NBNode::myIsBentPriority
bool myIsBentPriority
Definition: NBNode.h:875
NBNode::Crossing::tlLinkIndex2
int tlLinkIndex2
Definition: NBNode.h:156
NBNodesEdgesSorter
Definition: NBAlgorithms.h:100
NBNode::addOutgoingEdge
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
Definition: NBNode.cpp:461
NBNode::getLinkState
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, int toLane, bool mayDefinitelyPass, const std::string &tlID) const
get link state
Definition: NBNode.cpp:2011
NBNode::WalkingArea::shape
PositionVector shape
The polygonal shape.
Definition: NBNode.h:183
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:42
NBNode::computeLogic2
void computeLogic2(bool checkLaneFoes)
compute right-of-way logic for all lane-to-lane connections
Definition: NBNode.cpp:950
NBNode::replaceOutgoing
void replaceOutgoing(NBEdge *which, NBEdge *by, int laneOff)
Replaces occurences of the first edge within the list of outgoing by the second Connections are remap...
Definition: NBNode.cpp:1389
NBNode::ApproachingDivider::ApproachingDivider
ApproachingDivider(const EdgeVector &approaching, NBEdge *currentOutgoing)
Constructor.
Definition: NBNode.cpp:96
NBNode::checkIsRemovableReporting
bool checkIsRemovableReporting(std::string &reason) const
check if node is removable and return reason if not
Definition: NBNode.cpp:2050
Named
Base class for objects which have an id.
Definition: Named.h:56
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
NBNode::myTrafficLights
std::set< NBTrafficLightDefinition * > myTrafficLights
traffic lights of node
Definition: NBNode.h:849
NBNode::nodes_by_id_sorter
Used for sorting the cells by the begin time they describe.
Definition: NBNode.h:712
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:57
NBNode::mustBrakeForCrossing
bool mustBrakeForCrossing(const NBEdge *const from, const NBEdge *const to, const Crossing &crossing) const
Returns the information whether the described flow must brake for the given crossing.
Definition: NBNode.cpp:1692
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
NBNode::setRightOfWay
void setRightOfWay(RightOfWay rightOfWay)
set method for computing right-of-way
Definition: NBNode.h:516
NBNode::myType
SumoXMLNodeType myType
The type of the junction.
Definition: NBNode.h:831
NBNode::includes
static bool includes(const std::set< NBEdge *, ComparatorIdLess > &super, const std::set< const NBEdge *, ComparatorIdLess > &sub)
returns whether sub is a subset of super
Definition: NBNode.cpp:2967
NBNode::isLeftMover
bool isLeftMover(const NBEdge *const from, const NBEdge *const to) const
Computes whether the given connection is a left mover across the junction.
Definition: NBNode.cpp:1791
NBNode::myBlockedConnections
NBConnectionProhibits myBlockedConnections
The container for connection block dependencies.
Definition: NBNode.h:834
NBNode::ApproachingDivider::operator=
ApproachingDivider & operator=(const ApproachingDivider &)=delete
Invalidated assignment operator.
NBNode::getConnectionTo
NBEdge * getConnectionTo(NBNode *n) const
get connection to certain node
Definition: NBNode.cpp:2158
NBNode::bezierControlPoints
static PositionVector bezierControlPoints(const PositionVector &begShape, const PositionVector &endShape, bool isTurnaround, double extrapolateBeg, double extrapolateEnd, bool &ok, NBNode *recordError=0, double straightThresh=DEG2RAD(5), int shapeFlag=0)
get bezier control points
Definition: NBNode.cpp:533
NBRequest
Definition: NBRequest.h:58
NBNode::edge_by_direction_sorter::myNode
NBNode * myNode
The node to compute the relative angle of.
Definition: NBNode.h:739
NBNode::getWalkingAreaCustomShapes
const std::vector< WalkingAreaCustomShape > & getWalkingAreaCustomShapes() const
Definition: NBNode.h:678
NBNode::forbidsPedestriansAfter
bool forbidsPedestriansAfter(std::vector< std::pair< NBEdge *, bool > > normalizedLanes, int startIndex)
return whether there is a non-sidewalk lane after the given index;
Definition: NBNode.cpp:2404
EdgeVector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:34
NBNode::WalkingArea::hasCustomShape
bool hasCustomShape
whether this walkingArea has a custom shape
Definition: NBNode.h:191
NBNode::Crossing::shape
PositionVector shape
The crossing's shape.
Definition: NBNode.h:139
NBNode::computeSmoothShape
PositionVector computeSmoothShape(const PositionVector &begShape, const PositionVector &endShape, int numPoints, bool isTurnaround, double extrapolateBeg, double extrapolateEnd, NBNode *recordError=0, int shapeFlag=0) const
Compute a smooth curve between the given geometries.
Definition: NBNode.cpp:506
NBConnection.h
NBNode::getOutgoingEdges
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
Definition: NBNode.h:260
NBNode::myRequest
NBRequest * myRequest
Node requests.
Definition: NBNode.h:846
NBNode::getDisplacementError
double getDisplacementError() const
compute the displacement error during s-curve computation
Definition: NBNode.h:584
NBNode::checkCrossing
int checkCrossing(EdgeVector candidates)
Definition: NBNode.cpp:2296
NBNode::getType
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:272
NBNode::addWalkingAreaShape
void addWalkingAreaShape(EdgeVector edges, const PositionVector &shape)
add custom shape for walkingArea
Definition: NBNode.cpp:3017
NBNode::Crossing::Crossing
Crossing(const NBNode *_node, const EdgeVector &_edges, double _width, bool _priority, int _customTLIndex, int _customTLIndex2, const PositionVector &_customShape)
constructor
Definition: NBNode.cpp:234
NBEdgePriorityComputer
Definition: NBAlgorithms.h:226
NBNode::Crossing::id
std::string id
the (edge)-id of this crossing
Definition: NBNode.h:145
NBNode::removeCrossing
void removeCrossing(const EdgeVector &edges)
remove a pedestrian crossing from this node (identified by its edges)
Definition: NBNode.cpp:3081
NBNode::getNodeIDFromInternalLane
static std::string getNodeIDFromInternalLane(const std::string id)
returns the node id for internal lanes, crossings and walkingareas
Definition: NBNode.cpp:3215
NBNode::buildCrossings
int buildCrossings()
build pedestrian crossings
Definition: NBNode.cpp:2499
NBNode::getKeepClear
bool getKeepClear() const
Returns the keepClear flag.
Definition: NBNode.h:282
NBNode::isBentPriority
bool isBentPriority() const
return whether a priority road turns at this node
Definition: NBNode.h:759
NBNode::rightOnRedConflict
bool rightOnRedConflict(int index, int foeIndex) const
whether the given index must yield to the foeIndex while turing right on a red light
Definition: NBNode.cpp:3258
LinkDirection
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
Definition: SUMOXMLDefinitions.h:1176
NBNode::ApproachingDivider::myAvailableLanes
std::vector< int > myAvailableLanes
The available lanes to which connections shall be built.
Definition: NBNode.h:117
NBNode::WalkingAreaCustomShape
Definition: NBNode.h:198
NBNode::edge_by_direction_sorter::operator()
int operator()(NBEdge *e1, NBEdge *e2) const
operator of selection
Definition: NBNode.h:732
NBNode::isConstantWidthTransition
bool isConstantWidthTransition() const
detects whether a given junction splits or merges lanes while keeping constant road width
Definition: NBNode.cpp:780
NBNode::WalkingArea
A definition of a pedestrian walking area.
Definition: NBNode.h:170
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBNode::ApproachingDivider::execute
void execute(const int src, const int dest)
the bresenham-callback
Definition: NBNode.cpp:132
NBNode::addSortedLinkFoes
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
Definition: NBNode.cpp:1561
Bresenham.h
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:52
NBNode::writeLogic
bool writeLogic(OutputDevice &into) const
writes the XML-representation of the logic as a bitset-logic XML representation
Definition: NBNode.cpp:958
NBNode::computeInternalLaneShape
PositionVector computeInternalLaneShape(NBEdge *fromE, const NBEdge::Connection &con, int numPoints, NBNode *recordError=0, int shapeFlag=0) const
Compute the shape for an internal lane.
Definition: NBNode.cpp:698
NBNode::turnFoes
bool turnFoes(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *from2, const NBEdge *to2, int fromLane2, bool lefthand=false) const
return whether the given laneToLane connection originate from the same edge and are in conflict due t...
Definition: NBNode.cpp:1745
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NBNode::needsCont
bool needsCont(const NBEdge *fromE, const NBEdge *otherFromE, const NBEdge::Connection &c, const NBEdge::Connection &otherC) const
whether an internal junction should be built at from and respect other
Definition: NBNode.cpp:837
NBNode::replaceInConnectionProhibitions
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, int whichLaneOff, int byLaneOff)
replace incoming connections prohibitions
Definition: NBNode.cpp:1458
NBNode::nodes_by_id_sorter::nodes_by_id_sorter
nodes_by_id_sorter()
Constructor.
Definition: NBNode.h:715
NBNode::addIncomingEdge
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
Definition: NBNode.cpp:451
NBNode::ApproachingDivider::myApproaching
const EdgeVector & myApproaching
The list of edges that approach the current edge.
Definition: NBNode.h:111
NBNode::getPosition
const Position & getPosition() const
Definition: NBNode.h:247
NBNode::checkIsRemovable
bool checkIsRemovable() const
check if node is removable
Definition: NBNode.cpp:2044
NBNode::getEdgesToJoin
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
get edges to join
Definition: NBNode.cpp:2117
NBNode::getProhibitions
const NBConnectionProhibits & getProhibitions()
get prohibitions (BLocked connections)
Definition: NBNode.h:635
VectorHelper.h
LinkState
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
Definition: SUMOXMLDefinitions.h:1137
NBNode::getNextCompatibleOutgoing
NBEdge * getNextCompatibleOutgoing(const NBEdge *incoming, SVCPermissions vehPerm, EdgeVector::const_iterator start, bool clockwise) const
Definition: NBNode.cpp:1908
NBNode::myAllEdges
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
Definition: NBNode.h:819
NBNode::getWalkingAreas
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
Definition: NBNode.h:674
NBNode::computeLanes2Lanes
void computeLanes2Lanes()
computes the connections of lanes to edges
Definition: NBNode.cpp:1027
NBNode::getPossiblySplittedOutgoing
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
get possibly splitted outgoing edge
Definition: NBNode.cpp:1591
NBNode::isTLControlled
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition: NBNode.h:313
NBNode::WalkingAreaCustomShape::edges
std::set< const NBEdge *, ComparatorIdLess > edges
Definition: NBNode.h:199
NBNode::getOppositeIncoming
NBEdge * getOppositeIncoming(NBEdge *e) const
returns the opposite incoming edge of certain edge
Definition: NBNode.cpp:1543
NBNode::reshiftPosition
void reshiftPosition(double xoff, double yoff)
Applies an offset to the node.
Definition: NBNode.cpp:329
NBNodeTypeComputer
Definition: NBAlgorithms.h:202
NBNode::myCrossingsLoadedFromSumoNet
int myCrossingsLoadedFromSumoNet
number of crossings loaded from a sumo net
Definition: NBNode.h:867
NBNode::discardAllCrossings
void discardAllCrossings(bool rejectAll)
discard all current (and optionally future) crossings
Definition: NBNode.cpp:2457
NBNode::WalkingArea::WalkingArea
WalkingArea(const std::string &_id, double _width)
constructor
Definition: NBNode.h:172
NBNode::Crossing::prevWalkingArea
std::string prevWalkingArea
the lane-id of the previous walkingArea
Definition: NBNode.h:147
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:218
NBNode::invalidateIncomingConnections
void invalidateIncomingConnections()
invalidate incoming connections
Definition: NBNode.cpp:1662
NBNode::computeLogic
void computeLogic(const NBEdgeCont &ec)
computes the node's type, logic and traffic light
Definition: NBNode.cpp:911
NBNode::typeWasGuessed
bool typeWasGuessed() const
return whether a priority road turns at this node
Definition: NBNode.h:764
NBNode::WalkingArea::nextSidewalks
std::vector< std::string > nextSidewalks
the lane-id of the next sidewalk lane or ""
Definition: NBNode.h:187
NBNode::displaceShapeAtWidthChange
void displaceShapeAtWidthChange(const NBEdge *from, const NBEdge::Connection &con, PositionVector &fromShape, PositionVector &toShape) const
displace lane shapes to account for change in lane width at this node
Definition: NBNode.cpp:788
NBNode::WalkingAreaCustomShape::shape
PositionVector shape
Definition: NBNode.h:200
SumoXMLNodeType
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
Definition: SUMOXMLDefinitions.h:1054
NBNode::getRadius
double getRadius() const
Returns the turning radius of this node.
Definition: NBNode.h:277
Named.h
NBNode::getConnectionIndex
int getConnectionIndex(const NBEdge *from, const NBEdge::Connection &con) const
return the index of the given connection
Definition: NBNode.cpp:3155
NBNode::getEndPoints
std::vector< std::pair< Position, std::string > > getEndPoints() const
return list of unique endpoint coordinates of all edges at this node
Definition: NBNode.cpp:3355
NBNode::shiftTLConnectionLaneIndex
void shiftTLConnectionLaneIndex(NBEdge *edge, int offset, int threshold=-1)
patches loaded signal plans by modifying lane indices above threshold by the given offset
Definition: NBNode.cpp:410
NBNode::mirrorX
void mirrorX()
mirror coordinates along the x-axis
Definition: NBNode.cpp:342
NBNode::setCrossingTLIndices
bool setCrossingTLIndices(const std::string &tlID, int startIndex)
Definition: NBNode.cpp:3124
NBNode::myFringeType
FringeType myFringeType
fringe type of this node
Definition: NBNode.h:861
NBNode::removeTrafficLight
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
Definition: NBNode.cpp:371
NBNode::getDirection
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
Definition: NBNode.cpp:1933
NBNode::myKeepClear
bool myKeepClear
whether the junction area must be kept clear
Definition: NBNode.h:855
NBNode::edge_by_direction_sorter
Sorts outgoing before incoming edges.
Definition: NBNode.h:726
NBNode::Crossing::priority
bool priority
whether the pedestrians have priority
Definition: NBNode.h:151
NBNode::setRoundabout
void setRoundabout()
update the type of this node as a roundabout
Definition: NBNode.cpp:3061
NBNode::numNormalConnections
int numNormalConnections() const
return the number of lane-to-lane connections at this junction (excluding crossings)
Definition: NBNode.cpp:3140
NBNode::myDisplacementError
double myDisplacementError
geometry error after computation of internal lane shapes
Definition: NBNode.h:870
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
NBNode::removeTrafficLights
void removeTrafficLights()
Removes all references to traffic lights that control this tls.
Definition: NBNode.cpp:378
NBNode::addTrafficLight
void addTrafficLight(NBTrafficLightDefinition *tlDef)
Adds a traffic light to the list of traffic lights that control this node.
Definition: NBNode.cpp:361
NBNode::rightTurnConflict
static bool rightTurnConflict(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane, bool lefthand=false)
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossing...
Definition: NBNode.cpp:1698
NBNode::myHaveCustomPoly
bool myHaveCustomPoly
whether this nodes shape was set by the user
Definition: NBNode.h:843
NBNode::invalidateOutgoingConnections
void invalidateOutgoingConnections()
invalidate outgoing connections
Definition: NBNode.cpp:1670
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
PositionVector::EMPTY
static const PositionVector EMPTY
empty Vector
Definition: PositionVector.h:73
NBContHelper.h
NBNode::getEdges
const EdgeVector & getEdges() const
Returns all edges which participate in this node (Edges that start or end at this node)
Definition: NBNode.h:265
NBNode::setCustomShape
void setCustomShape(const PositionVector &shape)
set the junction shape
Definition: NBNode.cpp:2146
NBConnection
Definition: NBConnection.h:43
NBNode::SCURVE_IGNORE
static const int SCURVE_IGNORE
Definition: NBNode.h:215
NBNode::WalkingArea::prevSidewalks
std::vector< std::string > prevSidewalks
the lane-id of the previous sidewalk lane or ""
Definition: NBNode.h:189
NBNode::setRadius
void setRadius(double radius)
set the turning radius
Definition: NBNode.h:506
NBNode::getCrossingsIncludingInvalid
const std::vector< Crossing * > & getCrossingsIncludingInvalid() const
Definition: NBNode.h:669
NBNode::WalkingArea::minNextCrossingEdges
int minNextCrossingEdges
minimum number of edges crossed by nextCrossings
Definition: NBNode.h:193
NBNode::getCrossings
std::vector< Crossing * > getCrossings() const
return this junctions pedestrian crossings
Definition: NBNode.cpp:2439
NBNode::myDiscardAllCrossings
bool myDiscardAllCrossings
whether to discard all pedestrian crossings
Definition: NBNode.h:864
NBNode::removeEdge
void removeEdge(NBEdge *edge, bool removeFromConnections=true)
Removes edge from this node and optionally removes connections as well.
Definition: NBNode.cpp:1604
DEG2RAD
#define DEG2RAD(x)
Definition: GeomHelper.h:37
NBNode::hasCustomShape
bool hasCustomShape() const
return whether the shape was set by the user
Definition: NBNode.h:526
NBNode::Crossing::customTLIndex
int customTLIndex
the custom traffic light index of this crossing (if controlled)
Definition: NBNode.h:158
NBNode::ApproachingDivider::numAvailableLanes
int numAvailableLanes() const
@ get number of avaliable lanes
Definition: NBNode.h:99
NBNode::myDistrict
NBDistrict * myDistrict
The district the node is the centre of.
Definition: NBNode.h:837
NBNode::myOutgoingEdges
EdgeVector myOutgoingEdges
Vector of outgoing edges.
Definition: NBNode.h:816
NBNode::myCrossings
std::vector< Crossing * > myCrossings
Vector of crossings.
Definition: NBNode.h:822
NBNode::myTypeWasGuessed
bool myTypeWasGuessed
whether the node type was guessed rather than loaded
Definition: NBNode.h:878
Position.h
NBConnectionProhibits
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
Definition: NBConnectionDefs.h:39
NBNode::avoidOverlap
void avoidOverlap()
fix overlap
Definition: NBNode.cpp:3235
NBNode::discardWalkingareas
void discardWalkingareas()
discard previously built walkingareas (required for repeated computation by netedit)
Definition: NBNode.cpp:2470
NBNode::getShape
const PositionVector & getShape() const
retrieve the junction shape
Definition: NBNode.cpp:2140
NBNode::addCrossing
NBNode::Crossing * addCrossing(EdgeVector edges, double width, bool priority, int tlIndex=-1, int tlIndex2=-1, const PositionVector &customShape=PositionVector::EMPTY, bool fromSumoNet=false)
add a pedestrian crossing to this node
Definition: NBNode.cpp:3069
NBNode::Crossing::width
double width
This crossing's width.
Definition: NBNode.h:143
NBNode::crossingBetween
bool crossingBetween(const NBEdge *e1, const NBEdge *e2) const
return true if the given edges are connected by a crossing
Definition: NBNode.cpp:2980
NBNode::myPosition
Position myPosition
The position the node lies at.
Definition: NBNode.h:810
NBNode::~NBNode
~NBNode()
Destructor.
Definition: NBNode.cpp:297
NBNode::Crossing::tlLinkIndex
int tlLinkIndex
the traffic light index of this crossing (if controlled)
Definition: NBNode.h:155
NBNode::Crossing::customShape
PositionVector customShape
optional customShape for this crossing
Definition: NBNode.h:153
NBNode::removeJoinedTrafficLights
void removeJoinedTrafficLights()
remove all traffic light definitions that are part of a joined tls
Definition: NBNode.cpp:896
NBNode::remapRemoved
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
remap removed
Definition: NBNode.cpp:1827
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:54
NBNode::buildWalkingAreas
void buildWalkingAreas(int cornerDetail)
build pedestrian walking areas and set connections from/to walkingAreas
Definition: NBNode.cpp:2596
NBNode::geometryLike
bool geometryLike() const
whether this is structurally similar to a geometry node
Definition: NBNode.cpp:3026
NBNode::getControllingTLS
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node (The set of tls that control this node)
Definition: NBNode.h:318
NBNode::mustBrake
bool mustBrake(const NBEdge *const from, const NBEdge *const to, int fromLane, int toLane, bool includePedCrossings) const
Returns the information whether the described flow must let any other flow pass.
Definition: NBNode.cpp:1678
NBNode::forbids
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
Definition: NBNode.cpp:1810
NBNode::AVOID_INTERSECTING_LEFT_TURNS
static const int AVOID_INTERSECTING_LEFT_TURNS
Definition: NBNode.h:214
NBNode::getFringeType
FringeType getFringeType() const
Returns fringe type.
Definition: NBNode.h:292
RightOfWay
RightOfWay
algorithms for computing right of way
Definition: SUMOXMLDefinitions.h:1104
NBNode::WalkingArea::width
double width
This lane's width.
Definition: NBNode.h:179
NBNode::Crossing::customTLIndex2
int customTLIndex2
Definition: NBNode.h:159
NBNode::myWalkingAreas
std::vector< WalkingArea > myWalkingAreas
Vector of walking areas.
Definition: NBNode.h:825
NBNode::numCrossingsFromSumoNet
int numCrossingsFromSumoNet() const
get num of crossings from sumo net
Definition: NBNode.h:663
NBNode::getIncomingEdges
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
Definition: NBNode.h:255
NBNode::NBNode
NBNode(const std::string &id, const Position &position, SumoXMLNodeType type)
Constructor.
Definition: NBNode.cpp:252
NBNode::UNSPECIFIED_RADIUS
static const double UNSPECIFIED_RADIUS
unspecified lane width
Definition: NBNode.h:208
INVALID_DOUBLE
const double INVALID_DOUBLE
Definition: StdDefs.h:62
NBNode::isLongEnough
static bool isLongEnough(NBEdge *out, double minLength)
check if is long enough
Definition: NBNode.cpp:1350
NBNode::isTrafficLight
static bool isTrafficLight(SumoXMLNodeType type)
return whether the given type is a traffic light
Definition: NBNode.cpp:3250
NBNode::FOUR_CONTROL_POINTS
static const int FOUR_CONTROL_POINTS
Definition: NBNode.h:213
NBNode::operator=
NBNode & operator=(const NBNode &s)
invalidated assignment operator
NBNode::isSimpleContinuation
bool isSimpleContinuation(bool checkLaneNumbers=true, bool checkWidth=false) const
check if node is a simple continuation
Definition: NBNode.cpp:471
NBNode::Crossing::node
const NBNode * node
The parent node of this crossing.
Definition: NBNode.h:135
NBNode::removeDoubleEdges
void removeDoubleEdges()
remove duble edges
Definition: NBNode.cpp:1493
NBNode::myRadius
double myRadius
the turning radius (for all corners) at this node in m.
Definition: NBNode.h:852
NBNode::nodes_by_id_sorter::operator()
int operator()(NBNode *n1, NBNode *n2) const
Comparing operator.
Definition: NBNode.h:718
NBNode::sortEdges
void sortEdges(bool useNodeShape)
sort all edge containers for this node
Definition: NBNode.cpp:3271
NBNode::Crossing::edges
EdgeVector edges
The edges being crossed.
Definition: NBNode.h:137
NBNode::ApproachingDivider::myIsBikeEdge
bool myIsBikeEdge
whether the outgoing edge is exclusively used by bikes
Definition: NBNode.h:120
NBNode::AVOID_WIDE_LEFT_TURN
static const int AVOID_WIDE_LEFT_TURN
Definition: NBNode.h:212
NBNode::getCrossing
Crossing * getCrossing(const std::string &id) const
return the crossing with the given id
Definition: NBNode.cpp:3096
NBNode::WalkingArea::length
double length
This lane's width.
Definition: NBNode.h:181
NBNode::getEmptyDir
Position getEmptyDir() const
Returns something like the most unused direction Should only be used to add source or sink nodes.
Definition: NBNode.cpp:1634
NBNode::myIncomingEdges
EdgeVector myIncomingEdges
Vector of incoming edges.
Definition: NBNode.h:813
NBNode::setKeepClear
void setKeepClear(bool keepClear)
set the keepClear flag
Definition: NBNode.h:511
NBNode::setFringeType
void setFringeType(FringeType fringeType)
set method for computing right-of-way
Definition: NBNode.h:521
NBNode::hasIncoming
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
Definition: NBNode.cpp:1531
NBNode::guessCrossings
int guessCrossings()
guess pedestrian crossings and return how many were guessed
Definition: NBNode.cpp:2192
config.h
NBNode::getEdgesSortedByAngleAtNodeCenter
EdgeVector getEdgesSortedByAngleAtNodeCenter() const
returns the list of all edges sorted clockwise by getAngleAtNodeToCenter
Definition: NBNode.cpp:3192
GeomHelper.h
NBNode::tlsContConflict
bool tlsContConflict(const NBEdge *from, const NBEdge::Connection &c, const NBEdge *foeFrom, const NBEdge::Connection &foe) const
whether the connection must yield if the foe remains on the intersection after its phase ends
Definition: NBNode.cpp:886
StdDefs.h
NBNode::Crossing::nextWalkingArea
std::string nextWalkingArea
the lane-id of the next walkingArea
Definition: NBNode.h:149
NBNode::myPoly
PositionVector myPoly
the (outer) shape of the junction
Definition: NBNode.h:840
NBNode::invalidateTLS
void invalidateTLS(NBTrafficLightLogicCont &tlCont, bool removedConnections, bool addedConnections)
causes the traffic light to be computed anew
Definition: NBNode.cpp:387
NBNode::BACKWARD
static const int BACKWARD
Definition: NBNode.h:205
NBNode::setPriorityJunctionPriorities
void setPriorityJunctionPriorities()
sets the priorites in case of a priority junction
NBNode::myWalkingAreaCustomShapes
std::vector< WalkingAreaCustomShape > myWalkingAreaCustomShapes
Vector of custom walking areas shapes.
Definition: NBNode.h:828
Bresenham::BresenhamCallBack
Definition: Bresenham.h:43
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
NBNode::ApproachingDivider
Computes lane-2-lane connections.
Definition: NBNode.h:87
NBNode::removeSelfLoops
int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
Definition: NBNode.cpp:418
GNEJunction
Definition: GNEJunction.h:47
NBNode::getPossiblySplittedIncoming
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
get possibly splitted incoming edge
Definition: NBNode.cpp:1578
NBNode::Crossing
A definition of a pedestrian crossing.
Definition: NBNode.h:131
NBNode::AVOID_WIDE_RIGHT_TURN
static const int AVOID_WIDE_RIGHT_TURN
flags for controlling shape generation
Definition: NBNode.h:211
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:189
NBNode::getCenter
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
Definition: NBNode.cpp:3174
NBNode::myRightOfWay
RightOfWay myRightOfWay
how to compute right of way for this node
Definition: NBNode.h:858
NBNode::getRightOfWay
RightOfWay getRightOfWay() const
Returns hint on how to compute right of way.
Definition: NBNode.h:287
NBNode::buildInnerEdges
void buildInnerEdges()
build internal lanes, pedestrian crossings and walking areas
Definition: NBNode.cpp:2476
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:76
PositionVector.h
NBNode::Crossing::tlID
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBNode.h:161
NBNode::ApproachingDivider::spread
std::deque< int > * spread(const std::vector< int > &approachingLanes, int dest) const
the method that spreads the wished number of lanes from the the lane given by the bresenham-call to b...
Definition: NBNode.cpp:165
NBDistrict
A class representing a single district.
Definition: NBDistrict.h:64
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:491
NBNode::WalkingArea::id
std::string id
the (edge)-id of this walkingArea
Definition: NBNode.h:177
NBNode::Crossing::valid
bool valid
whether this crossing is valid (and can be written to the net.xml). This is needed for netedit becaus...
Definition: NBNode.h:163
NBNode::getFoes
const std::string getFoes(int linkIndex) const
Definition: NBNode.cpp:968
SUMOXMLDefinitions.h
NBNode::buildCrossingsAndWalkingAreas
void buildCrossingsAndWalkingAreas()
build crossings, and walkingareas. Also removes invalid loaded crossings if wished
Definition: NBNode.cpp:2415
NBNode::WalkingArea::nextCrossings
std::vector< std::string > nextCrossings
the lane-id of the next crossing(s)
Definition: NBNode.h:185
NBNode::ApproachingDivider::myCurrentOutgoing
NBEdge * myCurrentOutgoing
The approached current edge.
Definition: NBNode.h:114
NBNode::Crossing::customWidth
double customWidth
This crossing's width.
Definition: NBNode.h:141
NBNode::isDistrict
bool isDistrict() const
check if node is a district
Definition: NBNode.cpp:2186
NBNode::checkCrossingDuplicated
bool checkCrossingDuplicated(EdgeVector edges)
return true if there already exist a crossing with the same edges as the input
Definition: NBNode.cpp:2387
NBNode::reinit
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
Definition: NBNode.cpp:303
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition: NBTrafficLightDefinition.h:67
NBEdge.h
NBNode::edgesBetween
EdgeVector edgesBetween(const NBEdge *e1, const NBEdge *e2) const
return all edges that lie clockwise between the given edges
Definition: NBNode.cpp:3001
NBNode::computeNodeShape
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
Definition: NBNode.cpp:988
NBNode::markBentPriority
void markBentPriority(bool isBent)
mark whether a priority road turns at this node
Definition: NBNode.h:754
NBNode::replaceIncoming
void replaceIncoming(NBEdge *which, NBEdge *by, int laneOff)
Replaces occurences of the first edge within the list of incoming by the second Connections are remap...
Definition: NBNode.cpp:1425
NBNodeShapeComputer
This class computes shapes of junctions.
Definition: NBNodeShapeComputer.h:44
NBNode::isNearDistrict
bool isNearDistrict() const
@chech if node is near district
Definition: NBNode.cpp:2169