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 /****************************************************************************/
18 // The representation of a single node
19 /****************************************************************************/
20 #ifndef NBNode_h
21 #define NBNode_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <vector>
30 #include <deque>
31 #include <utility>
32 #include <string>
33 #include <set>
34 #include <utils/common/StdDefs.h>
35 #include <utils/common/Named.h>
36 #include <utils/geom/Bresenham.h>
37 #include <utils/geom/GeomHelper.h>
39 #include <utils/geom/Position.h>
42 #include "NBEdge.h"
43 #include "NBConnection.h"
44 #include "NBConnectionDefs.h"
45 #include "NBContHelper.h"
46 
47 
48 // ===========================================================================
49 // class declarations
50 // ===========================================================================
51 class NBRequest;
52 class NBDistrict;
53 class OptionsCont;
55 class NBTypeCont;
57 class NBDistrictCont;
58 class OutputDevice;
59 
60 
61 // ===========================================================================
62 // class definitions
63 // ===========================================================================
68 class NBNode : public Named, public Parameterised {
69  friend class NBNodeCont;
70  friend class GNEJunction; // < used for visualization (NETEDIT)
71  friend class NBNodesEdgesSorter; // < sorts the edges
72  friend class NBNodeTypeComputer; // < computes type
73  friend class NBEdgePriorityComputer; // < computes priorities of edges per intersection
74  friend class NBNodeShapeComputer; // < computes node's shape
75 
76 public:
89  public:
94  ApproachingDivider(const EdgeVector& approaching, NBEdge* currentOutgoing);
95 
98 
100  int numAvailableLanes() const {
101  return (int)myAvailableLanes.size();
102  }
103 
105  void execute(const int src, const int dest);
106 
108  std::deque<int>* spread(const std::vector<int>& approachingLanes, int dest) const;
109 
110  private:
113 
116 
118  std::vector<int> myAvailableLanes;
119 
122 
123  private:
126 
127  };
128 
132  struct Crossing : public Parameterised {
134  Crossing(const NBNode* _node, const EdgeVector& _edges, double _width, bool _priority, int _customTLIndex, int _customTLIndex2, const PositionVector& _customShape);
136  const NBNode* node;
142  double customWidth;
144  double width;
146  std::string id;
148  std::string prevWalkingArea;
150  std::string nextWalkingArea;
152  bool priority;
162  std::string tlID;
164  bool valid;
165  };
166 
167 
171  struct WalkingArea {
173  WalkingArea(const std::string& _id, double _width) :
174  id(_id),
175  width(_width),
176  hasCustomShape(false),
177  minNextCrossingEdges(std::numeric_limits<int>::max()),
178  minPrevCrossingEdges(std::numeric_limits<int>::max()) {
179  }
181  std::string id;
183  double width;
185  double length;
189  std::vector<std::string> nextCrossings;
191  std::vector<std::string> nextSidewalks;
193  std::vector<std::string> prevSidewalks;
200  };
201 
203  std::set<const NBEdge*, ComparatorIdLess> edges;
205  };
206 
208  static const int FORWARD;
209  static const int BACKWARD;
210 
212  static const double UNSPECIFIED_RADIUS;
213 
215  static const int AVOID_WIDE_RIGHT_TURN;
216  static const int AVOID_WIDE_LEFT_TURN;
217  static const int FOUR_CONTROL_POINTS;
219  static const int SCURVE_IGNORE;
220 
221 public:
227  NBNode(const std::string& id, const Position& position, SumoXMLNodeType type);
228 
234  NBNode(const std::string& id, const Position& position, NBDistrict* district = 0);
235 
237  ~NBNode();
238 
245  void reinit(const Position& position, SumoXMLNodeType type,
246  bool updateEdgeGeometries = false);
247 
251  const Position& getPosition() const {
252  return myPosition;
253  }
254 
256  Position getCenter() const;
257 
259  const EdgeVector& getIncomingEdges() const {
260  return myIncomingEdges;
261  }
262 
264  const EdgeVector& getOutgoingEdges() const {
265  return myOutgoingEdges;
266  }
267 
269  const EdgeVector& getEdges() const {
270  return myAllEdges;
271  }
272 
277  return myType;
278  }
279 
281  double getRadius() const {
282  return myRadius;
283  }
284 
286  bool getKeepClear() const {
287  return myKeepClear;
288  }
289 
292  return myRightOfWay;
293  }
294 
297  return myFringeType;
298  }
300 
303 
307 
310 
312  void removeTrafficLights();
313 
317  bool isTLControlled() const {
318  return myTrafficLights.size() != 0;
319  }
320 
322  const std::set<NBTrafficLightDefinition*>& getControllingTLS() const {
323  return myTrafficLights;
324  }
325 
327  void invalidateTLS(NBTrafficLightLogicCont& tlCont, bool removedConnections, bool addedConnections);
328 
330  void shiftTLConnectionLaneIndex(NBEdge* edge, int offset, int threshold = -1);
332 
333 
336 
348 
349 
352 
356  void reshiftPosition(double xoff, double yoff);
357 
359  void mirrorX();
361 
363  void addIncomingEdge(NBEdge* edge);
364 
366  void addOutgoingEdge(NBEdge* edge);
367 
369  void computeLanes2Lanes();
370 
372  void computeLogic(const NBEdgeCont& ec, OptionsCont& oc);
373 
375  void computeLogic2(bool checkLaneFoes);
376 
378  bool writeLogic(OutputDevice& into) const;
379 
380  const std::string getFoes(int linkIndex) const;
381  const std::string getResponse(int linkIndex) const;
382 
384  Position getEmptyDir() const;
385 
390  bool hasIncoming(const NBEdge* const e) const;
391 
396  bool hasOutgoing(const NBEdge* const e) const;
397 
399  NBEdge* getOppositeIncoming(NBEdge* e) const;
400 
403 
406 
408  void removeDoubleEdges();
409 
411  NBEdge* getConnectionTo(NBNode* n) const;
412 
414  void addSortedLinkFoes(const NBConnection& mayDrive, const NBConnection& mustStop);
415 
417  NBEdge* getPossiblySplittedIncoming(const std::string& edgeid);
418 
420  NBEdge* getPossiblySplittedOutgoing(const std::string& edgeid);
421 
423  void removeEdge(NBEdge* edge, bool removeFromConnections = true);
424 
434  bool isLeftMover(const NBEdge* const from, const NBEdge* const to) const;
435 
444  bool mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, int toLane, bool includePedCrossings) const;
445 
452  bool mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const Crossing& crossing) const;
453 
455  static bool rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane,
456  const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane,
457  bool lefthand = false);
458 
460  bool turnFoes(const NBEdge* from, const NBEdge* to, int fromLane,
461  const NBEdge* from2, const NBEdge* to2, int fromLane2,
462  bool lefthand = false) const;
463 
472  bool forbids(const NBEdge* const possProhibitorFrom, const NBEdge* const possProhibitorTo,
473  const NBEdge* const possProhibitedFrom, const NBEdge* const possProhibitedTo,
474  bool regardNonSignalisedLowerPriority) const;
475 
483  bool foes(const NBEdge* const from1, const NBEdge* const to1,
484  const NBEdge* const from2, const NBEdge* const to2) const;
485 
492  LinkDirection getDirection(const NBEdge* const incoming, const NBEdge* const outgoing, bool leftHand = false) const;
493 
495  LinkState getLinkState(const NBEdge* incoming, NBEdge* outgoing,
496  int fromLane, int toLane, bool mayDefinitelyPass, const std::string& tlID) const;
497 
501  void computeNodeShape(double mismatchThreshold);
502 
504  const PositionVector& getShape() const;
505 
507  void setCustomShape(const PositionVector& shape);
508 
510  void setRadius(double radius) {
511  myRadius = radius;
512  }
513 
515  void setKeepClear(bool keepClear) {
516  myKeepClear = keepClear;
517  }
518 
520  void setRightOfWay(RightOfWay rightOfWay) {
521  myRightOfWay = rightOfWay;
522  }
523 
525  void setFringeType(FringeType fringeType) {
526  myFringeType = fringeType;
527  }
528 
530  bool hasCustomShape() const {
531  return myHaveCustomPoly;
532  }
533 
535  bool checkIsRemovable() const;
536 
538  bool checkIsRemovableReporting(std::string& reason) const;
539 
541  std::vector<std::pair<NBEdge*, NBEdge*> > getEdgesToJoin() const;
542 
544  bool isNearDistrict() const;
545 
547  bool isDistrict() const;
548 
550  bool needsCont(const NBEdge* fromE, const NBEdge* otherFromE,
551  const NBEdge::Connection& c, const NBEdge::Connection& otherC) const;
552 
554  bool tlsContConflict(const NBEdge* from, const NBEdge::Connection& c,
555  const NBEdge* foeFrom, const NBEdge::Connection& foe) const;
556 
557 
565  PositionVector computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError = 0, int shapeFlag = 0) const;
566 
577  PositionVector computeSmoothShape(const PositionVector& begShape, const PositionVector& endShape, int numPoints,
578  bool isTurnaround, double extrapolateBeg, double extrapolateEnd,
579  NBNode* recordError = 0, int shapeFlag = 0) const;
581  static PositionVector bezierControlPoints(const PositionVector& begShape, const PositionVector& endShape,
582  bool isTurnaround, double extrapolateBeg, double extrapolateEnd,
583  bool& ok, NBNode* recordError = 0, double straightThresh = DEG2RAD(5),
584  int shapeFlag = 0);
585 
586 
588  double getDisplacementError() const {
589  return myDisplacementError;
590  }
591 
593  void replaceIncoming(NBEdge* which, NBEdge* by, int laneOff);
594 
596  void replaceIncoming(const EdgeVector& which, NBEdge* by);
597 
599  void replaceOutgoing(NBEdge* which, NBEdge* by, int laneOff);
600 
602  void replaceOutgoing(const EdgeVector& which, NBEdge* by);
603 
605  int guessCrossings();
606 
607  /* @brief check whether a crossing should be build for the candiate edges and build 0 to n crossings
608  * @param[in] candidates The candidate vector of edges to be crossed
609  * @return The number of crossings built
610  * */
611  int checkCrossing(EdgeVector candidates);
612 
615 
617  void buildInnerEdges();
618 
622  int buildCrossings();
623 
627  void buildWalkingAreas(int cornerDetail);
628 
631 
633  EdgeVector edgesBetween(const NBEdge* e1, const NBEdge* e2) const;
634 
636  bool crossingBetween(const NBEdge* e1, const NBEdge* e2) const;
637 
640  return myBlockedConnections;
641  }
642 
644  bool geometryLike() const;
645  bool geometryLike(const EdgeVector& incoming, const EdgeVector& outgoing) const;
646 
648  void setRoundabout();
649 
651  NBNode::Crossing* addCrossing(EdgeVector edges, double width, bool priority, int tlIndex = -1, int tlIndex2 = -1,
652  const PositionVector& customShape = PositionVector::EMPTY, bool fromSumoNet = false);
653 
655  void addWalkingAreaShape(EdgeVector edges, const PositionVector& shape);
656 
658  void removeCrossing(const EdgeVector& edges);
659 
661  void discardAllCrossings(bool rejectAll);
662 
664  void discardWalkingareas();
665 
669  }
670 
672  std::vector<Crossing*> getCrossings() const;
673  inline const std::vector<Crossing*>& getCrossingsIncludingInvalid() const {
674  return myCrossings;
675  }
676 
678  inline const std::vector<WalkingArea>& getWalkingAreas() const {
679  return myWalkingAreas;
680  }
681 
682  const std::vector<WalkingAreaCustomShape>& getWalkingAreaCustomShapes() const {
684  }
685 
687  Crossing* getCrossing(const std::string& id) const;
688 
690  Crossing* getCrossing(const EdgeVector& edges, bool hardFail = true) const;
691 
692  /* @brief set tl indices of this nodes crossing starting at the given index
693  * @return Whether a custom index was used
694  */
695  bool setCrossingTLIndices(const std::string& tlID, int startIndex);
696 
698  int numNormalConnections() const;
699 
701  void avoidOverlap();
702 
704  bool rightOnRedConflict(int index, int foeIndex) const;
705 
707  void sortEdges(bool useNodeShape);
708 
710  int getConnectionIndex(const NBEdge* from, const NBEdge::Connection& con) const;
711 
717  public:
719  explicit nodes_by_id_sorter() { }
720 
722  int operator()(NBNode* n1, NBNode* n2) const {
723  return n1->getID() < n2->getID();
724  }
725  };
726 
731  public:
734 
736  int operator()(NBEdge* e1, NBEdge* e2) const {
737  UNUSED_PARAMETER(e2);
738  return e1->getFromNode() == myNode;
739  }
740 
741  private:
744 
745  };
746 
748  static std::string getNodeIDFromInternalLane(const std::string id);
749 
750 
752  static bool isTrafficLight(SumoXMLNodeType type);
753 
755  bool isSimpleContinuation(bool checkLaneNumbers = true, bool checkWidth = false) const;
756 
758  void markBentPriority(bool isBent) {
759  myIsBentPriority = isBent;
760  }
761 
763  bool isBentPriority() const {
764  return myIsBentPriority;
765  }
766 
768  bool typeWasGuessed() const {
769  return myTypeWasGuessed;
770  }
771 
773  bool isConstantWidthTransition() const;
774 
776  std::vector<std::pair<Position, std::string> > getEndPoints() const;
777 
778 private:
781 
783  void getEdgesThatApproach(NBEdge* currentOutgoing, EdgeVector& approaching);
784 
786  void replaceInConnectionProhibitions(NBEdge* which, NBEdge* by, int whichLaneOff, int byLaneOff);
787 
789  void remapRemoved(NBTrafficLightLogicCont& tc, NBEdge* removed, const EdgeVector& incoming, const EdgeVector& outgoing);
790 
792  bool forbidsPedestriansAfter(std::vector<std::pair<NBEdge*, bool> > normalizedLanes, int startIndex);
793 
796 
798  static bool isLongEnough(NBEdge* out, double minLength);
799 
802 
804  void displaceShapeAtWidthChange(const NBEdge* from, const NBEdge::Connection& con, PositionVector& fromShape, PositionVector& toShape) const;
805 
807  static bool includes(const std::set<NBEdge*, ComparatorIdLess>& super,
808  const std::set<const NBEdge*, ComparatorIdLess>& sub);
809 
810  NBEdge* getNextCompatibleOutgoing(const NBEdge* incoming, SVCPermissions vehPerm, EdgeVector::const_iterator start, bool clockwise) const;
811 
812 private:
815 
818 
821 
824 
826  std::vector<Crossing*> myCrossings;
827 
829  std::vector<WalkingArea> myWalkingAreas;
830 
832  std::vector<WalkingAreaCustomShape> myWalkingAreaCustomShapes;
833 
836 
839 
842 
845 
848 
851 
853  std::set<NBTrafficLightDefinition*> myTrafficLights;
854 
856  double myRadius;
857 
860 
863 
866 
869 
872 
875 
876  /* @brief whether this junction is a bent priority junction (main direction turns)
877  * @note see NBEdgePriorityComputer
878  */
880 
883 
884 
885 private:
887  NBNode(const NBNode& s);
888 
890  NBNode& operator=(const NBNode& s);
891 };
892 
893 
894 #endif
895 
896 /****************************************************************************/
897 
NBNode::edge_by_direction_sorter::edge_by_direction_sorter
edge_by_direction_sorter(NBNode *n)
constructor
Definition: NBNode.h:733
NBNode::ApproachingDivider::~ApproachingDivider
~ApproachingDivider()
Destructor.
Definition: NBNode.cpp:129
NBNode::getResponse
const std::string getResponse(int linkIndex) const
Definition: NBNode.cpp:981
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:32
NBNode::FORWARD
static const int FORWARD
edge directions (for pedestrian related stuff)
Definition: NBNode.h:208
NBNode::WalkingArea::minPrevCrossingEdges
int minPrevCrossingEdges
minimum number of edges crossed by incoming crossings
Definition: NBNode.h:199
NBNode::hasOutgoing
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
Definition: NBNode.cpp:1540
NBNode::getEdgesThatApproach
void getEdgesThatApproach(NBEdge *currentOutgoing, EdgeVector &approaching)
returns a list of edges which are connected to the given outgoing edge
Definition: NBNode.cpp:1370
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:1823
FringeType
FringeType
algorithms for computing right of way
Definition: SUMOXMLDefinitions.h:1105
NBConnectionDefs.h
NBNode::myIsBentPriority
bool myIsBentPriority
Definition: NBNode.h:879
NBNode::Crossing::tlLinkIndex2
int tlLinkIndex2
Definition: NBNode.h:157
NBNodesEdgesSorter
Definition: NBAlgorithms.h:101
NBNode::addOutgoingEdge
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
Definition: NBNode.cpp:459
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:2014
NBNode::WalkingArea::shape
PositionVector shape
The polygonal shape.
Definition: NBNode.h:187
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:43
NBNode::computeLogic2
void computeLogic2(bool checkLaneFoes)
compute right-of-way logic for all lane-to-lane connections
Definition: NBNode.cpp:953
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:1392
NBNode::ApproachingDivider::ApproachingDivider
ApproachingDivider(const EdgeVector &approaching, NBEdge *currentOutgoing)
Constructor.
Definition: NBNode.cpp:97
NBNode::checkIsRemovableReporting
bool checkIsRemovableReporting(std::string &reason) const
check if node is removable and return reason if not
Definition: NBNode.cpp:2053
Named
Base class for objects which have an id.
Definition: Named.h:57
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:61
NBNode::myTrafficLights
std::set< NBTrafficLightDefinition * > myTrafficLights
traffic lights of node
Definition: NBNode.h:853
NBNode::nodes_by_id_sorter
Used for sorting the cells by the begin time they describe.
Definition: NBNode.h:716
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:58
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:1695
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
NBNode::setRightOfWay
void setRightOfWay(RightOfWay rightOfWay)
set method for computing right-of-way
Definition: NBNode.h:520
NBNode::myType
SumoXMLNodeType myType
The type of the junction.
Definition: NBNode.h:835
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:2987
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:1794
NBNode::myBlockedConnections
NBConnectionProhibits myBlockedConnections
The container for connection block dependencies.
Definition: NBNode.h:838
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:2161
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:531
NBRequest
Definition: NBRequest.h:59
NBNode::edge_by_direction_sorter::myNode
NBNode * myNode
The node to compute the relative angle of.
Definition: NBNode.h:743
NBNode::getWalkingAreaCustomShapes
const std::vector< WalkingAreaCustomShape > & getWalkingAreaCustomShapes() const
Definition: NBNode.h:682
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:2421
EdgeVector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:35
NBNode::WalkingArea::hasCustomShape
bool hasCustomShape
whether this walkingArea has a custom shape
Definition: NBNode.h:195
NBNode::Crossing::shape
PositionVector shape
The crossing's shape.
Definition: NBNode.h:140
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:504
NBConnection.h
NBNode::getOutgoingEdges
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
Definition: NBNode.h:264
NBNode::myRequest
NBRequest * myRequest
Node requests.
Definition: NBNode.h:850
NBNode::getDisplacementError
double getDisplacementError() const
compute the displacement error during s-curve computation
Definition: NBNode.h:588
NBNode::checkCrossing
int checkCrossing(EdgeVector candidates)
Definition: NBNode.cpp:2313
NBNode::getType
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:276
NBNode::addWalkingAreaShape
void addWalkingAreaShape(EdgeVector edges, const PositionVector &shape)
add custom shape for walkingArea
Definition: NBNode.cpp:3037
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:235
NBEdgePriorityComputer
Definition: NBAlgorithms.h:227
NBNode::Crossing::id
std::string id
the (edge)-id of this crossing
Definition: NBNode.h:146
NBNode::removeCrossing
void removeCrossing(const EdgeVector &edges)
remove a pedestrian crossing from this node (identified by its edges)
Definition: NBNode.cpp:3101
NBNode::getNodeIDFromInternalLane
static std::string getNodeIDFromInternalLane(const std::string id)
returns the node id for internal lanes, crossings and walkingareas
Definition: NBNode.cpp:3235
NBNode::buildCrossings
int buildCrossings()
build pedestrian crossings
Definition: NBNode.cpp:2515
NBNode::getKeepClear
bool getKeepClear() const
Returns the keepClear flag.
Definition: NBNode.h:286
NBNode::isBentPriority
bool isBentPriority() const
return whether a priority road turns at this node
Definition: NBNode.h:763
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:3278
LinkDirection
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
Definition: SUMOXMLDefinitions.h:1171
NBNode::ApproachingDivider::myAvailableLanes
std::vector< int > myAvailableLanes
The available lanes to which connections shall be built.
Definition: NBNode.h:118
NBNode::WalkingAreaCustomShape
Definition: NBNode.h:202
NBNode::edge_by_direction_sorter::operator()
int operator()(NBEdge *e1, NBEdge *e2) const
operator of selection
Definition: NBNode.h:736
NBNode::isConstantWidthTransition
bool isConstantWidthTransition() const
detects whether a given junction splits or merges lanes while keeping constant road width
Definition: NBNode.cpp:778
NBNode::WalkingArea
A definition of a pedestrian walking area.
Definition: NBNode.h:171
PositionVector
A list of positions.
Definition: PositionVector.h:46
NBNode::ApproachingDivider::execute
void execute(const int src, const int dest)
the bresenham-callback
Definition: NBNode.cpp:133
NBNode::addSortedLinkFoes
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
Definition: NBNode.cpp:1564
Bresenham.h
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:53
NBNode::writeLogic
bool writeLogic(OutputDevice &into) const
writes the XML-representation of the logic as a bitset-logic XML representation
Definition: NBNode.cpp:961
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:696
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:1748
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:60
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:86
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:835
NBNode::replaceInConnectionProhibitions
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, int whichLaneOff, int byLaneOff)
replace incoming connections prohibitions
Definition: NBNode.cpp:1461
NBNode::nodes_by_id_sorter::nodes_by_id_sorter
nodes_by_id_sorter()
Constructor.
Definition: NBNode.h:719
NBNode::addIncomingEdge
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
Definition: NBNode.cpp:449
NBNode::ApproachingDivider::myApproaching
const EdgeVector & myApproaching
The list of edges that approach the current edge.
Definition: NBNode.h:112
NBNode::getPosition
const Position & getPosition() const
Definition: NBNode.h:251
NBNode::checkIsRemovable
bool checkIsRemovable() const
check if node is removable
Definition: NBNode.cpp:2047
NBNode::getEdgesToJoin
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
get edges to join
Definition: NBNode.cpp:2120
NBNode::getProhibitions
const NBConnectionProhibits & getProhibitions()
get prohibitions (BLocked connections)
Definition: NBNode.h:639
VectorHelper.h
LinkState
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
Definition: SUMOXMLDefinitions.h:1132
NBNode::getNextCompatibleOutgoing
NBEdge * getNextCompatibleOutgoing(const NBEdge *incoming, SVCPermissions vehPerm, EdgeVector::const_iterator start, bool clockwise) const
Definition: NBNode.cpp:1911
NBNode::myAllEdges
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
Definition: NBNode.h:823
NBNode::getWalkingAreas
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
Definition: NBNode.h:678
NBNode::computeLanes2Lanes
void computeLanes2Lanes()
computes the connections of lanes to edges
Definition: NBNode.cpp:1030
NBNode::getPossiblySplittedOutgoing
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
get possibly splitted outgoing edge
Definition: NBNode.cpp:1594
NBNode::isTLControlled
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition: NBNode.h:317
NBNode::WalkingAreaCustomShape::edges
std::set< const NBEdge *, ComparatorIdLess > edges
Definition: NBNode.h:203
NBNode::getOppositeIncoming
NBEdge * getOppositeIncoming(NBEdge *e) const
returns the opposite incoming edge of certain edge
Definition: NBNode.cpp:1546
NBNode::reshiftPosition
void reshiftPosition(double xoff, double yoff)
Applies an offset to the node.
Definition: NBNode.cpp:330
NBNodeTypeComputer
Definition: NBAlgorithms.h:203
NBNode::myCrossingsLoadedFromSumoNet
int myCrossingsLoadedFromSumoNet
number of crossings loaded from a sumo net
Definition: NBNode.h:871
NBNode::discardAllCrossings
void discardAllCrossings(bool rejectAll)
discard all current (and optionally future) crossings
Definition: NBNode.cpp:2473
NBNode::WalkingArea::WalkingArea
WalkingArea(const std::string &_id, double _width)
constructor
Definition: NBNode.h:173
NBNode::Crossing::prevWalkingArea
std::string prevWalkingArea
the lane-id of the previous walkingArea
Definition: NBNode.h:148
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:219
NBNode::invalidateIncomingConnections
void invalidateIncomingConnections()
invalidate incoming connections
Definition: NBNode.cpp:1665
NBNode::typeWasGuessed
bool typeWasGuessed() const
return whether a priority road turns at this node
Definition: NBNode.h:768
NBNode::WalkingArea::nextSidewalks
std::vector< std::string > nextSidewalks
the lane-id of the next sidewalk lane or ""
Definition: NBNode.h:191
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:786
NBNode::WalkingAreaCustomShape::shape
PositionVector shape
Definition: NBNode.h:204
SumoXMLNodeType
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
Definition: SUMOXMLDefinitions.h:1049
NBNode::getRadius
double getRadius() const
Returns the turning radius of this node.
Definition: NBNode.h:281
Named.h
NBNode::getConnectionIndex
int getConnectionIndex(const NBEdge *from, const NBEdge::Connection &con) const
return the index of the given connection
Definition: NBNode.cpp:3175
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:3375
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:408
NBNode::mirrorX
void mirrorX()
mirror coordinates along the x-axis
Definition: NBNode.cpp:340
NBNode::setCrossingTLIndices
bool setCrossingTLIndices(const std::string &tlID, int startIndex)
Definition: NBNode.cpp:3144
NBNode::myFringeType
FringeType myFringeType
fringe type of this node
Definition: NBNode.h:865
NBNode::removeTrafficLight
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
Definition: NBNode.cpp:369
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:1936
NBNode::myKeepClear
bool myKeepClear
whether the junction area must be kept clear
Definition: NBNode.h:859
NBNode::edge_by_direction_sorter
Sorts outgoing before incoming edges.
Definition: NBNode.h:730
NBNode::Crossing::priority
bool priority
whether the pedestrians have priority
Definition: NBNode.h:152
NBNode::setRoundabout
void setRoundabout()
update the type of this node as a roundabout
Definition: NBNode.cpp:3081
NBNode::numNormalConnections
int numNormalConnections() const
return the number of lane-to-lane connections at this junction (excluding crossings)
Definition: NBNode.cpp:3160
NBNode::myDisplacementError
double myDisplacementError
geometry error after computation of internal lane shapes
Definition: NBNode.h:874
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
NBNode::removeTrafficLights
void removeTrafficLights()
Removes all references to traffic lights that control this tls.
Definition: NBNode.cpp:376
NBNode::addTrafficLight
void addTrafficLight(NBTrafficLightDefinition *tlDef)
Adds a traffic light to the list of traffic lights that control this node.
Definition: NBNode.cpp:359
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:1701
NBNode::myHaveCustomPoly
bool myHaveCustomPoly
whether this nodes shape was set by the user
Definition: NBNode.h:847
NBNode::invalidateOutgoingConnections
void invalidateOutgoingConnections()
invalidate outgoing connections
Definition: NBNode.cpp:1673
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
PositionVector::EMPTY
static const PositionVector EMPTY
empty Vector
Definition: PositionVector.h:74
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:269
NBNode::setCustomShape
void setCustomShape(const PositionVector &shape)
set the junction shape
Definition: NBNode.cpp:2149
NBConnection
Definition: NBConnection.h:44
NBNode::SCURVE_IGNORE
static const int SCURVE_IGNORE
Definition: NBNode.h:219
NBNode::WalkingArea::prevSidewalks
std::vector< std::string > prevSidewalks
the lane-id of the previous sidewalk lane or ""
Definition: NBNode.h:193
NBNode::setRadius
void setRadius(double radius)
set the turning radius
Definition: NBNode.h:510
NBNode::getCrossingsIncludingInvalid
const std::vector< Crossing * > & getCrossingsIncludingInvalid() const
Definition: NBNode.h:673
NBNode::WalkingArea::minNextCrossingEdges
int minNextCrossingEdges
minimum number of edges crossed by nextCrossings
Definition: NBNode.h:197
NBNode::getCrossings
std::vector< Crossing * > getCrossings() const
return this junctions pedestrian crossings
Definition: NBNode.cpp:2455
NBNode::myDiscardAllCrossings
bool myDiscardAllCrossings
whether to discard all pedestrian crossings
Definition: NBNode.h:868
NBNode::removeEdge
void removeEdge(NBEdge *edge, bool removeFromConnections=true)
Removes edge from this node and optionally removes connections as well.
Definition: NBNode.cpp:1607
DEG2RAD
#define DEG2RAD(x)
Definition: GeomHelper.h:38
NBNode::hasCustomShape
bool hasCustomShape() const
return whether the shape was set by the user
Definition: NBNode.h:530
NBNode::Crossing::customTLIndex
int customTLIndex
the custom traffic light index of this crossing (if controlled)
Definition: NBNode.h:159
NBNode::ApproachingDivider::numAvailableLanes
int numAvailableLanes() const
@ get number of avaliable lanes
Definition: NBNode.h:100
NBNode::myDistrict
NBDistrict * myDistrict
The district the node is the centre of.
Definition: NBNode.h:841
NBNode::myOutgoingEdges
EdgeVector myOutgoingEdges
Vector of outgoing edges.
Definition: NBNode.h:820
NBNode::myCrossings
std::vector< Crossing * > myCrossings
Vector of crossings.
Definition: NBNode.h:826
NBNode::myTypeWasGuessed
bool myTypeWasGuessed
whether the node type was guessed rather than loaded
Definition: NBNode.h:882
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:40
NBNode::avoidOverlap
void avoidOverlap()
fix overlap
Definition: NBNode.cpp:3255
NBNode::discardWalkingareas
void discardWalkingareas()
discard previously built walkingareas (required for repeated computation by netedit)
Definition: NBNode.cpp:2486
NBNode::getShape
const PositionVector & getShape() const
retrieve the junction shape
Definition: NBNode.cpp:2143
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:3089
NBNode::Crossing::width
double width
This crossing's width.
Definition: NBNode.h:144
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:3000
NBNode::myPosition
Position myPosition
The position the node lies at.
Definition: NBNode.h:814
NBNode::~NBNode
~NBNode()
Destructor.
Definition: NBNode.cpp:298
NBNode::Crossing::tlLinkIndex
int tlLinkIndex
the traffic light index of this crossing (if controlled)
Definition: NBNode.h:156
NBNode::Crossing::customShape
PositionVector customShape
optional customShape for this crossing
Definition: NBNode.h:154
NBNode::removeJoinedTrafficLights
void removeJoinedTrafficLights()
remove all traffic light definitions that are part of a joined tls
Definition: NBNode.cpp:894
NBNode::remapRemoved
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
remap removed
Definition: NBNode.cpp:1830
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:55
NBNode::buildWalkingAreas
void buildWalkingAreas(int cornerDetail)
build pedestrian walking areas and set connections from/to walkingAreas
Definition: NBNode.cpp:2612
NBNode::geometryLike
bool geometryLike() const
whether this is structurally similar to a geometry node
Definition: NBNode.cpp:3046
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:322
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:1681
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:1813
NBNode::AVOID_INTERSECTING_LEFT_TURNS
static const int AVOID_INTERSECTING_LEFT_TURNS
Definition: NBNode.h:218
NBNode::getFringeType
FringeType getFringeType() const
Returns fringe type.
Definition: NBNode.h:296
RightOfWay
RightOfWay
algorithms for computing right of way
Definition: SUMOXMLDefinitions.h:1099
NBNode::WalkingArea::width
double width
This lane's width.
Definition: NBNode.h:183
NBNode::Crossing::customTLIndex2
int customTLIndex2
Definition: NBNode.h:160
NBNode::myWalkingAreas
std::vector< WalkingArea > myWalkingAreas
Vector of walking areas.
Definition: NBNode.h:829
NBNode::numCrossingsFromSumoNet
int numCrossingsFromSumoNet() const
get num of crossings from sumo net
Definition: NBNode.h:667
NBNode::getIncomingEdges
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
Definition: NBNode.h:259
NBNode::NBNode
NBNode(const std::string &id, const Position &position, SumoXMLNodeType type)
Constructor.
Definition: NBNode.cpp:253
NBNode::UNSPECIFIED_RADIUS
static const double UNSPECIFIED_RADIUS
unspecified lane width
Definition: NBNode.h:212
NBNode::isLongEnough
static bool isLongEnough(NBEdge *out, double minLength)
check if is long enough
Definition: NBNode.cpp:1353
NBNode::isTrafficLight
static bool isTrafficLight(SumoXMLNodeType type)
return whether the given type is a traffic light
Definition: NBNode.cpp:3270
NBNode::FOUR_CONTROL_POINTS
static const int FOUR_CONTROL_POINTS
Definition: NBNode.h:217
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:469
NBNode::Crossing::node
const NBNode * node
The parent node of this crossing.
Definition: NBNode.h:136
NBNode::removeDoubleEdges
void removeDoubleEdges()
remove duble edges
Definition: NBNode.cpp:1496
NBNode::myRadius
double myRadius
the turning radius (for all corners) at this node in m.
Definition: NBNode.h:856
NBNode::nodes_by_id_sorter::operator()
int operator()(NBNode *n1, NBNode *n2) const
Comparing operator.
Definition: NBNode.h:722
NBNode::sortEdges
void sortEdges(bool useNodeShape)
sort all edge containers for this node
Definition: NBNode.cpp:3291
NBNode::Crossing::edges
EdgeVector edges
The edges being crossed.
Definition: NBNode.h:138
NBNode::ApproachingDivider::myIsBikeEdge
bool myIsBikeEdge
whether the outgoing edge is exclusively used by bikes
Definition: NBNode.h:121
NBNode::AVOID_WIDE_LEFT_TURN
static const int AVOID_WIDE_LEFT_TURN
Definition: NBNode.h:216
NBNode::getCrossing
Crossing * getCrossing(const std::string &id) const
return the crossing with the given id
Definition: NBNode.cpp:3116
NBNode::WalkingArea::length
double length
This lane's width.
Definition: NBNode.h:185
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:1637
NBNode::myIncomingEdges
EdgeVector myIncomingEdges
Vector of incoming edges.
Definition: NBNode.h:817
NBNode::setKeepClear
void setKeepClear(bool keepClear)
set the keepClear flag
Definition: NBNode.h:515
NBNode::setFringeType
void setFringeType(FringeType fringeType)
set method for computing right-of-way
Definition: NBNode.h:525
NBNode::hasIncoming
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
Definition: NBNode.cpp:1534
NBNode::guessCrossings
int guessCrossings()
guess pedestrian crossings and return how many were guessed
Definition: NBNode.cpp:2209
config.h
NBNode::getEdgesSortedByAngleAtNodeCenter
EdgeVector getEdgesSortedByAngleAtNodeCenter() const
returns the list of all edges sorted clockwise by getAngleAtNodeToCenter
Definition: NBNode.cpp:3212
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:884
StdDefs.h
NBNode::Crossing::nextWalkingArea
std::string nextWalkingArea
the lane-id of the next walkingArea
Definition: NBNode.h:150
NBNode::myPoly
PositionVector myPoly
the (outer) shape of the junction
Definition: NBNode.h:844
NBNode::invalidateTLS
void invalidateTLS(NBTrafficLightLogicCont &tlCont, bool removedConnections, bool addedConnections)
causes the traffic light to be computed anew
Definition: NBNode.cpp:385
NBNode::computeLogic
void computeLogic(const NBEdgeCont &ec, OptionsCont &oc)
computes the node's type, logic and traffic light
Definition: NBNode.cpp:908
NBNode::BACKWARD
static const int BACKWARD
Definition: NBNode.h:209
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:832
Bresenham::BresenhamCallBack
Definition: Bresenham.h:44
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:68
NBNode::ApproachingDivider
Computes lane-2-lane connections.
Definition: NBNode.h:88
NBNode::removeSelfLoops
int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
Definition: NBNode.cpp:416
GNEJunction
Definition: GNEJunction.h:48
NBNode::getPossiblySplittedIncoming
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
get possibly splitted incoming edge
Definition: NBNode.cpp:1581
NBNode::Crossing
A definition of a pedestrian crossing.
Definition: NBNode.h:132
NBNode::AVOID_WIDE_RIGHT_TURN
static const int AVOID_WIDE_RIGHT_TURN
flags for controlling shape generation
Definition: NBNode.h:215
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:184
NBNode::getCenter
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
Definition: NBNode.cpp:3194
NBNode::myRightOfWay
RightOfWay myRightOfWay
how to compute right of way for this node
Definition: NBNode.h:862
NBNode::getRightOfWay
RightOfWay getRightOfWay() const
Returns hint on how to compute right of way.
Definition: NBNode.h:291
NBNode::buildInnerEdges
void buildInnerEdges()
build internal lanes, pedestrian crossings and walking areas
Definition: NBNode.cpp:2492
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:77
PositionVector.h
NBNode::Crossing::tlID
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBNode.h:162
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:166
NBDistrict
A class representing a single district.
Definition: NBDistrict.h:65
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:479
NBNode::WalkingArea::id
std::string id
the (edge)-id of this walkingArea
Definition: NBNode.h:181
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:164
NBNode::getFoes
const std::string getFoes(int linkIndex) const
Definition: NBNode.cpp:971
SUMOXMLDefinitions.h
NBNode::buildCrossingsAndWalkingAreas
void buildCrossingsAndWalkingAreas()
build crossings, and walkingareas. Also removes invalid loaded crossings if wished
Definition: NBNode.cpp:2432
NBNode::WalkingArea::nextCrossings
std::vector< std::string > nextCrossings
the lane-id of the next crossing(s)
Definition: NBNode.h:189
NBNode::ApproachingDivider::myCurrentOutgoing
NBEdge * myCurrentOutgoing
The approached current edge.
Definition: NBNode.h:115
NBNode::Crossing::customWidth
double customWidth
This crossing's width.
Definition: NBNode.h:142
NBNode::isDistrict
bool isDistrict() const
check if node is a district
Definition: NBNode.cpp:2203
NBNode::checkCrossingDuplicated
bool checkCrossingDuplicated(EdgeVector edges)
return true if there already exist a crossing with the same edges as the input
Definition: NBNode.cpp:2404
NBNode::reinit
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
Definition: NBNode.cpp:304
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition: NBTrafficLightDefinition.h:68
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:3021
NBNode::computeNodeShape
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
Definition: NBNode.cpp:991
NBNode::markBentPriority
void markBentPriority(bool isBent)
mark whether a priority road turns at this node
Definition: NBNode.h:758
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:1428
NBNodeShapeComputer
This class computes shapes of junctions.
Definition: NBNodeShapeComputer.h:45
NBNode::isNearDistrict
bool isNearDistrict() const
@chech if node is near district
Definition: NBNode.cpp:2172