SUMO - Simulation of Urban MObility
NBNode.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // The representation of a single node
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef NBNode_h
24 #define NBNode_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <vector>
37 #include <deque>
38 #include <utility>
39 #include <string>
40 #include <set>
41 #include <utils/common/StdDefs.h>
42 #include <utils/common/Named.h>
43 #include <utils/geom/Bresenham.h>
45 #include <utils/geom/Position.h>
46 #include <utils/geom/Line.h>
49 #include "NBEdge.h"
50 #include "NBConnection.h"
51 #include "NBConnectionDefs.h"
52 #include "NBContHelper.h"
53 
54 
55 // ===========================================================================
56 // class declarations
57 // ===========================================================================
58 class NBRequest;
59 class NBDistrict;
60 class OptionsCont;
62 class NBTypeCont;
64 class NBDistrictCont;
65 class OutputDevice;
66 
67 
68 // ===========================================================================
69 // class definitions
70 // ===========================================================================
75 class NBNode : public Named {
76  friend class NBNodeCont;
77  friend class GNEJunction; // < used for visualization (NETEDIT)
78  friend class NBNodesEdgesSorter; // < sorts the edges
79  friend class NBNodeTypeComputer; // < computes type
80  friend class NBEdgePriorityComputer; // < computes priorities of edges per intersection
81 
82 public:
95  private:
98 
101 
103  std::vector<unsigned int> myAvailableLanes;
104 
105  public:
110  ApproachingDivider(EdgeVector* approaching,
111  NBEdge* currentOutgoing, const bool buildCrossingsAndWalkingAreas);
112 
115 
116  unsigned int numAvailableLanes() const {
117  return (unsigned int)myAvailableLanes.size();
118  }
119 
121  void execute(const unsigned int src, const unsigned int dest);
122 
125  std::deque<int>* spread(const std::vector<int>& approachingLanes, int dest) const;
126 
127  };
128 
132  struct Crossing {
133  Crossing(const NBNode* _node, const EdgeVector& _edges, SUMOReal _width, bool _priority) :
134  node(_node), edges(_edges), width(_width), priority(_priority), tlLinkNo(-1)
135  {}
137  const NBNode* node;
145  std::string id;
147  std::string prevWalkingArea;
149  std::string nextWalkingArea;
151  bool priority;
153  int tlLinkNo;
154  };
155 
156 
160  struct WalkingArea {
161  WalkingArea(const std::string& _id, SUMOReal _width) :
162  id(_id),
163  width(_width),
164  nextCrossing(""),
165  tlID("")
166  {}
168  std::string id;
176  std::string nextCrossing;
178  std::string tlID;
180  std::vector<std::string> nextSidewalks;
182  std::vector<std::string> prevSidewalks;
183  };
184 
186  static const int FORWARD;
187  static const int BACKWARD;
190 
191 
192 public:
194  static const int MAX_CONNECTIONS;
195 
201  NBNode(const std::string& id, const Position& position, SumoXMLNodeType type);
202 
203 
209  NBNode(const std::string& id, const Position& position, NBDistrict* district = 0);
210 
211 
213  ~NBNode();
214 
215 
222  void reinit(const Position& position, SumoXMLNodeType type,
223  bool updateEdgeGeometries = false);
224 
225 
228 
232  const Position& getPosition() const {
233  return myPosition;
234  }
235 
236 
238  Position getCenter() const;
239 
240 
244  const EdgeVector& getIncomingEdges() const {
245  return myIncomingEdges;
246  }
247 
248 
252  const EdgeVector& getOutgoingEdges() const {
253  return myOutgoingEdges;
254  }
255 
256 
260  const EdgeVector& getEdges() const {
261  return myAllEdges;
262  }
263 
264 
270  return myType;
271  }
273 
274 
275 
278 
283 
286 
289  void removeTrafficLights();
290 
291 
295  bool isTLControlled() const {
296  return myTrafficLights.size() != 0;
297  }
298 
299 
303  bool isJoinedTLSControlled() const;
304 
305 
309  const std::set<NBTrafficLightDefinition*>& getControllingTLS() const {
310  return myTrafficLights;
311  }
312 
313 
316 
318  void shiftTLConnectionLaneIndex(NBEdge* edge, int offset);
320 
321 
322 
325 
337 
338 
339 
342 
347  void reshiftPosition(SUMOReal xoff, SUMOReal yoff);
349 
350 
351 
353  void addIncomingEdge(NBEdge* edge);
354 
356  void addOutgoingEdge(NBEdge* edge);
357 
358 
359 
360 
362  void computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas);
363 
365  void computeLogic(const NBEdgeCont& ec, OptionsCont& oc);
366 
369  bool writeLogic(OutputDevice& into, const bool checkLaneFoes) const;
370 
373  Position getEmptyDir() const;
374 
375 
380  bool hasIncoming(const NBEdge* const e) const;
381 
382 
387  bool hasOutgoing(const NBEdge* const e) const;
388 
389 
390  NBEdge* getOppositeIncoming(NBEdge* e) const;
393 
394  void removeDoubleEdges();
395  NBEdge* getConnectionTo(NBNode* n) const;
396 
397 
398  void addSortedLinkFoes(const NBConnection& mayDrive,
399  const NBConnection& mustStop);
400 
401  NBEdge* getPossiblySplittedIncoming(const std::string& edgeid);
402  NBEdge* getPossiblySplittedOutgoing(const std::string& edgeid);
403 
406  void removeEdge(NBEdge* edge, bool removeFromConnections = true);
407 
417  bool isLeftMover(const NBEdge* const from, const NBEdge* const to) const;
418 
419 
426  bool mustBrake(const NBEdge* const from, const NBEdge* const to, int toLane) const;
427 
434  bool mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const Crossing& crossing) const;
435 
444  bool forbids(const NBEdge* const possProhibitorFrom, const NBEdge* const possProhibitorTo,
445  const NBEdge* const possProhibitedFrom, const NBEdge* const possProhibitedTo,
446  bool regardNonSignalisedLowerPriority) const;
447 
448 
456  bool foes(const NBEdge* const from1, const NBEdge* const to1,
457  const NBEdge* const from2, const NBEdge* const to2) const;
458 
459 
465  LinkDirection getDirection(const NBEdge* const incoming, const NBEdge* const outgoing) const;
466 
467  LinkState getLinkState(const NBEdge* incoming, NBEdge* outgoing,
468  int fromLane, bool mayDefinitelyPass, const std::string& tlID) const;
469 
474  void computeNodeShape(bool leftHand, SUMOReal mismatchThreshold);
475 
477  const PositionVector& getShape() const;
478 
480  void setCustomShape(const PositionVector& shape);
481 
483  bool hasCustomShape() {
484  return myHaveCustomPoly;
485  }
486 
487  bool checkIsRemovable() const;
488 
489 
490  std::vector<std::pair<NBEdge*, NBEdge*> > getEdgesToJoin() const;
491 
492 
493  friend class NBNodeShapeComputer;
494 
495  bool isNearDistrict() const;
496  bool isDistrict() const;
497 
498  bool needsCont(NBEdge* fromE, NBEdge* toE, NBEdge* otherFromE, NBEdge* otherToE, const NBEdge::Connection& c) const;
499 
509  NBEdge* fromE, int fromL, NBEdge* toE, int toL, int numPoints = 5) const;
510 
511 
514  void replaceIncoming(NBEdge* which, NBEdge* by, unsigned int laneOff);
515 
518  void replaceIncoming(const EdgeVector& which, NBEdge* by);
519 
522  void replaceOutgoing(NBEdge* which, NBEdge* by, unsigned int laneOff);
523 
526  void replaceOutgoing(const EdgeVector& which, NBEdge* by);
527 
529  int guessCrossings();
530 
531  /* @brief check whether a crossing should be build for the candiate edges and build 0 to n crossings
532  * @param[in] candidates The candidate vector of edges to be crossed
533  * @return The number of crossings built
534  * */
535  int checkCrossing(EdgeVector candidates);
536 
538  void buildInnerEdges(bool buildCrossingsAndWalkingAreas);
539 
540  /* @brief build pedestrian crossings
541  * @return The next index for creating internal lanes
542  * */
543  unsigned int buildCrossings();
544 
545  /* @brief build pedestrian walking areas and set connections from/to walkingAreas
546  * @param[in] index The starting index for naming the created internal lanes
547  * @param[in] tlIndex The starting traffic light index to assign to connections to controlled crossings
548  * */
549  void buildWalkingAreas();
550 
552  EdgeVector edgesBetween(const NBEdge* e1, const NBEdge* e2) const;
553 
555  bool crossingBetween(const NBEdge* e1, const NBEdge* e2) const;
556 
558  return myBlockedConnections;
559  }
560 
563  bool geometryLike() const;
564 
566  void setRoundabout();
567 
569  void addCrossing(EdgeVector edges, SUMOReal width, bool priority);
570 
572  inline const std::vector<Crossing>& getCrossings() const {
573  return myCrossings;
574  }
575 
577  inline const std::vector<WalkingArea>& getWalkingAreas() const {
578  return myWalkingAreas;
579  }
580 
582  const Crossing& getCrossing(const std::string& id) const;
583 
585  void setCrossingTLIndices(unsigned int startIndex);
586 
588  int numNormalConnections() const;
589 
595  public:
597  explicit nodes_by_id_sorter() { }
598 
601  int operator()(NBNode* n1, NBNode* n2) const {
602  return n1->getID() < n2->getID();
603  }
604 
605  };
606 
607 
612  public:
614  int operator()(NBEdge* e1, NBEdge* e2) const {
615  UNUSED_PARAMETER(e2);
616  return e1->getFromNode() == myNode;
617  }
618 
619  private:
622 
623  };
624 
625 private:
626  bool isSimpleContinuation() const;
627 
630 
633  EdgeVector* getEdgesThatApproach(NBEdge* currentOutgoing);
634 
635 
636 
637 
639  unsigned int whichLaneOff, unsigned int byLaneOff);
640 
641 
643  NBEdge* removed, const EdgeVector& incoming, const EdgeVector& outgoing);
644 
645 
646 private:
649 
652 
655 
658 
660  std::vector<Crossing> myCrossings;
661 
663  std::vector<WalkingArea> myWalkingAreas;
664 
667 
670 
673 
676 
679 
681 
682  std::set<NBTrafficLightDefinition*> myTrafficLights;
683 
684 private:
686  NBNode(const NBNode& s);
687 
689  NBNode& operator=(const NBNode& s);
690 
691 
692 };
693 
694 
695 #endif
696 
697 /****************************************************************************/
698 
void replaceIncoming(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of incoming by the second Connections are remap...
Definition: NBNode.cpp:851
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges.
Definition: NBNode.h:244
Position getEmptyDir() const
Returns something like the most unused direction Should only be used to add source or sink nodes...
Definition: NBNode.cpp:1057
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:148
void setRoundabout()
update the type of this node as a roundabout
Definition: NBNode.cpp:1992
std::vector< Crossing > myCrossings
Vector of crossings.
Definition: NBNode.h:660
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
Definition: NBNode.cpp:2030
SUMOReal width
This lane's width.
Definition: NBNode.h:143
void shiftTLConnectionLaneIndex(NBEdge *edge, int offset)
patches loaded signal plans by modifying lane indices
Definition: NBNode.cpp:349
std::string id
the (edge)-id of this crossing
Definition: NBNode.h:145
bool isDistrict() const
Definition: NBNode.cpp:1452
PositionVector myPoly
the (outer) shape of the junction
Definition: NBNode.h:675
NBEdge * getOppositeIncoming(NBEdge *e) const
Definition: NBNode.cpp:970
const NBConnectionProhibits & getProhibitions()
Definition: NBNode.h:557
void execute(const unsigned int src, const unsigned int dest)
Definition: NBNode.cpp:129
SumoXMLNodeType myType
The type of the junction.
Definition: NBNode.h:666
A container for traffic light definitions and built programs.
SUMOReal length
This lane's width.
Definition: NBNode.h:172
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
Definition: NBNode.cpp:255
SUMOReal width
This lane's width.
Definition: NBNode.h:170
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition: NBNode.h:295
~NBNode()
Destructor.
Definition: NBNode.cpp:249
PositionVector computeInternalLaneShape(NBEdge *fromE, int fromL, NBEdge *toE, int toL, int numPoints=5) const
Compute the shape for an internal lane.
Definition: NBNode.cpp:449
This class computes shapes of junctions.
const Crossing & getCrossing(const std::string &id) const
return the crossing with the given id
Definition: NBNode.cpp:2006
void removeEdge(NBEdge *edge, bool removeFromConnections=true)
Removes edge from this node and optionally removes connections as well.
Definition: NBNode.cpp:1031
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
Definition: NBNode.cpp:400
The representation of a single edge during network building.
Definition: NBEdge.h:71
int numNormalConnections() const
return the number of lane-to-lane connections at this junction (excluding crossings) ...
Definition: NBNode.cpp:2025
ApproachingDivider(EdgeVector *approaching, NBEdge *currentOutgoing, const bool buildCrossingsAndWalkingAreas)
Constructor.
Definition: NBNode.cpp:95
void addCrossing(EdgeVector edges, SUMOReal width, bool priority)
add a pedestrian crossing to this node
Definition: NBNode.cpp:2000
bool mustBrake(const NBEdge *const from, const NBEdge *const to, int toLane) const
Returns the information whether the described flow must let any other flow pass.
Definition: NBNode.cpp:1101
Used for sorting the cells by the begin time they describe.
Definition: NBNode.h:594
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
Definition: NBNode.cpp:964
A container for districts.
const std::vector< Crossing > & getCrossings() const
return this junctions pedestrian crossings
Definition: NBNode.h:572
The base class for traffic light logic definitions.
EdgeVector edgesBetween(const NBEdge *e1, const NBEdge *e2) const
return all edges that lie clockwise between the given edges
Definition: NBNode.cpp:1951
bool isJoinedTLSControlled() const
Returns whether this node is controlled by a tls that spans over more than one node.
Definition: NBNode.cpp:314
void removeDoubleEdges()
Definition: NBNode.cpp:919
PositionVector shape
The lane's shape.
Definition: NBNode.h:141
edge_by_direction_sorter(NBNode *n)
Definition: NBNode.h:613
static const int MAX_CONNECTIONS
maximum number of connections allowed
Definition: NBNode.h:194
friend class GNEJunction
Definition: NBNode.h:77
std::string id
the (edge)-id of this walkingArea
Definition: NBNode.h:168
bool checkIsRemovable() const
Definition: NBNode.cpp:1316
void computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas)
computes the connections of lanes to edges
Definition: NBNode.cpp:682
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
Definition: NBNode.cpp:298
void setCustomShape(const PositionVector &shape)
set the junction shape
Definition: NBNode.cpp:1403
NBConnectionProhibits myBlockedConnections
Definition: NBNode.h:669
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
Definition: NBNode.cpp:958
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
Definition: NBNode.cpp:410
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:39
unsigned int numAvailableLanes() const
Definition: NBNode.h:116
bool priority
whether the pedestrians have priority
Definition: NBNode.h:151
NBRequest * myRequest
Definition: NBNode.h:680
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
NBDistrict * myDistrict
The district the node is the centre of.
Definition: NBNode.h:672
A class representing a single district.
Definition: NBDistrict.h:72
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges.
Definition: NBNode.h:252
const std::string & getID() const
Returns the id.
Definition: Named.h:60
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
Definition: NBNode.h:657
void invalidateIncomingConnections()
Definition: NBNode.cpp:1085
void setPriorityJunctionPriorities()
sets the priorites in case of a priority junction
const Position & getPosition() const
Returns the position of this node.
Definition: NBNode.h:232
std::string prevWalkingArea
the lane-id of the previous walkingArea
Definition: NBNode.h:147
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
Definition: NBNode.cpp:1005
void computeNodeShape(bool leftHand, SUMOReal mismatchThreshold)
Compute the junction shape for this node.
Definition: NBNode.cpp:650
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node.
Definition: NBNode.h:309
bool isSimpleContinuation() const
Definition: NBNode.cpp:420
int checkCrossing(EdgeVector candidates)
Definition: NBNode.cpp:1530
static const int FORWARD
edge directions (for pedestrian related stuff)
Definition: NBNode.h:186
std::vector< unsigned int > myAvailableLanes
The available lanes to which connections shall be built.
Definition: NBNode.h:103
int operator()(NBNode *n1, NBNode *n2) const
Comparing operator.
Definition: NBNode.h:601
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
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:1124
A list of positions.
bool needsCont(NBEdge *fromE, NBEdge *toE, NBEdge *otherFromE, NBEdge *otherToE, const NBEdge::Connection &c) const
Definition: NBNode.cpp:573
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:269
bool geometryLike() const
whether this is structurally similar to a geometry node
Definition: NBNode.cpp:1967
void invalidateOutgoingConnections()
Definition: NBNode.cpp:1093
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void removeTrafficLights()
Removes all references to traffic lights that control this tls.
Definition: NBNode.cpp:305
EdgeVector * getEdgesThatApproach(NBEdge *currentOutgoing)
Definition: NBNode.cpp:792
const EdgeVector & getEdges() const
Returns all edges which participate in this node.
Definition: NBNode.h:260
std::set< NBTrafficLightDefinition * > myTrafficLights
Definition: NBNode.h:682
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
std::string nextCrossing
the lane-id of the next crossing
Definition: NBNode.h:176
void setCrossingTLIndices(unsigned int startIndex)
set tl indices of this nodes crossing starting at the given index
Definition: NBNode.cpp:2017
NBNode * myNode
The node to compute the relative angle of.
Definition: NBNode.h:621
const PositionVector & getShape() const
retrieve the junction shape
Definition: NBNode.cpp:1397
NBEdge * getConnectionTo(NBNode *n) const
Definition: NBNode.cpp:1410
EdgeVector myIncomingEdges
Vector of incoming edges.
Definition: NBNode.h:651
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:1130
Base class for objects which have an id.
Definition: Named.h:45
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
Definition: NBNode.cpp:1373
int operator()(NBEdge *e1, NBEdge *e2) const
Definition: NBNode.h:614
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
Definition: NBNode.cpp:1018
unsigned int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
Definition: NBNode.cpp:357
EdgeVector myOutgoingEdges
Vector of outgoing edges.
Definition: NBNode.h:654
NBEdge * myCurrentOutgoing
The approached current edge.
Definition: NBNode.h:100
static const int BACKWARD
Definition: NBNode.h:187
nodes_by_id_sorter()
Constructor.
Definition: NBNode.h:597
void addTrafficLight(NBTrafficLightDefinition *tlDef)
Adds a traffic light to the list of traffic lights that control this node.
Definition: NBNode.cpp:289
bool isNearDistrict() const
Definition: NBNode.cpp:1421
bool myHaveCustomPoly
whether this nodes shape was set by the user
Definition: NBNode.h:678
Position myPosition
The position the node lies at.
Definition: NBNode.h:648
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
void replaceOutgoing(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of outgoing by the second Connections are remap...
Definition: NBNode.cpp:815
~ApproachingDivider()
Destructor.
Definition: NBNode.cpp:125
std::vector< WalkingArea > myWalkingAreas
Vector of walking areas.
Definition: NBNode.h:663
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass, const std::string &tlID) const
Definition: NBNode.cpp:1293
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
unsigned int buildCrossings()
Definition: NBNode.cpp:1656
Sorts outgoing before incoming edges.
Definition: NBNode.h:611
int tlLinkNo
the traffic light index of this crossing (if controlled)
Definition: NBNode.h:153
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, unsigned int whichLaneOff, unsigned int byLaneOff)
Definition: NBNode.cpp:884
std::vector< NBEdge * > EdgeVector
Definition: NBCont.h:38
void buildWalkingAreas()
Definition: NBNode.cpp:1687
std::string tlID
the traffic light id of the next crossing or ""
Definition: NBNode.h:178
NBNode & operator=(const NBNode &s)
invalidated assignment operator
A definition of a pedestrian walking area.
Definition: NBNode.h:160
EdgeVector * myApproaching
The list of edges that approach the current edge.
Definition: NBNode.h:97
A storage for options typed value containers)
Definition: OptionsCont.h:108
const NBNode * node
The parent node of this crossing.
Definition: NBNode.h:137
static const SUMOReal DEFAULT_CROSSING_WIDTH
default width of pedetrian crossings
Definition: NBNode.h:189
std::deque< int > * spread(const std::vector< int > &approachingLanes, int dest) const
Definition: NBNode.cpp:155
EdgeVector edges
The edges being crossed.
Definition: NBNode.h:139
bool crossingBetween(const NBEdge *e1, const NBEdge *e2) const
return true if the given edges are connected by a crossing
Definition: NBNode.cpp:1934
Represents a single node (junction) during network building.
Definition: NBNode.h:75
int guessCrossings()
guess pedestrian crossings and return how many were guessed
Definition: NBNode.cpp:1458
A definition of a pedestrian crossing.
Definition: NBNode.h:132
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
Definition: NBNode.cpp:988
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:215
Computes lane-2-lane connections.
Definition: NBNode.h:94
bool writeLogic(OutputDevice &into, const bool checkLaneFoes) const
Definition: NBNode.cpp:640
WalkingArea(const std::string &_id, SUMOReal _width)
Definition: NBNode.h:161
void computeLogic(const NBEdgeCont &ec, OptionsCont &oc)
computes the node's type, logic and traffic light
Definition: NBNode.cpp:602
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64
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:1159
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
Definition: NBNode.h:577
void buildInnerEdges(bool buildCrossingsAndWalkingAreas)
build internal lanes, pedestrian crossings and walking areas
Definition: NBNode.cpp:1621
void invalidateTLS(NBTrafficLightLogicCont &tlCont)
causes the traffic light to be computed anew
Definition: NBNode.cpp:328
std::string nextWalkingArea
the lane-id of the next walkingArea
Definition: NBNode.h:149
NBNode(const std::string &id, const Position &position, SumoXMLNodeType type)
Constructor.
Definition: NBNode.cpp:228
std::vector< std::string > prevSidewalks
the lane-id of the previous sidewalk lane or ""
Definition: NBNode.h:182
Crossing(const NBNode *_node, const EdgeVector &_edges, SUMOReal _width, bool _priority)
Definition: NBNode.h:133
std::vector< std::string > nextSidewalks
the lane-id of the next sidewalk lane or ""
Definition: NBNode.h:180
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the node.
Definition: NBNode.cpp:281
bool hasCustomShape()
return whether the shape was set by the user
Definition: NBNode.h:483
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
Definition: NBNode.cpp:1166
PositionVector shape
The polygonal shape.
Definition: NBNode.h:174
A storage for available types of edges.
Definition: NBTypeCont.h:56
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:1149
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing) const
Returns the representation of the described stream's direction.
Definition: NBNode.cpp:1247
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:360