SUMO - Simulation of Urban MObility
NBEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // The representation of a single edge during network building
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NBEdge_h
23 #define NBEdge_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <map>
36 #include <vector>
37 #include <string>
38 #include <set>
39 #include <utils/common/Named.h>
43 #include <utils/geom/Bresenham.h>
47 #include "NBCont.h"
48 #include "NBHelpers.h"
49 #include "NBSign.h"
50 
51 
52 // ===========================================================================
53 // class declarations
54 // ===========================================================================
55 class NBNode;
56 class NBConnection;
57 class NBNodeCont;
58 class NBEdgeCont;
59 class OutputDevice;
60 class GNELane;
61 
62 
63 // ===========================================================================
64 // class definitions
65 // ===========================================================================
70 class NBEdge : public Named, public Parameterised {
72  friend class NBEdgeSuccessorBuilder;
73  friend class NBEdgeCont;
74 
76  friend class GNELane;
77  friend class GNEEdge;
78 
79 public:
80 
103  };
104 
105 
116  };
117 
118 
122  struct Lane {
123  Lane(NBEdge* e, const std::string& _origID) :
126  origID(_origID) {}
140  std::string origID;
141 
142  };
143 
144 
148  struct Connection {
154  Connection(int fromLane_, NBEdge* toEdge_, int toLane_)
155  : fromLane(fromLane_), toEdge(toEdge_), toLane(toLane_),
156  mayDefinitelyPass(false), keepClear(true), haveVia(false) { }
157 
159 
160 
162  int fromLane;
166  int toLane;
168  std::string tlID;
170  int tlLinkNo;
174  bool keepClear;
177 
178 
179  std::string origID;
180 
181  std::string id;
184 
185  bool haveVia;
186  std::string viaID;
189 
190  std::vector<unsigned int> foeInternalLinks;
191  std::string foeIncomingLanes;
192 
194  unsigned int internalLaneIndex;
195 
196  std::string getInternalLaneID() const;
197 
198  };
199 
208 
214  static const SUMOReal ANGLE_LOOKAHEAD;
215 
216 public:
235  NBEdge(const std::string& id,
236  NBNode* from, NBNode* to, std::string type,
237  SUMOReal speed, unsigned int nolanes, int priority,
238  SUMOReal width, SUMOReal offset,
239  const std::string& streetName = "",
241 
242 
264  NBEdge(const std::string& id,
265  NBNode* from, NBNode* to, std::string type,
266  SUMOReal speed, unsigned int nolanes, int priority,
267  SUMOReal width, SUMOReal offset,
268  PositionVector geom,
269  const std::string& streetName = "",
270  const std::string& origID = "",
272  bool tryIgnoreNodePositions = false);
273 
285  NBEdge(const std::string& id,
286  NBNode* from, NBNode* to,
287  NBEdge* tpl,
288  const PositionVector& geom = PositionVector(),
289  int numLanes = -1);
290 
291 
294  ~NBEdge();
295 
296 
312  void reinit(NBNode* from, NBNode* to, const std::string& type,
313  SUMOReal speed, unsigned int nolanes, int priority,
314  PositionVector geom, SUMOReal width, SUMOReal offset,
315  const std::string& streetName,
317  bool tryIgnoreNodePositions = false);
318 
323  void reinitNodes(NBNode* from, NBNode* to);
324 
325 
328 
333  void reshiftPosition(SUMOReal xoff, SUMOReal yoff);
334 
336  void mirrorX();
338 
340 
341 
345  unsigned int getNumLanes() const {
346  return (unsigned int) myLanes.size();
347  }
348 
349 
353  int getPriority() const {
354  return myPriority;
355  }
356 
357 
361  NBNode* getFromNode() const {
362  return myFrom;
363  }
364 
365 
369  NBNode* getToNode() const {
370  return myTo;
371  }
372 
373 
378  inline SUMOReal getStartAngle() const {
379  return myStartAngle;
380  }
381 
382 
387  inline SUMOReal getEndAngle() const {
388  return myEndAngle;
389  }
390 
391 
393 
397  inline SUMOReal getTotalAngle() const {
398  return myTotalAngle;
399  }
400 
404  SUMOReal getLength() const {
405  return myLength;
406  }
407 
408 
414  return myLoadedLength > 0 ? myLoadedLength : myLength;
415  }
416 
418  SUMOReal getFinalLength() const;
419 
423  bool hasLoadedLength() const {
424  return myLoadedLength > 0;
425  }
426 
427 
431  SUMOReal getSpeed() const {
432  return mySpeed;
433  }
434 
435 
442  return myStep;
443  }
444 
445 
450  return myLaneWidth;
451  }
452 
456  SUMOReal getLaneWidth(int lane) const;
457 
458 
461  SUMOReal getTotalWidth() const;
462 
465  const std::string& getStreetName() const {
466  return myStreetName;
467  }
468 
471  void setStreetName(const std::string& name) {
472  myStreetName = name;
473  }
474 
479  return myEndOffset;
480  }
481 
485  SUMOReal getEndOffset(int lane) const;
486 
490  return mySignalOffset;
491  }
492 
495  void setSignalOffset(SUMOReal offset) {
496  mySignalOffset = offset;
497  }
498 
502  const std::vector<NBEdge::Lane>& getLanes() const {
503  return myLanes;
504  }
506 
511  int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const;
512  NBEdge::Lane getFirstNonPedestrianLane(int direction) const;
513 
516 
518 
519 
523  const PositionVector& getGeometry() const {
524  return myGeom;
525  }
526 
527 
529  const PositionVector getInnerGeometry() const;
530 
531 
534  bool hasDefaultGeometry() const;
535 
536 
542  bool hasDefaultGeometryEndpoints() const;
543 
544 
555  void setGeometry(const PositionVector& g, bool inner = false);
556 
557 
567  void addGeometryPoint(int index, const Position& p);
568 
572  void shiftPositionAtNode(NBNode* node, NBEdge* opposite);
573 
583  void computeEdgeShape();
584 
585 
589  const PositionVector& getLaneShape(unsigned int i) const;
590 
591 
597 
598 
604  return myLaneSpreadFunction;
605  }
606 
607 
613  bool splitGeometry(NBEdgeCont& ec, NBNodeCont& nc);
614 
615 
619  void reduceGeometry(const SUMOReal minDist);
620 
621 
627  void checkGeometry(const SUMOReal maxAngle, const SUMOReal minRadius, bool fix);
629 
630 
631 
634 
649  bool addEdge2EdgeConnection(NBEdge* dest);
650 
651 
672  bool addLane2LaneConnection(unsigned int fromLane, NBEdge* dest,
673  unsigned int toLane, Lane2LaneInfoType type,
674  bool mayUseSameDestination = false,
675  bool mayDefinitelyPass = false,
676  bool keepClear = true,
677  SUMOReal contPos = UNSPECIFIED_CONTPOS);
678 
679 
697  bool addLane2LaneConnections(unsigned int fromLane,
698  NBEdge* dest, unsigned int toLane, unsigned int no,
699  Lane2LaneInfoType type, bool invalidatePrevious = false,
700  bool mayDefinitelyPass = false);
701 
702 
713  bool setConnection(unsigned int lane, NBEdge* destEdge,
714  unsigned int destLane,
715  Lane2LaneInfoType type,
716  bool mayUseSameDestination = false,
717  bool mayDefinitelyPass = false,
718  bool keepClear = true,
719  SUMOReal contPos = UNSPECIFIED_CONTPOS);
720 
721 
722 
731  std::vector<Connection> getConnectionsFromLane(unsigned int lane) const;
732 
737  Connection getConnection(int fromLane, const NBEdge* to, int toLane) const;
738 
739 
748  bool hasConnectionTo(NBEdge* destEdge, unsigned int destLane, int fromLane = -1) const;
749 
750 
757  bool isConnectedTo(NBEdge* e);
758 
759 
763  const std::vector<Connection>& getConnections() const {
764  return myConnections;
765  }
766 
767 
771  std::vector<Connection>& getConnections() {
772  return myConnections;
773  }
774 
775 
780 
781 
786 
787 
791  std::vector<int> getConnectionLanes(NBEdge* currentOutgoing) const;
792 
793 
797 
798 
802 
803 
809  void remapConnections(const EdgeVector& incoming);
810 
811 
818  void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false);
819 
820  void invalidateConnections(bool reallowSetting = false);
821 
822  void replaceInConnections(NBEdge* which, NBEdge* by, unsigned int laneOff);
823  void replaceInConnections(NBEdge* which, const std::vector<NBEdge::Connection>& origConns);
824  void copyConnectionsFrom(NBEdge* src);
825 
827  void shiftToLanesToEdge(NBEdge* to, unsigned int laneOff);
829 
830 
831 
837  bool isTurningDirectionAt(const NBEdge* const edge) const;
838 
839 
844  void setTurningDestination(NBEdge* e, bool onlyPossible = false);
845 
846 
847 
850 
855  }
856 
857 
861  bool isMacroscopicConnector() const {
863  }
864 
865 
868  void setIsInnerEdge() {
869  myAmInnerEdge = true;
870  }
871 
872 
876  bool isInnerEdge() const {
877  return myAmInnerEdge;
878  }
880 
881 
882 
883 
889  void setJunctionPriority(const NBNode* const node, int prio);
890 
891 
901  int getJunctionPriority(const NBNode* const node) const;
902 
903  void setLoadedLength(SUMOReal val);
905 
906 
907  const std::string& getTypeID() const {
908  return myType;
909  }
910 
912  bool needsLaneSpecificOutput() const;
913 
915  bool hasPermissions() const;
916 
918  bool hasLaneSpecificPermissions() const;
919 
921  bool hasLaneSpecificSpeed() const;
922 
924  bool hasLaneSpecificEndOffset() const;
925 
927  bool hasLaneSpecificWidth() const;
928 
930  bool computeEdge2Edges(bool noLeftMovers);
931 
933  bool computeLanes2Edges();
934 
937  bool recheckLanes();
938 
947  void appendTurnaround(bool noTLSControlled, bool checkPermissions);
948 
949 
950 
954  NBNode* tryGetNodeAtPosition(SUMOReal pos, SUMOReal tolerance = 5.0) const;
955 
956 
958 
959  bool lanesWereAssigned() const;
960 
961  bool mayBeTLSControlled(int fromLane, NBEdge* toEdge, int toLane) const;
962 
964  bool setControllingTLInformation(const NBConnection& c, const std::string& tlID);
965 
968 
970  PositionVector& into);
971 
973  PositionVector getCWBoundaryLine(const NBNode& n) const;
974 
976  PositionVector getCCWBoundaryLine(const NBNode& n) const;
977 
978  bool expandableBy(NBEdge* possContinuation) const;
979  void append(NBEdge* continuation);
980 
981  bool hasSignalisedConnectionTo(const NBEdge* const e) const;
982 
983 
984  void moveOutgoingConnectionsFrom(NBEdge* e, unsigned int laneOff);
985 
986  /* @brief return the turn destination if it exists
987  * @param[in] possibleDestination Wether myPossibleTurnDestination should be returned if no turnaround connection
988  * exists
989  */
990  NBEdge* getTurnDestination(bool possibleDestination = false) const;
991 
992  std::string getLaneID(unsigned int lane) const;
993 
994  std::string getLaneIDInsecure(unsigned int lane) const;
995 
996  SUMOReal getLaneSpeed(unsigned int lane) const;
997 
998  bool isNearEnough2BeJoined2(NBEdge* e, SUMOReal threshold) const;
999 
1000 
1008  SUMOReal getAngleAtNode(const NBNode* const node) const;
1009 
1010 
1019  SUMOReal getAngleAtNodeToCenter(const NBNode* const node) const;
1020 
1021 
1022  void incLaneNo(unsigned int by);
1023 
1024  void decLaneNo(unsigned int by);
1025 
1026  void deleteLane(unsigned int index, bool recompute = true);
1027 
1028  void addLane(unsigned int index, bool recompute = true);
1029 
1030  void markAsInLane2LaneState();
1031 
1033  void addSidewalk(SUMOReal width);
1034 
1036  void addBikeLane(SUMOReal width);
1037 
1039  void setPermissions(SVCPermissions permissions, int lane = -1);
1040 
1041  void setPreferredVehicleClass(SVCPermissions permissions, int lane = -1);
1042 
1044  void allowVehicleClass(int lane, SUMOVehicleClass vclass);
1046  void disallowVehicleClass(int lane, SUMOVehicleClass vclass);
1047 
1048  void preferVehicleClass(int lane, SUMOVehicleClass vclass);
1049 
1050 
1052  void setLaneWidth(int lane, SUMOReal width);
1053 
1055  void setEndOffset(int lane, SUMOReal offset);
1056 
1058  void setSpeed(int lane, SUMOReal speed);
1059 
1061  SVCPermissions getPermissions(int lane = -1) const;
1062 
1063  void disableConnection4TLS(int fromLane, NBEdge* toEdge, int toLane);
1064 
1065 
1066  // returns a reference to the internal structure for the convenience of NETEDIT
1067  Lane& getLaneStruct(unsigned int lane) {
1068  return myLanes[lane];
1069  }
1070 
1071  // returns a reference to the internal structure for the convenience of NETEDIT
1072  const Lane& getLaneStruct(unsigned int lane) const {
1073  return myLanes[lane];
1074  }
1075 
1076  /* declares connections as fully loaded. This is needed to avoid recomputing connections
1077  * if an edge has no connections intentionally. */
1080  }
1081 
1082  /* @brief fill connection attributes shape, viaShape, ...
1083  *
1084  * @param[in,out] edgeIndex The number of connections already handled
1085  * @param[in,out] splitIndex The number of via edges already built
1086  * @param[in] tryIgnoreNodePositions Does not add node geometries if geom.size()>=2
1087  */
1088  void buildInnerEdges(const NBNode& n, unsigned int noInternalNoSplits, unsigned int& linkIndex, unsigned int& splitIndex);
1089 
1090  inline const std::vector<NBSign>& getSigns() const {
1091  return mySigns;
1092  }
1093 
1094  inline void addSign(NBSign sign) {
1095  mySigns.push_back(sign);
1096  }
1097 
1100 
1101 private:
1108  private:
1110  std::map<NBEdge*, std::vector<unsigned int> > myConnections;
1111 
1114 
1115  public:
1118  : myTransitions(transitions) { }
1119 
1122 
1124  void execute(const unsigned int lane, const unsigned int virtEdge);
1125 
1126  const std::map<NBEdge*, std::vector<unsigned int> >& getBuiltConnections() const {
1127  return myConnections;
1128  }
1129 
1130  private:
1133 
1136 
1137  };
1138 
1139 
1148  public:
1150  enum Direction { DIR_RIGHTMOST, DIR_LEFTMOST, DIR_FORWARD };
1151 
1154  std::vector<Direction> myDirs;
1155 
1156  public:
1158  MainDirections(const EdgeVector& outgoing,
1159  NBEdge* parent, NBNode* to);
1160 
1162  ~MainDirections();
1163 
1166  bool empty() const;
1167 
1170  bool includes(Direction d) const;
1171 
1172  private:
1175 
1178 
1179  };
1180 
1182  PositionVector computeLaneShape(unsigned int lane, SUMOReal offset) const;
1183 
1184  void computeLaneShapes();
1185 
1186 
1187 
1188 private:
1205  void init(unsigned int noLanes, bool tryIgnoreNodePositions, const std::string& origID);
1206 
1207 
1209  void divideOnEdges(const EdgeVector* outgoing);
1210  void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector<int>& availableLanes,
1211  const std::vector<unsigned int>* priorities);
1212 
1215  std::vector<unsigned int>* prepareEdgePriorities(
1216  const EdgeVector* outgoing);
1217 
1219  static unsigned int computePrioritySum(const std::vector<unsigned int>& priorities);
1220 
1221 
1224 
1227  void moveConnectionToLeft(unsigned int lane);
1228 
1231  void moveConnectionToRight(unsigned int lane);
1232 
1234  bool canMoveConnection(const Connection& con, unsigned int newFromLane) const;
1236 
1237 
1242  PositionVector startShapeAt(const PositionVector& laneShape, const NBNode* startNode) const;
1243 
1245  void computeAngle();
1246 
1247 
1248  /* @brief compute the first intersection point between the given lane
1249  * geometries considering their rspective widths */
1250  static SUMOReal firstIntersection(const PositionVector& v1, const PositionVector& v2, SUMOReal width2);
1251 
1252 
1254  void addRestrictedLane(SUMOReal width, SUMOVehicleClass vclass);
1255 
1256 private:
1261 
1263  std::string myType;
1264 
1267 
1270 
1275 
1278 
1281 
1285  std::vector<Connection> myConnections;
1286 
1289  std::vector<Connection> myConnectionsToDelete;
1290 
1295 
1298 
1301 
1304 
1307 
1310 
1313 
1317  std::vector<Lane> myLanes;
1318 
1321 
1324 
1327 
1331  int toLane;
1332  };
1333 
1334  std::vector<TLSDisabledConnection> myTLSDisabledConnections;
1335 
1336 
1338  std::string myStreetName;
1339 
1340 
1342  std::vector<NBSign> mySigns;
1343 
1346 
1347 public:
1352  public:
1354  tls_disable_finder(const TLSDisabledConnection& tpl) : myDefinition(tpl) { }
1355 
1356  bool operator()(const TLSDisabledConnection& e) const {
1357  if (e.to != myDefinition.to) {
1358  return false;
1359  }
1360  if (e.fromLane != myDefinition.fromLane) {
1361  return false;
1362  }
1363  if (e.toLane != myDefinition.toLane) {
1364  return false;
1365  }
1366  return true;
1367  }
1368 
1369  private:
1371 
1372  private:
1375 
1376  };
1377 
1378 
1379 
1384  public:
1386  connections_toedge_finder(NBEdge* const edge2find, bool hasFromLane = false) :
1387  myHasFromLane(hasFromLane),
1388  myEdge2Find(edge2find) { }
1389 
1390  bool operator()(const Connection& c) const {
1391  return c.toEdge == myEdge2Find && (!myHasFromLane || c.fromLane != -1);
1392  }
1393 
1394  private:
1395  const bool myHasFromLane;
1397 
1398  private:
1401 
1402  };
1403 
1408  public:
1410  connections_toedgelane_finder(NBEdge* const edge2find, int lane2find, int fromLane2find) :
1411  myEdge2Find(edge2find),
1412  myLane2Find(lane2find),
1413  myFromLane2Find(fromLane2find) { }
1414 
1415  bool operator()(const Connection& c) const {
1416  return c.toEdge == myEdge2Find && c.toLane == myLane2Find && (myFromLane2Find < 0 || c.fromLane == myFromLane2Find);
1417  }
1418 
1419  private:
1423 
1424  private:
1427 
1428  };
1429 
1430 
1435  public:
1437  connections_finder(int fromLane, NBEdge* const edge2find, int lane2find) : myFromLane(fromLane), myEdge2Find(edge2find), myLane2Find(lane2find) { }
1438 
1439  bool operator()(const Connection& c) const {
1440  return c.fromLane == myFromLane && c.toEdge == myEdge2Find && c.toLane == myLane2Find;
1441  }
1442 
1443  private:
1447 
1448  private:
1451 
1452  };
1453 
1458  public:
1460  connections_fromlane_finder(int lane2find) : myLane2Find(lane2find) { }
1461 
1462  bool operator()(const Connection& c) const {
1463  return c.fromLane == myLane2Find;
1464  }
1465 
1466  private:
1468 
1469  private:
1472 
1473  };
1474 
1478  static bool connections_sorter(const Connection& c1, const Connection& c2);
1479 
1485  public:
1487  explicit connections_relative_edgelane_sorter(NBEdge* e) : myEdge(e) {}
1488 
1489  public:
1491  int operator()(const Connection& c1, const Connection& c2) const;
1492 
1493  private:
1496  };
1497 
1498 private:
1500  NBEdge(const NBEdge& s);
1501 
1503  NBEdge& operator=(const NBEdge& s);
1504 
1505 
1506 };
1507 
1508 
1509 #endif
1510 
1511 /****************************************************************************/
1512 
ToEdgeConnectionsAdder(const EdgeVector &transitions)
constructor
Definition: NBEdge.h:1117
NBEdge::Lane getFirstNonPedestrianLane(int direction) const
Definition: NBEdge.cpp:2468
std::string id
Definition: NBEdge.h:181
void invalidateConnections(bool reallowSetting=false)
Definition: NBEdge.cpp:949
int tlLinkNo
The index of this connection within the controlling traffic light.
Definition: NBEdge.h:170
const PositionVector & getLaneShape(unsigned int i) const
Returns the shape of the nth lane.
Definition: NBEdge.cpp:541
std::vector< Lane > myLanes
Lane information.
Definition: NBEdge.h:1317
PositionVector cutAtIntersection(const PositionVector &old) const
cut shape at the intersection shapes
Definition: NBEdge.cpp:450
bool hasConnectionTo(NBEdge *destEdge, unsigned int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:812
const std::string & getTypeID() const
Definition: NBEdge.h:907
bool setControllingTLInformation(const NBConnection &c, const std::string &tlID)
Returns if the link could be set as to be controlled.
Definition: NBEdge.cpp:1931
SUMOReal endOffset
This lane&#39;s offset to the intersection begin.
Definition: NBEdge.h:136
void divideOnEdges(const EdgeVector *outgoing)
Definition: NBEdge.cpp:1614
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:148
int toLane
The lane the connections yields in.
Definition: NBEdge.h:166
static const SUMOReal UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:201
SUMOReal myTotalAngle
Definition: NBEdge.h:1274
A class representing a single street sign.
Definition: NBSign.h:51
connections_finder(int fromLane, NBEdge *const edge2find, int lane2find)
constructor
Definition: NBEdge.h:1437
std::string foeIncomingLanes
Definition: NBEdge.h:191
PositionVector shape
The lane&#39;s shape.
Definition: NBEdge.h:128
SUMOReal myEndOffset
This edges&#39;s offset to the intersection begin (will be applied to all lanes)
Definition: NBEdge.h:1309
std::vector< TLSDisabledConnection > myTLSDisabledConnections
Definition: NBEdge.h:1334
connections_relative_edgelane_sorter(NBEdge *e)
constructor
Definition: NBEdge.h:1487
~NBEdge()
Destructor.
Definition: NBEdge.cpp:387
static const SUMOReal UNSPECIFIED_SIGNAL_OFFSET
unspecified signal offset
Definition: NBEdge.h:212
LaneSpreadFunction myLaneSpreadFunction
The information about how to spread the lanes.
Definition: NBEdge.h:1306
SUMOReal viaVmax
Definition: NBEdge.h:187
void sortOutgoingConnectionsByAngle()
sorts the outgoing connections by their angle relative to their junction
Definition: NBEdge.cpp:894
std::string viaID
Definition: NBEdge.h:186
void addSign(NBSign sign)
Definition: NBEdge.h:1094
NBEdge * toEdge
The edge the connections yields in.
Definition: NBEdge.h:164
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
Definition: NBEdge.cpp:423
void mirrorX()
mirror coordinates along the x-axis
Definition: NBEdge.cpp:402
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
NBNode * myTo
Definition: NBEdge.h:1266
The relationships between edges are computed/loaded.
Definition: NBEdge.h:94
bool operator()(const TLSDisabledConnection &e) const
Definition: NBEdge.h:1356
std::vector< NBSign > mySigns
the street signs along this edge
Definition: NBEdge.h:1342
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
Definition: NBEdge.cpp:1465
void setLaneWidth(int lane, SUMOReal width)
set lane specific width (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2294
void setSpeed(int lane, SUMOReal speed)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2349
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:502
void moveOutgoingConnectionsFrom(NBEdge *e, unsigned int laneOff)
Definition: NBEdge.cpp:1894
~ToEdgeConnectionsAdder()
destructor
Definition: NBEdge.h:1121
void addSidewalk(SUMOReal width)
add a pedestrian sidewalk of the given width and shift existing connctions
Definition: NBEdge.cpp:2478
SUMOReal getEndAngle() const
Returns the angle at the end of the edge The angle is computed in computeAngle()
Definition: NBEdge.h:387
int SVCPermissions
The representation of a single edge during network building.
Definition: NBEdge.h:70
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
Definition: NBEdge.cpp:314
void clearControllingTLInformation()
clears tlID for all connections
Definition: NBEdge.cpp:1996
Lane2LaneInfoType
Modes of setting connections between lanes.
Definition: NBEdge.h:109
void declareConnectionsAsLoaded()
Definition: NBEdge.h:1078
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
Definition: NBEdge.cpp:1920
bool hasDefaultGeometryEndpoints() const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
Definition: NBEdge.cpp:429
Lane(NBEdge *e, const std::string &_origID)
Definition: NBEdge.h:123
bool operator()(const Connection &c) const
Definition: NBEdge.h:1415
void incLaneNo(unsigned int by)
Definition: NBEdge.cpp:2210
PositionVector getCCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going counter-clock-wise around the given node ...
Definition: NBEdge.cpp:2032
bool addLane2LaneConnection(unsigned int fromLane, NBEdge *dest, unsigned int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, SUMOReal contPos=UNSPECIFIED_CONTPOS)
Adds a connection between the specified this edge&#39;s lane and an approached one.
Definition: NBEdge.cpp:684
bool addLane2LaneConnections(unsigned int fromLane, NBEdge *dest, unsigned int toLane, unsigned int no, Lane2LaneInfoType type, bool invalidatePrevious=false, bool mayDefinitelyPass=false)
Builds no connections starting at the given lanes.
Definition: NBEdge.cpp:707
void setStreetName(const std::string &name)
sets the street name of this edge
Definition: NBEdge.h:471
static const SUMOReal UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:205
std::vector< Direction > myDirs
Definition: NBEdge.h:1154
void buildInnerEdges(const NBNode &n, unsigned int noInternalNoSplits, unsigned int &linkIndex, unsigned int &splitIndex)
Definition: NBEdge.cpp:1074
void markAsInLane2LaneState()
Definition: NBEdge.cpp:2248
SUMOReal getTotalWidth() const
Returns the combined width of all lanes of this edge.
Definition: NBEdge.cpp:2318
Lanes to lanes - relationships are computed; should be recheked.
Definition: NBEdge.h:98
SUMOReal getLaneWidth() const
Returns the default width of lanes of this edge.
Definition: NBEdge.h:449
std::string getLaneIDInsecure(unsigned int lane) const
Definition: NBEdge.cpp:2172
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given ...
Definition: NBEdge.cpp:2365
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:56
int myFromJunctionPriority
The priority normalised for the node the edge is outgoing of.
Definition: NBEdge.h:1297
void computeLaneShapes()
Definition: NBEdge.cpp:1329
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Definition: NBEdge.h:172
tls_disable_finder(const TLSDisabledConnection &tpl)
constructor
Definition: NBEdge.h:1354
bool isInnerEdge() const
Returns whether this edge was marked as being within an intersection.
Definition: NBEdge.h:876
PositionVector myGeom
The geometry for the edge.
Definition: NBEdge.h:1303
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
Definition: NBEdge.cpp:906
static const SUMOReal UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:207
bool setConnection(unsigned int lane, NBEdge *destEdge, unsigned int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, SUMOReal contPos=UNSPECIFIED_CONTPOS)
Adds a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:724
const SVCPermissions SVCAll
static const SUMOReal UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:203
std::vector< Connection > getConnectionsFromLane(unsigned int lane) const
Returns connections from a given lane.
Definition: NBEdge.cpp:785
void setGeometry(const PositionVector &g, bool inner=false)
(Re)sets the edge&#39;s geometry
Definition: NBEdge.cpp:436
static SUMOReal firstIntersection(const PositionVector &v1, const PositionVector &v2, SUMOReal width2)
Definition: NBEdge.cpp:1241
void setSignalOffset(SUMOReal offset)
sets the offset of a traffic signal from the end of this edge
Definition: NBEdge.h:495
const EdgeVector & myTransitions
the transition from the virtual lane to the edge it belongs to
Definition: NBEdge.h:1113
The connection was computed and validated.
Definition: NBEdge.h:115
PositionVector startShapeAt(const PositionVector &laneShape, const NBNode *startNode) const
Definition: NBEdge.cpp:496
SUMOReal vmax
Definition: NBEdge.h:183
const std::vector< NBSign > & getSigns() const
Definition: NBEdge.h:1090
The edge has been loaded, nothing is computed yet.
Definition: NBEdge.h:92
int myToJunctionPriority
The priority normalised for the node the edge is incoming in.
Definition: NBEdge.h:1300
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
Definition: NBEdge.cpp:868
PositionVector shape
Definition: NBEdge.h:182
SUMOReal speed
The speed allowed on this lane.
Definition: NBEdge.h:130
bool keepClear
whether the junction must be kept clear when using this connection
Definition: NBEdge.h:174
void moveConnectionToRight(unsigned int lane)
Definition: NBEdge.cpp:1061
bool operator()(const Connection &c) const
Definition: NBEdge.h:1390
bool hasPermissions() const
whether at least one lane has restrictions
Definition: NBEdge.cpp:1418
SUMOReal getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn&#39;t set.
Definition: NBEdge.h:413
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:122
connections_toedge_finder(NBEdge *const edge2find, bool hasFromLane=false)
constructor
Definition: NBEdge.h:1386
SUMOReal mySpeed
The maximal speed.
Definition: NBEdge.h:1280
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
Definition: NBEdge.h:132
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
Definition: NBEdge.cpp:660
bool myAmMacroscopicConnector
Information whether this edge is a (macroscopic) connector.
Definition: NBEdge.h:1326
bool isConnectedTo(NBEdge *e)
Returns the information whethe a connection to the given edge has been added (or computed) ...
Definition: NBEdge.cpp:818
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
Definition: NBEdge.cpp:417
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the edge.
Definition: NBEdge.cpp:392
void divideSelectedLanesOnEdges(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< unsigned int > *priorities)
Definition: NBEdge.cpp:1688
static unsigned int computePrioritySum(const std::vector< unsigned int > &priorities)
Definition: NBEdge.cpp:1829
bool computeLanes2Edges()
computes the edge, step2: computation of which lanes approach the edges)
Definition: NBEdge.cpp:1504
NBEdge * myTurnDestination
The turn destination edge (if a connection exists)
Definition: NBEdge.h:1292
const std::map< NBEdge *, std::vector< unsigned int > > & getBuiltConnections() const
Definition: NBEdge.h:1126
const Lane & getLaneStruct(unsigned int lane) const
Definition: NBEdge.h:1072
friend class NBEdgeSuccessorBuilder
Definition: NBEdge.h:72
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
Definition: NBEdge.h:102
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
Definition: NBEdge.cpp:797
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
Definition: NBEdge.cpp:1454
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:353
void checkGeometry(const SUMOReal maxAngle, const SUMOReal minRadius, bool fix)
Check the angles of successive geometry segments.
Definition: NBEdge.cpp:614
std::string getLaneID(unsigned int lane) const
Definition: NBEdge.cpp:2166
void moveConnectionToLeft(unsigned int lane)
Definition: NBEdge.cpp:1046
void addCrossingPointsAsIncomingWithGivenOutgoing(NBEdge *o, PositionVector &into)
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBEdge.h:168
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
Definition: NBEdge.h:134
int fromLane
The lane the connections starts at.
Definition: NBEdge.h:162
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
TLSDisabledConnection myDefinition
Definition: NBEdge.h:1370
NBEdge & operator=(const NBEdge &s)
invalidated assignment operator
A list of positions.
SUMOReal myEndAngle
Definition: NBEdge.h:1273
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
Definition: NBEdge.cpp:1429
bool lanesWereAssigned() const
Definition: NBEdge.cpp:1908
static bool connections_sorter(const Connection &c1, const Connection &c2)
Definition: NBEdge.cpp:2423
std::vector< unsigned int > foeInternalLinks
Definition: NBEdge.h:190
std::vector< Connection > & getConnections()
Returns the connections.
Definition: NBEdge.h:771
unsigned int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:345
EdgeBuildingStep
Current state of the edge within the building process.
Definition: NBEdge.h:88
NBEdge * myPossibleTurnDestination
The edge that would be the turn destination if there was one.
Definition: NBEdge.h:1294
void setAsMacroscopicConnector()
Marks this edge as a macroscopic connector.
Definition: NBEdge.h:853
PositionVector getCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going clock-wise around the given node
Definition: NBEdge.cpp:2014
bool hasLoadedLength() const
Returns whether a length was set explicitly.
Definition: NBEdge.h:423
EdgeBuildingStep getStep() const
The building step of this edge.
Definition: NBEdge.h:441
bool canMoveConnection(const Connection &con, unsigned int newFromLane) const
whether the connection can originate on newFromLane
Definition: NBEdge.cpp:1037
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
Definition: NBEdge.cpp:1867
SUMOReal contPos
custom position for internal junction on this connection
Definition: NBEdge.h:176
SUMOReal myLaneWidth
This width of this edge&#39;s lanes.
Definition: NBEdge.h:1312
int myPriority
The priority of the edge.
Definition: NBEdge.h:1277
int getFirstNonPedestrianLaneIndex(int direction, bool exclusive=false) const
return the first lane with permissions other than SVC_PEDESTRIAN and 0
Definition: NBEdge.cpp:2435
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
std::string origID
Definition: NBEdge.h:179
bool needsLaneSpecificOutput() const
whether at least one lane has values differing from the edges values
Definition: NBEdge.cpp:1476
Connection(int fromLane_, NBEdge *toEdge_, int toLane_)
Constructor.
Definition: NBEdge.h:154
EdgeBuildingStep myStep
The building step.
Definition: NBEdge.h:1260
SUMOReal getAngleAtNodeToCenter(const NBNode *const node) const
Returns the angle of from the node shape center to where the edge meets the node shape.
Definition: NBEdge.cpp:1299
std::vector< Connection > myConnections
List of connections to following edges.
Definition: NBEdge.h:1285
void setLoadedLength(SUMOReal val)
Definition: NBEdge.cpp:2408
connections_fromlane_finder(int lane2find)
constructor
Definition: NBEdge.h:1460
The connection was given by the user.
Definition: NBEdge.h:113
An upper class for objects with additional parameters.
Definition: Parameterised.h:47
SUMOReal getSignalOffset() const
Returns the offset of a traffic signal from the end of this edge.
Definition: NBEdge.h:489
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false)
Removes the specified connection(s)
Definition: NBEdge.cpp:922
SUMOReal getEndOffset() const
Returns the offset to the destination node.
Definition: NBEdge.h:478
bool myAmInnerEdge
Information whether this is a junction-inner edge.
Definition: NBEdge.h:1323
Base class for objects which have an id.
Definition: Named.h:45
bool recheckLanes()
Definition: NBEdge.cpp:1528
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
Definition: NBEdge.cpp:1267
SUMOReal myLoadedLength
An optional length to use (-1 if not valid)
Definition: NBEdge.h:1320
std::string origID
An original ID, if given (.
Definition: NBEdge.h:140
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:61
std::map< NBEdge *, std::vector< unsigned int > > myConnections
map of edges to this edge&#39;s lanes that reach them
Definition: NBEdge.h:1110
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:2393
SUMOReal getCrossingAngle(NBNode *node)
return the angle for computing pedestrian crossings at the given node
Definition: NBEdge.cpp:2452
void addRestrictedLane(SUMOReal width, SUMOVehicleClass vclass)
add a lane of the given width, restricted to the given class and shift existing connctions ...
Definition: NBEdge.cpp:2490
void setTurningDestination(NBEdge *e, bool onlyPossible=false)
Sets the turing destination at the given edge.
Definition: NBEdge.cpp:1314
void addBikeLane(SUMOReal width)
add a bicycle lane of the given width and shift existing connctions
Definition: NBEdge.cpp:2484
void decLaneNo(unsigned int by)
Definition: NBEdge.cpp:2236
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:369
#define sign(a)
Definition: polyfonts.c:68
std::vector< int > getConnectionLanes(NBEdge *currentOutgoing) const
Returns the list of lanes that may be used to reach the given edge.
Definition: NBEdge.cpp:880
void computeEdgeShape()
Recomputeds the lane shapes to terminate at the node shape For every lane the intersection with the f...
Definition: NBEdge.cpp:480
void disableConnection4TLS(int fromLane, NBEdge *toEdge, int toLane)
Definition: NBEdge.cpp:2004
PositionVector viaShape
Definition: NBEdge.h:188
SUMOReal getMaxLaneOffset()
Definition: NBEdge.cpp:1914
static const SUMOReal UNSPECIFIED_LOADED_LENGTH
no length override given
Definition: NBEdge.h:210
void deleteLane(unsigned int index, bool recompute=true)
Definition: NBEdge.cpp:2221
std::vector< NBEdge * > EdgeVector
Definition: NBCont.h:41
std::vector< unsigned int > * prepareEdgePriorities(const EdgeVector *outgoing)
Definition: NBEdge.cpp:1783
NBEdge * myEdge
the edge to compute the relative angle of
Definition: NBEdge.h:1495
SUMOReal myLength
The length of the edge.
Definition: NBEdge.h:1269
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
Definition: NBEdge.cpp:2379
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:523
The edge has been loaded and connections shall not be added.
Definition: NBEdge.h:90
std::vector< Connection > myConnectionsToDelete
List of connections marked for delayed removal.
Definition: NBEdge.h:1289
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
Definition: NBEdge.h:861
PositionVector computeLaneShape(unsigned int lane, SUMOReal offset) const
Computes the shape for the given lane.
Definition: NBEdge.cpp:1372
connections_toedgelane_finder(NBEdge *const edge2find, int lane2find, int fromLane2find)
constructor
Definition: NBEdge.h:1410
void reduceGeometry(const SUMOReal minDist)
Removes points with a distance lesser than the given.
Definition: NBEdge.cpp:608
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
Definition: NBEdge.cpp:1277
void replaceInConnections(NBEdge *which, NBEdge *by, unsigned int laneOff)
Definition: NBEdge.cpp:961
const EdgeVector * getConnectedSorted()
Returns the list of outgoing edges without the turnaround sorted in clockwise direction.
Definition: NBEdge.cpp:831
NBEdge *const myEdge2Find
Definition: NBEdge.h:1445
void setIsInnerEdge()
Marks this edge being within an intersection.
Definition: NBEdge.h:868
void sortOutgoingConnectionsByIndex()
sorts the outgoing connections by their from-lane-index and their to-lane-index
Definition: NBEdge.cpp:900
std::string myType
The type of the edge.
Definition: NBEdge.h:1263
SUMOReal mySignalOffset
the offset of a traffic light signal from the end of this edge (-1 for None)
Definition: NBEdge.h:1345
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge&#39;s lateral offset shal...
void append(NBEdge *continuation)
Definition: NBEdge.cpp:2121
SUMOReal getLaneSpeed(unsigned int lane) const
Definition: NBEdge.cpp:1323
void shiftToLanesToEdge(NBEdge *to, unsigned int laneOff)
modifify the toLane for all connections to the given edge
Definition: NBEdge.cpp:2524
NBNode * tryGetNodeAtPosition(SUMOReal pos, SUMOReal tolerance=5.0) const
Returns the node at the given edges length (using an epsilon) When no node is existing at the given p...
Definition: NBEdge.cpp:1880
The connection was computed.
Definition: NBEdge.h:111
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge&#39;s lanes&#39; lateral offset is computed.
Definition: NBEdge.h:603
SUMOReal myStartAngle
The angles of the edge.
Definition: NBEdge.h:1272
SUMOReal getTotalAngle() const
get the angle as measure from the start to the end of this edge
Definition: NBEdge.h:397
Represents a single node (junction) during network building.
Definition: NBNode.h:74
void dismissVehicleClassInformation()
Definition: NBEdge.cpp:2414
Lane & getLaneStruct(unsigned int lane)
Definition: NBEdge.h:1067
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Definition: NBEdge.cpp:2146
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
Definition: NBEdge.h:100
bool hasLaneSpecificWidth() const
whether lanes differ in width
Definition: NBEdge.cpp:1443
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
void setEndOffset(int lane, SUMOReal offset)
set lane specific end-offset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2333
void appendTurnaround(bool noTLSControlled, bool checkPermissions)
Add a connection to the previously computed turnaround, if wished.
Definition: NBEdge.cpp:1839
Direction
enum of possible directions
Definition: NBEdge.h:1150
#define SUMOReal
Definition: config.h:213
bool isNearEnough2BeJoined2(NBEdge *e, SUMOReal threshold) const
Definition: NBEdge.cpp:2178
void preferVehicleClass(int lane, SUMOVehicleClass vclass)
Definition: NBEdge.cpp:2281
void allowVehicleClass(int lane, SUMOVehicleClass vclass)
set allowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:2255
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
Definition: NBEdge.cpp:553
void computeAngle()
computes the angle of this edge and stores it in myAngle
Definition: NBEdge.cpp:1384
SUMOReal getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:431
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64
SUMOReal getFinalLength() const
length that will be assigned to the lanes in the final network
Definition: NBEdge.cpp:2560
SUMOReal getStartAngle() const
Returns the angle at the start of the edge The angle is computed in computeAngle() ...
Definition: NBEdge.h:378
bool computeEdge2Edges(bool noLeftMovers)
computes the edge (step1: computation of approached edges)
Definition: NBEdge.cpp:1483
unsigned int internalLaneIndex
The lane index of this internal lane within the internal edge.
Definition: NBEdge.h:194
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
Definition: NBEdge.cpp:547
bool operator()(const Connection &c) const
Definition: NBEdge.h:1439
NBEdge(const std::string &id, NBNode *from, NBNode *to, std::string type, SUMOReal speed, unsigned int nolanes, int priority, SUMOReal width, SUMOReal offset, const std::string &streetName="", LaneSpreadFunction spread=LANESPREAD_RIGHT)
Constructor.
Definition: NBEdge.cpp:185
Lanes to edges - relationships are computed/loaded.
Definition: NBEdge.h:96
std::string myStreetName
The street name (or whatever arbitrary string you wish to attach)
Definition: NBEdge.h:1338
const std::string & getStreetName() const
Returns the street name of this edge.
Definition: NBEdge.h:465
void addLane(unsigned int index, bool recompute=true)
Definition: NBEdge.cpp:2186
const std::vector< Connection > & getConnections() const
Returns the connections.
Definition: NBEdge.h:763
NBNode * myFrom
The source and the destination node.
Definition: NBEdge.h:1266
bool expandableBy(NBEdge *possContinuation) const
Definition: NBEdge.cpp:2050
NBEdge * getTurnDestination(bool possibleDestination=false) const
Definition: NBEdge.cpp:2157
void init(unsigned int noLanes, bool tryIgnoreNodePositions, const std::string &origID)
Initialization routines common to all constructors.
Definition: NBEdge.cpp:334
void shiftPositionAtNode(NBNode *node, NBEdge *opposite)
shift geometry at the given node to avoid overlap
Definition: NBEdge.cpp:2535
bool operator()(const Connection &c) const
Definition: NBEdge.h:1462
void disallowVehicleClass(int lane, SUMOVehicleClass vclass)
set disallowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:2268
SUMOReal width
This lane&#39;s width.
Definition: NBEdge.h:138
void copyConnectionsFrom(NBEdge *src)
Definition: NBEdge.cpp:1030
void reinit(NBNode *from, NBNode *to, const std::string &type, SUMOReal speed, unsigned int nolanes, int priority, PositionVector geom, SUMOReal width, SUMOReal offset, const std::string &streetName, LaneSpreadFunction spread=LANESPREAD_RIGHT, bool tryIgnoreNodePositions=false)
Resets initial values.
Definition: NBEdge.cpp:266
static const SUMOReal ANGLE_LOOKAHEAD
the distance at which to take the default angle
Definition: NBEdge.h:214
SUMOReal getLength() const
Returns the computed length of the edge.
Definition: NBEdge.h:404
SUMOReal getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge&#39;s geometry at the given node.
Definition: NBEdge.cpp:1287
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:361
bool splitGeometry(NBEdgeCont &ec, NBNodeCont &nc)
Splits this edge at geometry points.
Definition: NBEdge.cpp:563