Eclipse SUMO - Simulation of Urban MObility
NBEdge.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 /****************************************************************************/
16 // The representation of a single edge during network building
17 /****************************************************************************/
18 #ifndef NBEdge_h
19 #define NBEdge_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <map>
28 #include <vector>
29 #include <string>
30 #include <set>
31 #include <cassert>
32 #include <utils/common/Named.h>
36 #include <utils/geom/Bresenham.h>
40 #include "NBCont.h"
41 #include "NBHelpers.h"
42 #include "NBSign.h"
43 
44 
45 // ===========================================================================
46 // class declarations
47 // ===========================================================================
48 class NBNode;
49 class NBConnection;
50 class NBNodeCont;
51 class NBEdgeCont;
52 class OutputDevice;
53 class GNELane;
54 class NBVehicle;
55 
56 
57 // ===========================================================================
58 // class definitions
59 // ===========================================================================
64 class NBRouterEdge {
65 public:
66  virtual const std::string& getID() const = 0;
67  virtual double getSpeed() const = 0;
68  virtual double getLength() const = 0;
69  virtual int getNumericalID() const = 0;
71  virtual bool isInternal() const {
72  return false;
73  }
74  inline bool prohibits(const NBVehicle* const /*veh*/) const {
75  return false;
76  }
77  inline bool restricts(const NBVehicle* const /*veh*/) const {
78  return false;
79  }
80 
81  static inline double getTravelTimeStatic(const NBRouterEdge* const edge, const NBVehicle* const /*veh*/, double /*time*/) {
82  return edge->getLength() / edge->getSpeed();
83  }
84 };
85 
86 
91 class NBEdge : public Named, public Parameterised, public NBRouterEdge {
92  friend class NBEdgeCont;
93 
95  friend class GNELane;
96  friend class GNEEdge;
97  friend class GNEJunction;
98 
99 public:
100 
108  enum class EdgeBuildingStep {
112  INIT,
114  EDGE2EDGES,
116  LANES2EDGES,
123  };
124 
125 
136  };
137 
138 
142  struct Lane final : public Parameterised {
144  Lane(NBEdge* e, const std::string& _origID);
145 
148 
150  double speed;
151 
154 
157 
159  double endOffset;
160 
163  std::map<int, double> stopOffsets;
164 
166  double width;
167 
169  std::string oppositeID;
170 
172  bool accelRamp;
173 
175  // @note (see NIImporter_DlrNavteq::ConnectedLanesHandler)
177 
180 
182  std::string type;
183  };
184 
185 
189  struct Connection final : public Parameterised, public NBRouterEdge {
195  Connection(int fromLane_, NBEdge* toEdge_, int toLane_);
196 
198  Connection(int fromLane_, NBEdge* toEdge_, int toLane_, bool mayDefinitelyPass_,
199  bool keepClear_ = true,
200  double contPos_ = UNSPECIFIED_CONTPOS,
201  double visibility_ = UNSPECIFIED_VISIBILITY_DISTANCE,
202  double speed_ = UNSPECIFIED_SPEED,
203  bool haveVia_ = false,
204  bool uncontrolled_ = false,
205  const PositionVector& customShape_ = PositionVector::EMPTY,
207 
209  int fromLane;
210 
213 
215  int toLane;
216 
218  std::string tlID;
219 
222 
225 
228 
230  bool keepClear;
231 
233  double contPos;
234 
236  double visibility;
237 
239  double speed;
240 
243 
246 
248  std::string id;
249 
252 
254  double vmax;
255 
257  bool haveVia;
258 
260  std::string viaID;
261 
264 
266  std::vector<int> foeInternalLinks;
267 
269  std::vector<std::string> foeIncomingLanes;
270 
273 
276 
278  std::string getInternalLaneID() const;
279 
281  std::string getDescription(const NBEdge* parent) const;
282 
284  double length;
285 
289  const std::string& getID() const {
290  return id;
291  }
292  double getSpeed() const {
293  return vmax;
294  }
295  double getLength() const {
296  return shape.length() + viaShape.length();
297  }
298  int getNumericalID() const {
299  throw ProcessError("NBEdge::Connection does not implement getNumericalID()");
300  }
301  bool isInternal() const {
302  return true;
303  }
305  UNUSED_PARAMETER(vClass);
306  return myViaSuccessors;
307  }
309  };
310 
313 
315  static const double UNSPECIFIED_WIDTH;
316 
318  static const double UNSPECIFIED_OFFSET;
319 
321  static const double UNSPECIFIED_SPEED;
322 
324  static const double UNSPECIFIED_CONTPOS;
325 
327  static const double UNSPECIFIED_VISIBILITY_DISTANCE;
328 
330  static const double UNSPECIFIED_LOADED_LENGTH;
331 
333  static const double UNSPECIFIED_SIGNAL_OFFSET;
334 
336  static const double ANGLE_LOOKAHEAD;
337 
340 
343 
348  ROUNDABOUT = 1000
349  };
350 
351 public:
370  NBEdge(const std::string& id,
371  NBNode* from, NBNode* to, std::string type,
372  double speed, int nolanes, int priority,
373  double width, double endOffset,
374  const std::string& streetName = "",
376 
377 
399  NBEdge(const std::string& id,
400  NBNode* from, NBNode* to, std::string type,
401  double speed, int nolanes, int priority,
402  double width, double endOffset,
403  PositionVector geom,
404  const std::string& streetName = "",
405  const std::string& origID = "",
407  bool tryIgnoreNodePositions = false);
408 
420  NBEdge(const std::string& id,
421  NBNode* from, NBNode* to,
422  const NBEdge* tpl,
423  const PositionVector& geom = PositionVector(),
424  int numLanes = -1);
425 
426 
428  ~NBEdge();
429 
430 
446  void reinit(NBNode* from, NBNode* to, const std::string& type,
447  double speed, int nolanes, int priority,
448  PositionVector geom, double width, double endOffset,
449  const std::string& streetName,
451  bool tryIgnoreNodePositions = false);
452 
457  void reinitNodes(NBNode* from, NBNode* to);
458 
461 
465  void reshiftPosition(double xoff, double yoff);
466 
468  void mirrorX();
470 
472 
473 
477  int getNumLanes() const {
478  return (int)myLanes.size();
479  }
480 
484  int getPriority() const {
485  return myPriority;
486  }
487 
491  NBNode* getFromNode() const {
492  return myFrom;
493  }
494 
498  NBNode* getToNode() const {
499  return myTo;
500  }
501 
507  inline double getStartAngle() const {
508  return myStartAngle;
509  }
510 
516  inline double getEndAngle() const {
517  return myEndAngle;
518  }
519 
524  double getShapeStartAngle() const;
525 
526 
532  double getShapeEndAngle() const;
533 
538  inline double getTotalAngle() const {
539  return myTotalAngle;
540  }
541 
545  double getLength() const {
546  return myLength;
547  }
548 
549 
554  double getLoadedLength() const {
555  return myLoadedLength > 0 ? myLoadedLength : myLength;
556  }
557 
559  double getFinalLength() const;
560 
564  bool hasLoadedLength() const {
565  return myLoadedLength > 0;
566  }
567 
571  double getSpeed() const {
572  return mySpeed;
573  }
574 
581  return myStep;
582  }
583 
587  double getLaneWidth() const {
588  return myLaneWidth;
589  }
590 
594  double getLaneWidth(int lane) const;
595 
597  double getTotalWidth() const;
598 
600  const std::string& getStreetName() const {
601  return myStreetName;
602  }
603 
605  void setStreetName(const std::string& name) {
606  myStreetName = name;
607  }
608 
612  double getEndOffset() const {
613  return myEndOffset;
614  }
615 
616  double getDistance() const {
617  return myDistance;
618  }
619 
623  const std::map<int, double>& getStopOffsets() const {
624  return myStopOffsets;
625  }
626 
630  double getEndOffset(int lane) const;
631 
635  const std::map<int, double>& getStopOffsets(int lane) const;
636 
638  double getSignalOffset() const {
639  return mySignalOffset;
640  }
641 
644  return mySignalNode;
645  }
646 
648  void setSignalOffset(double offset, NBNode* signalNode) {
649  mySignalOffset = offset;
650  mySignalNode = signalNode;
651  }
652 
656  const std::vector<NBEdge::Lane>& getLanes() const {
657  return myLanes;
658  }
660 
665  int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const;
666 
668  int getSpecialLane(SVCPermissions permissions) const;
669 
673  int getFirstAllowedLaneIndex(int direction) const;
674 
676  NBEdge::Lane getFirstNonPedestrianLane(int direction) const;
677 
679  std::set<SVCPermissions> getPermissionVariants(int iStart, int iEnd) const;
680 
682  double getCrossingAngle(NBNode* node);
683 
685  std::string getSidewalkID();
686 
688 
689 
692  const PositionVector& getGeometry() const {
693  return myGeom;
694  }
695 
697  const PositionVector getInnerGeometry() const;
698 
700  bool hasDefaultGeometry() const;
701 
707  bool hasDefaultGeometryEndpoints() const;
708 
714  bool hasDefaultGeometryEndpointAtNode(const NBNode* node) const;
715 
726  void setGeometry(const PositionVector& g, bool inner = false);
727 
737  void addGeometryPoint(int index, const Position& p);
738 
740  void extendGeometryAtNode(const NBNode* node, double maxExtent);
741 
743  void shortenGeometryAtNode(const NBNode* node, double reduction);
744 
746  void shiftPositionAtNode(NBNode* node, NBEdge* opposite);
747 
749  Position geometryPositionAtOffset(double offset) const;
750 
760  void computeEdgeShape(double smoothElevationThreshold = -1);
761 
765  const PositionVector& getLaneShape(int i) const;
766 
772 
778  return myLaneSpreadFunction;
779  }
780 
784  void reduceGeometry(const double minDist);
785 
791  void checkGeometry(const double maxAngle, const double minRadius, bool fix, bool silent);
793 
796 
810  bool addEdge2EdgeConnection(NBEdge* dest);
811 
832  bool addLane2LaneConnection(int fromLane, NBEdge* dest,
833  int toLane, Lane2LaneInfoType type,
834  bool mayUseSameDestination = false,
835  bool mayDefinitelyPass = false,
836  bool keepClear = true,
837  double contPos = UNSPECIFIED_CONTPOS,
838  double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
839  double speed = UNSPECIFIED_SPEED,
840  const PositionVector& customShape = PositionVector::EMPTY,
841  const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED,
843 
861  bool addLane2LaneConnections(int fromLane,
862  NBEdge* dest, int toLane, int no,
863  Lane2LaneInfoType type, bool invalidatePrevious = false,
864  bool mayDefinitelyPass = false);
865 
876  bool setConnection(int lane, NBEdge* destEdge,
877  int destLane,
878  Lane2LaneInfoType type,
879  bool mayUseSameDestination = false,
880  bool mayDefinitelyPass = false,
881  bool keepClear = true,
882  double contPos = UNSPECIFIED_CONTPOS,
883  double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
884  double speed = UNSPECIFIED_SPEED,
885  const PositionVector& customShape = PositionVector::EMPTY,
886  const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED,
887  SVCPermissions permissions = SVC_UNSPECIFIED);
888 
899  std::vector<Connection> getConnectionsFromLane(int lane, NBEdge* to = nullptr, int toLane = -1) const;
900 
905  Connection getConnection(int fromLane, const NBEdge* to, int toLane) const;
906 
911  Connection& getConnectionRef(int fromLane, const NBEdge* to, int toLane);
912 
921  bool hasConnectionTo(NBEdge* destEdge, int destLane, int fromLane = -1) const;
922 
929  bool isConnectedTo(const NBEdge* e) const;
930 
934  const std::vector<Connection>& getConnections() const {
935  return myConnections;
936  }
937 
941  std::vector<Connection>& getConnections() {
942  return myConnections;
943  }
944 
949 
954 
959 
963  std::vector<int> getConnectionLanes(NBEdge* currentOutgoing, bool withBikes = true) const;
964 
967 
970 
976  void remapConnections(const EdgeVector& incoming);
977 
985  void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false, const bool adaptToLaneRemoval = false, const bool keepPossibleTurns = false);
986 
988  bool removeFromConnections(const NBEdge::Connection& connectionToRemove);
989 
991  void invalidateConnections(bool reallowSetting = false);
992 
994  void replaceInConnections(NBEdge* which, NBEdge* by, int laneOff);
995 
997  void replaceInConnections(NBEdge* which, const std::vector<NBEdge::Connection>& origConns);
998 
1000  void copyConnectionsFrom(NBEdge* src);
1001 
1003  void shiftToLanesToEdge(NBEdge* to, int laneOff);
1005 
1011  bool isTurningDirectionAt(const NBEdge* const edge) const;
1012 
1017  void setTurningDestination(NBEdge* e, bool onlyPossible = false);
1018 
1023  myAmMacroscopicConnector = true;
1024  }
1025 
1029  bool isMacroscopicConnector() const {
1030  return myAmMacroscopicConnector;
1031  }
1032 
1034  void setInsideTLS() {
1035  myAmInTLS = true;
1036  }
1037 
1041  bool isInsideTLS() const {
1042  return myAmInTLS;
1043  }
1045 
1051  void setJunctionPriority(const NBNode* const node, int prio);
1052 
1062  int getJunctionPriority(const NBNode* const node) const;
1063 
1065  void setLoadedLength(double val);
1066 
1068  void setAverageLengthWithOpposite(double val);
1069 
1072 
1074  const std::string& getTypeID() const {
1075  return myType;
1076  }
1077 
1079  bool needsLaneSpecificOutput() const;
1080 
1082  bool hasPermissions() const;
1083 
1085  bool hasLaneSpecificPermissions() const;
1086 
1088  bool hasLaneSpecificSpeed() const;
1089 
1091  bool hasLaneSpecificWidth() const;
1092 
1094  bool hasLaneSpecificType() const;
1095 
1097  bool hasLaneSpecificEndOffset() const;
1098 
1100  bool hasLaneSpecificStopOffsets() const;
1101 
1103  bool hasAccelLane() const;
1104 
1106  bool hasCustomLaneShape() const;
1107 
1109  bool hasLaneParams() const;
1110 
1112  bool computeEdge2Edges(bool noLeftMovers);
1113 
1115  bool computeLanes2Edges();
1116 
1118  bool recheckLanes();
1119 
1128  void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike, bool checkPermissions);
1129 
1133  NBNode* tryGetNodeAtPosition(double pos, double tolerance = 5.0) const;
1134 
1136  double getMaxLaneOffset();
1137 
1139  bool lanesWereAssigned() const;
1140 
1142  bool mayBeTLSControlled(int fromLane, NBEdge* toEdge, int toLane) const;
1143 
1145  bool setControllingTLInformation(const NBConnection& c, const std::string& tlID);
1146 
1149 
1152 
1154  PositionVector getCWBoundaryLine(const NBNode& n) const;
1155 
1157  PositionVector getCCWBoundaryLine(const NBNode& n) const;
1158 
1160  bool expandableBy(NBEdge* possContinuation, std::string& reason) const;
1161 
1163  void append(NBEdge* continuation);
1164 
1166  bool hasSignalisedConnectionTo(const NBEdge* const e) const;
1167 
1169  void moveOutgoingConnectionsFrom(NBEdge* e, int laneOff);
1170 
1171  /* @brief return the turn destination if it exists
1172  * @param[in] possibleDestination Wether myPossibleTurnDestination should be returned if no turnaround connection
1173  * exists
1174  */
1175  NBEdge* getTurnDestination(bool possibleDestination = false) const;
1176 
1178  std::string getLaneID(int lane) const;
1179 
1181  double getLaneSpeed(int lane) const;
1182 
1184  bool isNearEnough2BeJoined2(NBEdge* e, double threshold) const;
1185 
1193  double getAngleAtNode(const NBNode* const node) const;
1194 
1203  double getAngleAtNodeToCenter(const NBNode* const node) const;
1204 
1206  void incLaneNo(int by);
1207 
1209  void decLaneNo(int by);
1210 
1212  void deleteLane(int index, bool recompute, bool shiftIndices);
1213 
1215  void addLane(int index, bool recomputeShape, bool recomputeConnections, bool shiftIndices);
1216 
1218  void markAsInLane2LaneState();
1219 
1221  void addSidewalk(double width);
1222 
1224  void restoreSidewalk(std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1225 
1227  void addBikeLane(double width);
1228 
1230  void restoreBikelane(std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1231 
1233  void addRestrictedLane(double width, SUMOVehicleClass vclass);
1234 
1236  void setPermissions(SVCPermissions permissions, int lane = -1);
1237 
1239  void setPreferredVehicleClass(SVCPermissions permissions, int lane = -1);
1240 
1242  void allowVehicleClass(int lane, SUMOVehicleClass vclass);
1243 
1245  void disallowVehicleClass(int lane, SUMOVehicleClass vclass);
1246 
1248  void preferVehicleClass(int lane, SUMOVehicleClass vclass);
1249 
1251  void setLaneWidth(int lane, double width);
1252 
1254  void setLaneType(int lane, const std::string& type);
1255 
1257  void setEndOffset(int lane, double offset);
1258 
1260  void setSpeed(int lane, double speed);
1261 
1264  bool setStopOffsets(int lane, std::map<int, double> offsets, bool overwrite = false);
1265 
1267  void setAcceleration(int lane, bool accelRamp);
1268 
1270  void setLaneShape(int lane, const PositionVector& shape);
1271 
1273  SVCPermissions getPermissions(int lane = -1) const;
1274 
1276  void setOrigID(const std::string origID);
1277 
1279  void setDistance(double distance) {
1280  myDistance = distance;
1281  }
1282 
1284  void disableConnection4TLS(int fromLane, NBEdge* toEdge, int toLane);
1285 
1286  // @brief returns a reference to the internal structure for the convenience of NETEDIT
1287  Lane& getLaneStruct(int lane) {
1288  assert(lane >= 0);
1289  assert(lane < (int)myLanes.size());
1290  return myLanes[lane];
1291  }
1292 
1293  // @brief returns a reference to the internal structure for the convenience of NETEDIT
1294  const Lane& getLaneStruct(int lane) const {
1295  assert(lane >= 0);
1296  assert(lane < (int)myLanes.size());
1297  return myLanes[lane];
1298  }
1299 
1302  myStep = step;
1303  }
1304 
1305  /* @brief fill connection attributes shape, viaShape, ...
1306  *
1307  * @param[in,out] edgeIndex The number of connections already handled
1308  * @param[in,out] splitIndex The number of via edges already built
1309  * @param[in] tryIgnoreNodePositions Does not add node geometries if geom.size()>=2
1310  */
1311  void buildInnerEdges(const NBNode& n, int noInternalNoSplits, int& linkIndex, int& splitIndex);
1312 
1314  inline const std::vector<NBSign>& getSigns() const {
1315  return mySigns;
1316  }
1317 
1319  inline void addSign(NBSign sign) {
1320  mySigns.push_back(sign);
1321  }
1322 
1325 
1327  void setNodeBorder(const NBNode* node, const Position& p, const Position& p2, bool rectangularCut);
1328  const PositionVector& getNodeBorder(const NBNode* node);
1329  void resetNodeBorder(const NBNode* node);
1330 
1332  bool isBidiRail(bool ignoreSpread = false) const;
1333 
1335  bool isRailDeadEnd() const;
1336 
1338  void debugPrintConnections(bool outgoing = true, bool incoming = false) const;
1339 
1341  static double firstIntersection(const PositionVector& v1, const PositionVector& v2, double width2, const std::string& error = "");
1342 
1346  static PositionVector startShapeAt(const PositionVector& laneShape, const NBNode* startNode, PositionVector nodeShape);
1347 
1349 
1350 
1351  static inline double getTravelTimeStatic(const NBEdge* const edge, const NBVehicle* const /*veh*/, double /*time*/) {
1352  return edge->getLength() / edge->getSpeed();
1353  }
1354 
1355  static int getLaneIndexFromLaneID(const std::string laneID);
1356 
1358  void setNumericalID(int index) {
1359  myIndex = index;
1360  }
1361 
1366  int getNumericalID() const {
1367  return myIndex;
1368  }
1369 
1372  const EdgeVector& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const;
1373 
1374 
1378 
1380  const std::string& getID() const {
1381  return Named::getID();
1382  }
1383 
1385  bool joinLanes(SVCPermissions perms);
1386 
1387 private:
1392  private:
1394  std::map<NBEdge*, std::vector<int> > myConnections;
1395 
1398 
1399  public:
1402  : myTransitions(transitions) { }
1403 
1406 
1408  void execute(const int lane, const int virtEdge);
1409 
1411  const std::map<NBEdge*, std::vector<int> >& getBuiltConnections() const {
1412  return myConnections;
1413  }
1414 
1415  private:
1418 
1421  };
1422 
1423 
1432  public:
1435 
1436  public:
1438  MainDirections(const EdgeVector& outgoing, NBEdge* parent, NBNode* to, const std::vector<int>& availableLanes);
1439 
1441  ~MainDirections();
1442 
1444  int getStraightest() const {
1445  return myStraightest;
1446  }
1447 
1449  bool empty() const;
1450 
1452  bool includes(Direction d) const;
1453 
1454  private:
1457 
1459  std::vector<Direction> myDirs;
1460 
1463 
1466  };
1467 
1469  PositionVector computeLaneShape(int lane, double offset) const;
1470 
1472  void computeLaneShapes();
1473 
1474 private:
1491  void init(int noLanes, bool tryIgnoreNodePositions, const std::string& origID);
1492 
1494  void divideOnEdges(const EdgeVector* outgoing);
1495 
1497  void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector<int>& availableLanes);
1498 
1500  void addStraightConnections(const EdgeVector* outgoing, const std::vector<int>& availableLanes, const std::vector<int>& priorities);
1501 
1503  const std::vector<int> prepareEdgePriorities(const EdgeVector* outgoing, const std::vector<int>& availableLanes);
1504 
1507 
1510  void moveConnectionToLeft(int lane);
1511 
1515  void moveConnectionToRight(int lane);
1516 
1518  bool canMoveConnection(const Connection& con, int newFromLane) const;
1520 
1522  void computeAngle();
1523 
1525  bool bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2, int shapeFlag = 0) const;
1526 
1528  bool hasRestrictedLane(SUMOVehicleClass vclass) const;
1529 
1531  void restoreRestrictedLane(SUMOVehicleClass vclass, std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1532 
1534  void assignInternalLaneLength(std::vector<Connection>::iterator i, int numLanes, double lengthSum);
1535 
1536 private:
1541 
1543  std::string myType;
1544 
1547 
1549  double myLength;
1550 
1554  double myEndAngle;
1557 
1560 
1562  double mySpeed;
1563 
1565  double myDistance;
1566 
1570  std::vector<Connection> myConnections;
1571 
1573  std::vector<Connection> myConnectionsToDelete;
1574 
1577 
1580 
1583 
1586 
1589 
1592 
1594  double myEndOffset;
1595 
1600  std::map<int, double> myStopOffsets;
1601 
1603  double myLaneWidth;
1604 
1608  std::vector<Lane> myLanes;
1609 
1612 
1615 
1618 
1620  std::string myStreetName;
1621 
1623  std::vector<NBSign> mySigns;
1624 
1628 
1634 
1635 
1637  int myIndex;
1638 
1639  // @brief a static list of successor edges. Set by NBEdgeCont and requires reset when the network changes
1641 
1642  // @brief a static list of successor edges. Set by NBEdgeCont and requires reset when the network changes
1644 
1645 public:
1646 
1649  public:
1651  connections_toedge_finder(const NBEdge* const edge2find, bool hasFromLane = false) :
1652  myHasFromLane(hasFromLane),
1653  myEdge2Find(edge2find) { }
1654 
1656  bool operator()(const Connection& c) const {
1657  return c.toEdge == myEdge2Find && (!myHasFromLane || c.fromLane != -1);
1658  }
1659 
1660  private:
1662  const bool myHasFromLane;
1663 
1665  const NBEdge* const myEdge2Find;
1666 
1667  private:
1670  };
1671 
1674  public:
1676  connections_toedgelane_finder(NBEdge* const edge2find, int lane2find, int fromLane2find) :
1677  myEdge2Find(edge2find),
1678  myLane2Find(lane2find),
1679  myFromLane2Find(fromLane2find) { }
1680 
1682  bool operator()(const Connection& c) const {
1683  return c.toEdge == myEdge2Find && c.toLane == myLane2Find && (myFromLane2Find < 0 || c.fromLane == myFromLane2Find);
1684  }
1685 
1686  private:
1689 
1692 
1695 
1696  private:
1699 
1700  };
1701 
1704  public:
1706  connections_finder(int fromLane, NBEdge* const edge2find, int lane2find, bool invertEdge2find = false) :
1707  myFromLane(fromLane), myEdge2Find(edge2find), myLane2Find(lane2find), myInvertEdge2find(invertEdge2find) { }
1708 
1710  bool operator()(const Connection& c) const {
1711  return ((c.fromLane == myFromLane || myFromLane == -1)
1713  && (c.toLane == myLane2Find || myLane2Find == -1));
1714  }
1715 
1716  private:
1719 
1722 
1725 
1728 
1729  private:
1732 
1733  };
1734 
1737  public:
1739  connections_conflict_finder(int fromLane, NBEdge* const edge2find, bool checkRight) :
1740  myFromLane(fromLane), myEdge2Find(edge2find), myCheckRight(checkRight) { }
1741 
1743  bool operator()(const Connection& c) const {
1744  return (((myCheckRight && c.fromLane < myFromLane) || (!myCheckRight && c.fromLane > myFromLane))
1745  && c.fromLane >= 0 // already assigned
1746  && c.toEdge == myEdge2Find);
1747  }
1748 
1749  private:
1752 
1755 
1758 
1759  private:
1762 
1763  };
1764 
1767  public:
1769  connections_fromlane_finder(int lane2find) : myLane2Find(lane2find) { }
1770 
1772  bool operator()(const Connection& c) const {
1773  return c.fromLane == myLane2Find;
1774  }
1775 
1776  private:
1779 
1780  private:
1783 
1784  };
1785 
1787  static bool connections_sorter(const Connection& c1, const Connection& c2);
1788 
1794  public:
1797 
1798  public:
1800  int operator()(const Connection& c1, const Connection& c2) const;
1801 
1802  private:
1805  };
1806 
1807 private:
1809  NBEdge(const NBEdge& s);
1810 
1812  NBEdge& operator=(const NBEdge& s);
1813 
1815  NBEdge();
1816 
1817 };
1818 
1819 
1820 #endif
1821 
1822 /****************************************************************************/
1823 
NBEdge::cutAtIntersection
PositionVector cutAtIntersection(const PositionVector &old) const
cut shape at the intersection shapes
Definition: NBEdge.cpp:717
NBEdge::append
void append(NBEdge *continuation)
append another edge
Definition: NBEdge.cpp:3024
NBEdge::Connection::tlID
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBEdge.h:218
NBEdge::reinitNodes
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
Definition: NBEdge.cpp:422
NBEdge::Lane::preferred
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
Definition: NBEdge.h:156
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:31
NBEdge::UNSPECIFIED_OFFSET
static const double UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:318
NBEdge::EdgeBuildingStep::LANES2LANES_RECHECK
Lanes to lanes - relationships are computed; should be recheked.
NBEdge::connections_toedge_finder::myHasFromLane
const bool myHasFromLane
check if has from lane
Definition: NBEdge.h:1662
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
SVC_UNSPECIFIED
const SVCPermissions SVC_UNSPECIFIED
permissions not specified
Definition: SUMOVehicleClass.cpp:148
NBEdge::Lane::Lane
Lane(NBEdge *e, const std::string &_origID)
constructor
Definition: NBEdge.cpp:133
NBEdge::connections_relative_edgelane_sorter::operator()
int operator()(const Connection &c1, const Connection &c2) const
comparing operation
Definition: NBEdge.cpp:258
NBEdge::addStraightConnections
void addStraightConnections(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > &priorities)
add some straight connections
Definition: NBEdge.cpp:2530
NBEdge::Connection::toEdge
NBEdge * toEdge
The edge the connections yields in.
Definition: NBEdge.h:212
NBEdge::Connection::getSpeed
double getSpeed() const
Definition: NBEdge.h:292
NBEdge::Lane::speed
double speed
The speed allowed on this lane.
Definition: NBEdge.h:150
NBEdge::ROUNDABOUT
Definition: NBEdge.h:348
NBEdge::myTo
NBNode * myTo
Definition: NBEdge.h:1546
NBEdge::myFromBorder
PositionVector myFromBorder
intersection borders (because the node shape might be invalid)
Definition: NBEdge.h:1631
NBEdge::setOrigID
void setOrigID(const std::string origID)
set origID for all lanes
Definition: NBEdge.cpp:3703
NBEdge::getLaneSpeed
double getLaneSpeed(int lane) const
get lane speed
Definition: NBEdge.cpp:1872
NBEdge::isConnectedTo
bool isConnectedTo(const NBEdge *e) const
Returns the information whethe a connection to the given edge has been added (or computed)
Definition: NBEdge.cpp:1149
NBEdge::appendTurnaround
void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike, bool checkPermissions)
Add a connection to the previously computed turnaround, if wished.
Definition: NBEdge.cpp:2694
NBEdge::Connection::haveVia
bool haveVia
check if Connection have a Via
Definition: NBEdge.h:257
NBEdge::Connection::length
double length
computed length (average of all internal lane shape lengths that share an internal edge)
Definition: NBEdge.h:284
NBEdge::Connection::vmax
double vmax
maximum velocity
Definition: NBEdge.h:254
NBEdge::getConnections
std::vector< Connection > & getConnections()
Returns the connections.
Definition: NBEdge.h:941
NBEdge::connections_finder::operator=
connections_finder & operator=(const connections_finder &s)
invalidated assignment operator
NBEdge::myDistance
double myDistance
The mileage/kilometrage at the start of this edge in a linear coordination system.
Definition: NBEdge.h:1565
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:42
Named
Base class for objects which have an id.
Definition: Named.h:56
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
NBEdge::UNSPECIFIED_CONNECTION_UNCONTROLLED
static const bool UNSPECIFIED_CONNECTION_UNCONTROLLED
TLS-controlled despite its node controlled not specified.
Definition: NBEdge.h:342
NBEdge::ToEdgeConnectionsAdder
A class that being a bresenham-callback assigns the incoming lanes to the edges.
Definition: NBEdge.h:1391
NBRouterEdge::getTravelTimeStatic
static double getTravelTimeStatic(const NBRouterEdge *const edge, const NBVehicle *const, double)
Definition: NBEdge.h:81
NBEdge::shortenGeometryAtNode
void shortenGeometryAtNode(const NBNode *node, double reduction)
linearly extend the geometry at the given node
Definition: NBEdge.cpp:619
NBEdge::restoreBikelane
void restoreBikelane(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added BikeLane
Definition: NBEdge.cpp:3563
NBEdge::Lane::type
std::string type
the type of this lane
Definition: NBEdge.h:182
NBEdge::connections_toedgelane_finder
Definition: NBEdge.h:1673
NBEdge::myLaneSpreadFunction
LaneSpreadFunction myLaneSpreadFunction
The information about how to spread the lanes.
Definition: NBEdge.h:1591
NBRouterEdge::isInternal
virtual bool isInternal() const
Definition: NBEdge.h:71
NBEdge::declareConnectionsAsLoaded
void declareConnectionsAsLoaded(EdgeBuildingStep step=EdgeBuildingStep::LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
Definition: NBEdge.h:1301
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
NBEdge::canMoveConnection
bool canMoveConnection(const Connection &con, int newFromLane) const
whether the connection can originate on newFromLane
Definition: NBEdge.cpp:1458
NBEdge::getStep
EdgeBuildingStep getStep() const
The building step of this edge.
Definition: NBEdge.h:580
NBEdge::mirrorX
void mirrorX()
mirror coordinates along the x-axis
Definition: NBEdge.cpp:535
NBEdge::hasRestrictedLane
bool hasRestrictedLane(SUMOVehicleClass vclass) const
returns whether any lane already allows the given vclass exclusively
Definition: NBEdge.cpp:3568
NBSign
A class representing a single street sign.
Definition: NBSign.h:43
NBEdge::shiftPositionAtNode
void shiftPositionAtNode(NBNode *node, NBEdge *opposite)
shift geometry at the given node to avoid overlap
Definition: NBEdge.cpp:3647
NBEdge::getConnection
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:1114
NBEdge::addLane2LaneConnections
bool addLane2LaneConnections(int fromLane, NBEdge *dest, int toLane, int no, Lane2LaneInfoType type, bool invalidatePrevious=false, bool mayDefinitelyPass=false)
Builds no connections starting at the given lanes.
Definition: NBEdge.cpp:1012
NBEdge::Connection::uncontrolled
bool uncontrolled
check if Connection is uncontrolled
Definition: NBEdge.h:275
NBEdge::getNumericalID
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition: NBEdge.h:1366
NBEdge::hasLaneSpecificSpeed
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
Definition: NBEdge.cpp:2027
NBEdge::buildInnerEdges
void buildInnerEdges(const NBNode &n, int noInternalNoSplits, int &linkIndex, int &splitIndex)
Definition: NBEdge.cpp:1495
NBEdge::getSignalOffset
double getSignalOffset() const
Returns the offset of a traffic signal from the end of this edge.
Definition: NBEdge.h:638
LANESPREAD_RIGHT
Definition: SUMOXMLDefinitions.h:1098
NBEdge::getSignalNode
NBNode * getSignalNode() const
Returns the node that (possibly) represents a traffic signal controlling at the end of this edge.
Definition: NBEdge.h:643
NBEdge::setJunctionPriority
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
Definition: NBEdge.cpp:1826
NBEdge::sortOutgoingConnectionsByIndex
void sortOutgoingConnectionsByIndex()
sorts the outgoing connections by their from-lane-index and their to-lane-index
Definition: NBEdge.cpp:1244
NBEdge::geometryPositionAtOffset
Position geometryPositionAtOffset(double offset) const
return position taking into account loaded length
Definition: NBEdge.cpp:3672
NBEdge::setStreetName
void setStreetName(const std::string &name)
sets the street name of this edge
Definition: NBEdge.h:605
NBEdge::setLaneType
void setLaneType(int lane, const std::string &type)
set lane specific type (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3254
NBEdge::connections_toedgelane_finder::operator=
connections_toedgelane_finder & operator=(const connections_toedgelane_finder &s)
invalidated assignment operator
NBEdge::EdgeBuildingStep
EdgeBuildingStep
Current state of the edge within the building process.
Definition: NBEdge.h:108
NBEdge::Connection::permissions
SVCPermissions permissions
List of vehicle types that are allowed on this connection.
Definition: NBEdge.h:245
NBEdge::markAsInLane2LaneState
void markAsInLane2LaneState()
mark edge as in lane to state lane
Definition: NBEdge.cpp:3193
NBEdge::Connection::foeIncomingLanes
std::vector< std::string > foeIncomingLanes
FOE Incomings lanes.
Definition: NBEdge.h:269
NBEdge::prepareEdgePriorities
const std::vector< int > prepareEdgePriorities(const EdgeVector *outgoing, const std::vector< int > &availableLanes)
recomputes the edge priorities and manipulates them for a distribution of lanes on edges which is mor...
Definition: NBEdge.cpp:2612
EdgeVector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:34
NBEdge::setNodeBorder
void setNodeBorder(const NBNode *node, const Position &p, const Position &p2, bool rectangularCut)
Set Node border.
Definition: NBEdge.cpp:633
NBEdge::hasDefaultGeometry
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
Definition: NBEdge.cpp:558
NBEdge::Connection::contPos
double contPos
custom position for internal junction on this connection
Definition: NBEdge.h:233
NBRouterEdge::getSpeed
virtual double getSpeed() const =0
NBEdge::copyConnectionsFrom
void copyConnectionsFrom(NBEdge *src)
copy connections from antoher edge
Definition: NBEdge.cpp:1451
NBEdge::isTurningDirectionAt
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
Definition: NBEdge.cpp:2756
ConstRouterEdgePairVector
std::vector< std::pair< const NBRouterEdge *, const NBRouterEdge * > > ConstRouterEdgePairVector
Definition: NBCont.h:45
NBEdge::computeEdgeShape
void computeEdgeShape(double smoothElevationThreshold=-1)
Recomputeds the lane shapes to terminate at the node shape For every lane the intersection with the f...
Definition: NBEdge.cpp:778
NBEdge::moveConnectionToRight
void moveConnectionToRight(int lane)
Definition: NBEdge.cpp:1482
NBEdge::myFromJunctionPriority
int myFromJunctionPriority
The priority normalised for the node the edge is outgoing of.
Definition: NBEdge.h:1582
NBEdge::getCrossingAngle
double getCrossingAngle(NBNode *node)
return the angle for computing pedestrian crossings at the given node
Definition: NBEdge.cpp:3504
NBEdge::getConnectionsFromLane
std::vector< Connection > getConnectionsFromLane(int lane, NBEdge *to=nullptr, int toLane=-1) const
Returns connections from a given lane.
Definition: NBEdge.cpp:1100
NBEdge::isBidiRail
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
Definition: NBEdge.cpp:691
NBEdge::addEdge2EdgeConnection
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
Definition: NBEdge.cpp:960
NBEdge::EdgeBuildingStep::EDGE2EDGES
The relationships between edges are computed/loaded.
NBEdge::replaceInConnections
void replaceInConnections(NBEdge *which, NBEdge *by, int laneOff)
replace in current connections of edge
Definition: NBEdge.cpp:1348
NBEdge::connections_toedgelane_finder::connections_toedgelane_finder
connections_toedgelane_finder(NBEdge *const edge2find, int lane2find, int fromLane2find)
constructor
Definition: NBEdge.h:1676
NBEdge::connections_relative_edgelane_sorter::myEdge
NBEdge * myEdge
the edge to compute the relative angle of
Definition: NBEdge.h:1804
NBEdge::getViaSuccessors
const ConstRouterEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
Definition: NBEdge.cpp:3736
NBEdge::setControllingTLInformation
bool setControllingTLInformation(const NBConnection &c, const std::string &tlID)
Returns if the link could be set as to be controlled.
Definition: NBEdge.cpp:2820
NBEdge::MINOR_ROAD
Definition: NBEdge.h:346
NBEdge::MainDirections::empty
bool empty() const
returns the information whether no following street has a higher priority
Definition: NBEdge.cpp:243
NBEdge::connections_conflict_finder
Definition: NBEdge.h:1736
NBEdge::getPriority
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:484
NBEdge::MainDirections::myDirs
std::vector< Direction > myDirs
list of the main direction within the following junction relative to the edge
Definition: NBEdge.h:1459
NBEdge::computeLaneShapes
void computeLaneShapes()
compute lane shapes
Definition: NBEdge.cpp:1878
NBEdge::getSpecialLane
int getSpecialLane(SVCPermissions permissions) const
return index of the first lane that allows the given permissions
Definition: NBEdge.cpp:3467
NBEdge::setDistance
void setDistance(double distance)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.h:1279
NBEdge::connections_conflict_finder::myFromLane
int myFromLane
index of from lane
Definition: NBEdge.h:1751
PositionVector::length
double length() const
Returns the length.
Definition: PositionVector.cpp:484
NBEdge::myTurnDestination
NBEdge * myTurnDestination
The turn destination edge (if a connection exists)
Definition: NBEdge.h:1576
NBEdge::myStartAngle
double myStartAngle
The angles of the edge.
Definition: NBEdge.h:1553
NBEdge::Connection::foeInternalLinks
std::vector< int > foeInternalLinks
FOE Internal links.
Definition: NBEdge.h:266
NBEdge::setPermissions
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:3376
NBEdge::getShapeStartAngle
double getShapeStartAngle() const
Returns the angle at the start of the edge.
Definition: NBEdge.cpp:1986
NBEdge::getPermissions
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:3404
NBEdge::ToEdgeConnectionsAdder::ToEdgeConnectionsAdder
ToEdgeConnectionsAdder(const EdgeVector &transitions)
constructor
Definition: NBEdge.h:1401
LinkDirection
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
Definition: SUMOXMLDefinitions.h:1176
NBEdge::setLoadedLength
void setLoadedLength(double val)
set loaded length
Definition: NBEdge.cpp:3419
NBEdge::setLaneSpreadFunction
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
Definition: NBEdge.cpp:885
NBEdge::myIndex
int myIndex
the index of the edge in the list of all edges. Set by NBEdgeCont and requires re-set whenever the li...
Definition: NBEdge.h:1637
NBEdge::Connection::tlLinkIndex
int tlLinkIndex
The index of this connection within the controlling traffic light.
Definition: NBEdge.h:221
NBEdge::DummyEdge
static NBEdge DummyEdge
Dummy edge to use when a reference must be supplied in the no-arguments constructor (FOX technicality...
Definition: NBEdge.h:312
NBEdge::operator=
NBEdge & operator=(const NBEdge &s)
invalidated assignment operator
NBEdge::mySpeed
double mySpeed
The maximal speed.
Definition: NBEdge.h:1562
NBEdge::L2L_USER
The connection was given by the user.
Definition: NBEdge.h:133
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBEdge::connections_fromlane_finder::connections_fromlane_finder
connections_fromlane_finder(int lane2find)
@briefconstructor
Definition: NBEdge.h:1769
NBEdge::myPriority
int myPriority
The priority of the edge.
Definition: NBEdge.h:1559
NBEdge::hasDefaultGeometryEndpointAtNode
bool hasDefaultGeometryEndpointAtNode(const NBNode *node) const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
Definition: NBEdge.cpp:571
Bresenham.h
NBEdge::isRailDeadEnd
bool isRailDeadEnd() const
whether this edge is a railway edge that does not continue
Definition: NBEdge.cpp:702
NBEdge::~NBEdge
~NBEdge()
Destructor.
Definition: NBEdge.cpp:517
NBEdge::extendGeometryAtNode
void extendGeometryAtNode(const NBNode *node, double maxExtent)
linearly extend the geometry at the given node
Definition: NBEdge.cpp:596
NBEdge::remapConnections
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
Definition: NBEdge.cpp:1250
NBEdge::Connection::myViaSuccessors
static ConstRouterEdgePairVector myViaSuccessors
Definition: NBEdge.h:288
NBEdge::tryGetNodeAtPosition
NBNode * tryGetNodeAtPosition(double pos, double tolerance=5.0) const
Returns the node at the given edges length (using an epsilon)
Definition: NBEdge.cpp:2769
NBEdge::UNSPECIFIED_INTERNAL_LANE_INDEX
static const int UNSPECIFIED_INTERNAL_LANE_INDEX
internal lane computation not yet done
Definition: NBEdge.h:339
NBEdge::setInsideTLS
void setInsideTLS()
Marks this edge being within an intersection.
Definition: NBEdge.h:1034
NBEdge::connections_toedge_finder::operator=
connections_toedge_finder & operator=(const connections_toedge_finder &s)
invalidated assignment operator
NBEdge::connections_conflict_finder::operator=
connections_conflict_finder & operator=(const connections_conflict_finder &s)
invalidated assignment operator
NBEdge::connections_fromlane_finder::myLane2Find
int myLane2Find
index of lane to find
Definition: NBEdge.h:1778
NBEdge::assignInternalLaneLength
void assignInternalLaneLength(std::vector< Connection >::iterator i, int numLanes, double lengthSum)
assign length to all lanes of an internal edge
Definition: NBEdge.cpp:1749
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NBEdge::Connection::fromLane
int fromLane
The lane the connections starts at.
Definition: NBEdge.h:209
NBEdge::MainDirections::operator=
MainDirections & operator=(const MainDirections &)
Invalidated assignment operator.
NBEdge::disallowVehicleClass
void disallowVehicleClass(int lane, SUMOVehicleClass vclass)
set disallowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:3213
NBEdge::getCWBoundaryLine
PositionVector getCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going clock-wise around the given node
Definition: NBEdge.cpp:2891
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NBEdge::joinLanes
bool joinLanes(SVCPermissions perms)
join adjacent lanes with the given permissions
Definition: NBEdge.cpp:3783
NBEdge::myGeom
PositionVector myGeom
The geometry for the edge.
Definition: NBEdge.h:1588
NBEdge::MainDirections::DIR_LEFTMOST
Definition: NBEdge.h:1434
NBEdge::reshiftPosition
void reshiftPosition(double xoff, double yoff)
Applies an offset to the edge.
Definition: NBEdge.cpp:522
NBEdge::getFirstNonPedestrianLaneIndex
int getFirstNonPedestrianLaneIndex(int direction, bool exclusive=false) const
return the first lane with permissions other than SVC_PEDESTRIAN and 0
Definition: NBEdge.cpp:3451
NBEdge::Connection::speed
double speed
custom speed for connection
Definition: NBEdge.h:239
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
NBEdge::MainDirections::myStraightest
int myStraightest
the index of the straightmost among the given outgoing edges
Definition: NBEdge.h:1456
NBEdge::connections_conflict_finder::myEdge2Find
NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1754
NBEdge::Connection::toLane
int toLane
The lane the connections yields in.
Definition: NBEdge.h:215
NBEdge::MainDirections::includes
bool includes(Direction d) const
returns the information whether the street in the given direction has a higher priority
Definition: NBEdge.cpp:249
NBEdge::setLaneShape
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
Definition: NBEdge.cpp:3368
NBEdge::setEndOffset
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3300
NBEdge::lanesWereAssigned
bool lanesWereAssigned() const
Check if lanes were assigned.
Definition: NBEdge.cpp:2797
NBEdge::dismissVehicleClassInformation
void dismissVehicleClassInformation()
dimiss vehicle class information
Definition: NBEdge.cpp:3430
NBEdge::invalidateConnections
void invalidateConnections(bool reallowSetting=false)
invalidate current connections of edge
Definition: NBEdge.cpp:1336
NBEdge::connections_relative_edgelane_sorter
Class to sort edges by their angle.
Definition: NBEdge.h:1793
VectorHelper.h
NBEdge::connections_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1710
NBEdge::myFrom
NBNode * myFrom
The source and the destination node.
Definition: NBEdge.h:1546
NBEdge::connections_finder
Definition: NBEdge.h:1703
NBEdge::clearControllingTLInformation
void clearControllingTLInformation()
clears tlID for all connections
Definition: NBEdge.cpp:2883
NBEdge::isNearEnough2BeJoined2
bool isNearEnough2BeJoined2(NBEdge *e, double threshold) const
Check if edge is near enought to be joined to another edge.
Definition: NBEdge.cpp:3099
NBEdge::Lane2LaneInfoType
Lane2LaneInfoType
Modes of setting connections between lanes.
Definition: NBEdge.h:129
NBEdge::getToNode
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:498
NBEdge::connections_toedgelane_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1682
NBEdge::setNumericalID
void setNumericalID(int index)
sets the index of the edge in the list of all network edges
Definition: NBEdge.h:1358
NBEdge::getMaxLaneOffset
double getMaxLaneOffset()
get max lane offset
Definition: NBEdge.cpp:2803
NBEdge::setConnection
bool setConnection(int lane, NBEdge *destEdge, int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED, SVCPermissions permissions=SVC_UNSPECIFIED)
Adds a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:1029
NBEdge::Connection::viaShape
PositionVector viaShape
shape of via
Definition: NBEdge.h:263
NBEdge::decLaneNo
void decLaneNo(int by)
decrement lane
Definition: NBEdge.cpp:3181
NBEdge::getGeometry
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:692
NBEdge::hasLaneSpecificPermissions
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
Definition: NBEdge.cpp:2013
NBEdge::getLaneWidth
double getLaneWidth() const
Returns the default width of lanes of this edge.
Definition: NBEdge.h:587
NBEdge::Connection::mayDefinitelyPass
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Definition: NBEdge.h:227
NBRouterEdge::getViaSuccessors
virtual const ConstRouterEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const =0
NBEdge::connections_conflict_finder::connections_conflict_finder
connections_conflict_finder(int fromLane, NBEdge *const edge2find, bool checkRight)
constructor
Definition: NBEdge.h:1739
NBEdge::hasLaneSpecificEndOffset
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
Definition: NBEdge.cpp:2060
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:218
NBEdge::connections_finder::myLane2Find
int myLane2Find
lane to find
Definition: NBEdge.h:1724
NBEdge::getStopOffsets
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
Definition: NBEdge.h:623
NBEdge::myToJunctionPriority
int myToJunctionPriority
The priority normalised for the node the edge is incoming in.
Definition: NBEdge.h:1585
NBRouterEdge::prohibits
bool prohibits(const NBVehicle *const) const
Definition: NBEdge.h:74
NBEdge::UNSPECIFIED_CONTPOS
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:324
NBEdge::ToEdgeConnectionsAdder::execute
void execute(const int lane, const int virtEdge)
executes a bresenham - step
Definition: NBEdge.cpp:152
NBEdge::Connection::getDescription
std::string getDescription(const NBEdge *parent) const
get string describing this connection
Definition: NBEdge.cpp:87
Parameterised.h
NBEdge::getLaneID
std::string getLaneID(int lane) const
get lane ID
Definition: NBEdge.cpp:3093
NBEdge::EdgeBuildingStep::LANES2LANES_DONE
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
Named.h
NBEdge::recheckLanes
bool recheckLanes()
recheck whether all lanes within the edge are all right and optimises the connections once again
Definition: NBEdge.cpp:2198
NBEdge::setAsMacroscopicConnector
void setAsMacroscopicConnector()
Definition: NBEdge.h:1022
NBRouterEdge::getNumericalID
virtual int getNumericalID() const =0
NBEdge::addCrossingPointsAsIncomingWithGivenOutgoing
void addCrossingPointsAsIncomingWithGivenOutgoing(NBEdge *o, PositionVector &into)
add crossing points as incoming with given outgoing
NBEdge::getLaneIndexFromLaneID
static int getLaneIndexFromLaneID(const std::string laneID)
Definition: NBEdge.cpp:3778
NBEdge::isInsideTLS
bool isInsideTLS() const
Returns whether this edge was marked as being within an intersection.
Definition: NBEdge.h:1041
NBEdge::Connection::shape
PositionVector shape
shape of Connection
Definition: NBEdge.h:251
SUMOVehicleClass.h
NBEdge::getInnerGeometry
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
Definition: NBEdge.cpp:552
NBEdge::moveOutgoingConnectionsFrom
void moveOutgoingConnectionsFrom(NBEdge *e, int laneOff)
move outgoing connection
Definition: NBEdge.cpp:2783
NBEdge::MainDirections::DIR_RIGHTMOST
Definition: NBEdge.h:1434
NBEdge::computeLanes2Edges
bool computeLanes2Edges()
computes the edge, step2: computation of which lanes approach the edges)
Definition: NBEdge.cpp:2166
NBEdge::getFirstAllowedLaneIndex
int getFirstAllowedLaneIndex(int direction) const
return the first lane that permits at least 1 vClass or the last lane if search direction of there is...
Definition: NBEdge.cpp:3477
NBEdge::getNumLanes
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:477
NBEdge::NBEdge
NBEdge()
constructor for dummy edge
Definition: NBEdge.cpp:368
NBEdge::hasLoadedLength
bool hasLoadedLength() const
Returns whether a length was set explicitly.
Definition: NBEdge.h:564
NBEdge::L2L_COMPUTED
The connection was computed.
Definition: NBEdge.h:131
NBEdge::Lane::stopOffsets
std::map< int, double > stopOffsets
stopOffsets.second - The stop offset for vehicles stopping at the lane's end. Applies if vClass is in...
Definition: NBEdge.h:163
NBEdge::myConnectionsToDelete
std::vector< Connection > myConnectionsToDelete
List of connections marked for delayed removal.
Definition: NBEdge.h:1573
NBEdge::connections_finder::myInvertEdge2find
bool myInvertEdge2find
invert edge to find
Definition: NBEdge.h:1727
NBEdge::Connection::tlLinkIndex2
int tlLinkIndex2
The index of the internal junction within the controlling traffic light (optional)
Definition: NBEdge.h:224
ProcessError
Definition: UtilExceptions.h:39
NBEdge::myPossibleTurnDestination
NBEdge * myPossibleTurnDestination
The edge that would be the turn destination if there was one.
Definition: NBEdge.h:1579
NBEdge::setTurningDestination
void setTurningDestination(NBEdge *e, bool onlyPossible=false)
Sets the turing destination at the given edge.
Definition: NBEdge.cpp:1863
NBEdge::computeAngle
void computeAngle()
computes the angle of this edge and stores it in myAngle
Definition: NBEdge.cpp:1934
NBEdge::myEndOffset
double myEndOffset
This edges's offset to the intersection begin (will be applied to all lanes)
Definition: NBEdge.h:1594
NBEdge::hasAccelLane
bool hasAccelLane() const
whether one of the lanes is an acceleration lane
Definition: NBEdge.cpp:2085
NBEdge::setSpeed
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3345
NBEdge::myAmInTLS
bool myAmInTLS
Information whether this is lies within a joined tls.
Definition: NBEdge.h:1614
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
NBEdge::PRIORITY_ROAD
Definition: NBEdge.h:347
NBEdge::ANGLE_LOOKAHEAD
static const double ANGLE_LOOKAHEAD
the distance at which to take the default angle
Definition: NBEdge.h:336
NBVehicle
A vehicle as used by router.
Definition: NBVehicle.h:43
NBEdge::hasLaneSpecificStopOffsets
bool hasLaneSpecificStopOffsets() const
whether lanes differ in stopOffsets
Definition: NBEdge.cpp:2071
NBEdge::connections_relative_edgelane_sorter::connections_relative_edgelane_sorter
connections_relative_edgelane_sorter(NBEdge *e)
constructor
Definition: NBEdge.h:1796
NBEdge::MainDirections::MainDirections
MainDirections(const EdgeVector &outgoing, NBEdge *parent, NBNode *to, const std::vector< int > &availableLanes)
constructor
Definition: NBEdge.cpp:183
NBEdge::getTotalWidth
double getTotalWidth() const
Returns the combined width of all lanes of this edge.
Definition: NBEdge.cpp:3276
UtilExceptions.h
NBHelpers.h
NBEdge::setPreferredVehicleClass
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
set preferred Vehicle Class
Definition: NBEdge.cpp:3390
NBEdge::getSigns
const std::vector< NBSign > & getSigns() const
get Signs
Definition: NBEdge.h:1314
NBEdge::mayBeTLSControlled
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
return true if certain connection must be controlled by TLS
Definition: NBEdge.cpp:2809
PositionVector::EMPTY
static const PositionVector EMPTY
empty Vector
Definition: PositionVector.h:73
NBEdge::startShapeAt
static PositionVector startShapeAt(const PositionVector &laneShape, const NBNode *startNode, PositionVector nodeShape)
Definition: NBEdge.cpp:819
NBEdge::mySuccessors
EdgeVector mySuccessors
Definition: NBEdge.h:1640
NBEdge::Connection::Connection
Connection(int fromLane_, NBEdge *toEdge_, int toLane_)
Constructor.
Definition: NBEdge.cpp:92
NBEdge::myToBorder
PositionVector myToBorder
Definition: NBEdge.h:1632
NBEdge::getLaneStruct
Lane & getLaneStruct(int lane)
Definition: NBEdge.h:1287
NBEdge::Lane::width
double width
This lane's width.
Definition: NBEdge.h:166
NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:327
NBEdge::reduceGeometry
void reduceGeometry(const double minDist)
Removes points with a distance lesser than the given.
Definition: NBEdge.cpp:901
NBEdge::connections_toedge_finder
Definition: NBEdge.h:1648
NBEdge::UNSPECIFIED_SIGNAL_OFFSET
static const double UNSPECIFIED_SIGNAL_OFFSET
unspecified signal offset
Definition: NBEdge.h:333
NBEdge::getConnectionRef
Connection & getConnectionRef(int fromLane, const NBEdge *to, int toLane)
Returns reference to the specified connection This method goes through "myConnections" and returns th...
Definition: NBEdge.cpp:1128
NBEdge::addBikeLane
void addBikeLane(double width)
add a bicycle lane of the given width and shift existing connctions
Definition: NBEdge.cpp:3557
NBEdge::addSidewalk
void addSidewalk(double width)
add a pedestrian sidewalk of the given width and shift existing connctions
Definition: NBEdge.cpp:3545
NBConnection
Definition: NBConnection.h:43
NBEdge::getConnectedSorted
const EdgeVector * getConnectedSorted()
Returns the list of outgoing edges without the turnaround sorted in clockwise direction.
Definition: NBEdge.cpp:1162
NBEdge::Connection::getID
const std::string & getID() const
Definition: NBEdge.h:289
NBEdge::myStep
EdgeBuildingStep myStep
The building step.
Definition: NBEdge.h:1540
NBEdge::resetNodeBorder
void resetNodeBorder(const NBNode *node)
Definition: NBEdge.cpp:680
NBEdge::getAngleAtNodeToCenter
double 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:1848
NBEdge::myViaSuccessors
ConstRouterEdgePairVector myViaSuccessors
Definition: NBEdge.h:1643
NBEdge::UNSPECIFIED_SPEED
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:321
NBEdge::restoreSidewalk
void restoreSidewalk(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added sidewalk
Definition: NBEdge.cpp:3551
NBEdge::removeFromConnections
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false, const bool adaptToLaneRemoval=false, const bool keepPossibleTurns=false)
Removes the specified connection(s)
Definition: NBEdge.cpp:1266
NBEdge::EdgeBuildingStep::INIT_REJECT_CONNECTIONS
The edge has been loaded and connections shall not be added.
NBEdge::L2L_VALIDATED
The connection was computed and validated.
Definition: NBEdge.h:135
NBEdge::JunctionPriority
JunctionPriority
junction priority values set by setJunctionPriority
Definition: NBEdge.h:345
NBRouterEdge::restricts
bool restricts(const NBVehicle *const) const
Definition: NBEdge.h:77
NBEdge::getEndAngle
double getEndAngle() const
Returns the angle at the end of the edge (relative to the node shape center) The angle is computed in...
Definition: NBEdge.h:516
NBRouterEdge
Superclass for NBEdge and NBEdge::Connection to initialize Router.
Definition: NBEdge.h:64
NBEdge::myConnections
std::vector< Connection > myConnections
List of connections to following edges.
Definition: NBEdge.h:1570
NBEdge::getLanes
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:656
NBEdge::myAmMacroscopicConnector
bool myAmMacroscopicConnector
Information whether this edge is a (macroscopic) connector.
Definition: NBEdge.h:1617
NBEdge::UNSPECIFIED_LOADED_LENGTH
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
Definition: NBEdge.h:330
NBEdge::computeEdge2Edges
bool computeEdge2Edges(bool noLeftMovers)
computes the edge (step1: computation of approached edges)
Definition: NBEdge.cpp:2133
NBEdge::getStreetName
const std::string & getStreetName() const
Returns the street name of this edge.
Definition: NBEdge.h:600
NBEdge::getFirstNonPedestrianLane
NBEdge::Lane getFirstNonPedestrianLane(int direction) const
@brif get first non-pedestrian lane
Definition: NBEdge.cpp:3520
NBEdge::expandableBy
bool expandableBy(NBEdge *possContinuation, std::string &reason) const
Check if Node is expandable.
Definition: NBEdge.cpp:2931
NBEdge::getLoadedLength
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
Definition: NBEdge.h:554
NBEdge::connections_toedge_finder::myEdge2Find
const NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1665
NBEdge::getIncomingEdges
EdgeVector getIncomingEdges() const
Returns the list of incoming edges unsorted.
Definition: NBEdge.cpp:1211
NBEdge::connections_toedgelane_finder::myFromLane2Find
int myFromLane2Find
from lane to find
Definition: NBEdge.h:1694
NBEdge::init
void init(int noLanes, bool tryIgnoreNodePositions, const std::string &origID)
Initialization routines common to all constructors.
Definition: NBEdge.cpp:448
NBEdge::Connection::getViaSuccessors
const ConstRouterEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Definition: NBEdge.h:304
NBEdge::getLength
double getLength() const
Returns the computed length of the edge.
Definition: NBEdge.h:545
NBEdge::getEndOffset
double getEndOffset() const
Returns the offset to the destination node.
Definition: NBEdge.h:612
NBEdge::getLaneShape
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
Definition: NBEdge.cpp:879
NBEdge::Connection::isInternal
bool isInternal() const
Definition: NBEdge.h:301
NBEdge::connections_toedge_finder::connections_toedge_finder
connections_toedge_finder(const NBEdge *const edge2find, bool hasFromLane=false)
constructor
Definition: NBEdge.h:1651
NBEdge::Lane::customShape
PositionVector customShape
A custom shape for this lane set by the user.
Definition: NBEdge.h:179
NBEdge::divideOnEdges
void divideOnEdges(const EdgeVector *outgoing)
divides the lanes on the outgoing edges
Definition: NBEdge.cpp:2343
NBEdge::firstIntersection
static double firstIntersection(const PositionVector &v1, const PositionVector &v2, double width2, const std::string &error="")
compute the first intersection point between the given lane geometries considering their rspective wi...
Definition: NBEdge.cpp:1761
NBEdge::connections_fromlane_finder
Definition: NBEdge.h:1766
NBEdge::deleteLane
void deleteLane(int index, bool recompute, bool shiftIndices)
delete lane
Definition: NBEdge.cpp:3161
NBEdge::addGeometryPoint
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
Definition: NBEdge.cpp:891
NBEdge::shiftToLanesToEdge
void shiftToLanesToEdge(NBEdge *to, int laneOff)
modifify the toLane for all connections to the given edge
Definition: NBEdge.cpp:3636
NBEdge::myEndAngle
double myEndAngle
Definition: NBEdge.h:1554
NBEdge::disableConnection4TLS
void disableConnection4TLS(int fromLane, NBEdge *toEdge, int toLane)
disable connections for TLS
NBRouterEdge::getID
virtual const std::string & getID() const =0
NBEdge::connections_finder::myEdge2Find
NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1721
NBEdge::reinit
void reinit(NBNode *from, NBNode *to, const std::string &type, double speed, int nolanes, int priority, PositionVector geom, double width, double endOffset, const std::string &streetName, LaneSpreadFunction spread=LANESPREAD_RIGHT, bool tryIgnoreNodePositions=false)
Resets initial values.
Definition: NBEdge.cpp:374
NBEdge::Connection::id
std::string id
id of Connection
Definition: NBEdge.h:248
NBEdge::getJunctionPriority
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
Definition: NBEdge.cpp:1816
NBEdge::setAcceleration
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
Definition: NBEdge.cpp:3360
NBEdge::setLaneWidth
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3239
NBEdge::connections_conflict_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1743
NBEdge::getSpeed
double getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:571
NBEdge::Connection::viaID
std::string viaID
if Connection have a via, ID of it
Definition: NBEdge.h:260
NBEdge::checkGeometry
void checkGeometry(const double maxAngle, const double minRadius, bool fix, bool silent)
Check the angles of successive geometry segments.
Definition: NBEdge.cpp:914
NBEdge::Lane
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:142
NBEdge::addSign
void addSign(NBSign sign)
add Sign
Definition: NBEdge.h:1319
NBEdge::ToEdgeConnectionsAdder::getBuiltConnections
const std::map< NBEdge *, std::vector< int > > & getBuiltConnections() const
get built connections
Definition: NBEdge.h:1411
NBEdge::getStartAngle
double getStartAngle() const
Returns the angle at the start of the edge (relative to the node shape center) The angle is computed ...
Definition: NBEdge.h:507
NBEdge::Connection::keepClear
bool keepClear
whether the junction must be kept clear when using this connection
Definition: NBEdge.h:230
NBEdge::Lane::oppositeID
std::string oppositeID
An opposite lane ID, if given.
Definition: NBEdge.h:169
NBEdge::myLoadedLength
double myLoadedLength
An optional length to use (-1 if not valid)
Definition: NBEdge.h:1611
NBEdge::hasLaneSpecificType
bool hasLaneSpecificType() const
whether lanes differ in type
Definition: NBEdge.cpp:2049
NBEdge::connections_toedgelane_finder::myEdge2Find
NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1688
NBEdge::hasPermissions
bool hasPermissions() const
whether at least one lane has restrictions
Definition: NBEdge.cpp:2002
NBEdge::myLanes
std::vector< Lane > myLanes
Lane information.
Definition: NBEdge.h:1608
NBEdge::myLaneWidth
double myLaneWidth
This width of this edge's lanes.
Definition: NBEdge.h:1603
NBEdge::Lane::permissions
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
Definition: NBEdge.h:153
NBEdge::ToEdgeConnectionsAdder::myTransitions
const EdgeVector & myTransitions
the transition from the virtual lane to the edge it belongs to
Definition: NBEdge.h:1397
NBEdge::myType
std::string myType
The type of the edge.
Definition: NBEdge.h:1543
NBEdge::getConnectionLanes
std::vector< int > getConnectionLanes(NBEdge *currentOutgoing, bool withBikes=true) const
Returns the list of lanes that may be used to reach the given edge.
Definition: NBEdge.cpp:1224
NBEdge::myStopOffsets
std::map< int, double > myStopOffsets
A vClass specific stop offset - assumed of length 0 (unspecified) or 1. For the latter case the int i...
Definition: NBEdge.h:1600
NBEdge::UNSPECIFIED_WIDTH
static const double UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:315
NBEdge::addLane
void addLane(int index, bool recomputeShape, bool recomputeConnections, bool shiftIndices)
add lane
Definition: NBEdge.cpp:3107
NBEdge::Connection::customShape
PositionVector customShape
custom shape for connection
Definition: NBEdge.h:242
NBEdge::isMacroscopicConnector
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
Definition: NBEdge.h:1029
LaneSpreadFunction
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
Definition: SUMOXMLDefinitions.h:1097
NBEdge::connections_toedgelane_finder::myLane2Find
int myLane2Find
lane to find
Definition: NBEdge.h:1691
NBEdge::moveConnectionToLeft
void moveConnectionToLeft(int lane)
Definition: NBEdge.cpp:1467
NBEdge::getFinalLength
double getFinalLength() const
get length that will be assigned to the lanes in the final network
Definition: NBEdge.cpp:3682
NBEdge::MainDirections::Direction
Direction
enum of possible directions
Definition: NBEdge.h:1434
NBEdge::debugPrintConnections
void debugPrintConnections(bool outgoing=true, bool incoming=false) const
debugging helper to print all connections
Definition: NBEdge.cpp:3759
NBEdge::connections_finder::connections_finder
connections_finder(int fromLane, NBEdge *const edge2find, int lane2find, bool invertEdge2find=false)
constructor
Definition: NBEdge.h:1706
NBEdge::getTypeID
const std::string & getTypeID() const
get ID of type
Definition: NBEdge.h:1074
NBEdge::Lane::accelRamp
bool accelRamp
Whether this lane is an acceleration lane.
Definition: NBEdge.h:172
NBSign.h
NBEdge::getSidewalkID
std::string getSidewalkID()
get the lane id for the canonical sidewalk lane
Definition: NBEdge.cpp:3529
config.h
NBEdge::mySignalOffset
double mySignalOffset
the offset of a traffic light signal from the end of this edge (-1 for None)
Definition: NBEdge.h:1626
NBEdge::getConnectedEdges
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
Definition: NBEdge.cpp:1199
NBEdge::connections_finder::myFromLane
int myFromLane
index of from lane
Definition: NBEdge.h:1718
NBEdge::Connection::getInternalLaneID
std::string getInternalLaneID() const
get ID of internal lane
Definition: NBEdge.cpp:81
NBEdge::getSuccessors
const EdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
Definition: NBEdge.cpp:3718
NBEdge::divideSelectedLanesOnEdges
void divideSelectedLanesOnEdges(const EdgeVector *outgoing, const std::vector< int > &availableLanes)
divide selected lanes on edges
Definition: NBEdge.cpp:2415
NBEdge::getPermissionVariants
std::set< SVCPermissions > getPermissionVariants(int iStart, int iEnd) const
return all permission variants within the specified lane range [iStart, iEnd[
Definition: NBEdge.cpp:3491
NBEdge::connections_toedge_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1656
NBEdge::preferVehicleClass
void preferVehicleClass(int lane, SUMOVehicleClass vclass)
prefer certain vehicle class
Definition: NBEdge.cpp:3226
NBEdge::addRestrictedLane
void addRestrictedLane(double width, SUMOVehicleClass vclass)
add a lane of the given width, restricted to the given class and shift existing connections
Definition: NBEdge.cpp:3579
NBEdge::ToEdgeConnectionsAdder::myConnections
std::map< NBEdge *, std::vector< int > > myConnections
map of edges to this edge's lanes that reach them
Definition: NBEdge.h:1394
NBEdge::getTravelTimeStatic
static double getTravelTimeStatic(const NBEdge *const edge, const NBVehicle *const, double)
Definition: NBEdge.h:1351
NBEdge::ToEdgeConnectionsAdder::operator=
ToEdgeConnectionsAdder & operator=(const ToEdgeConnectionsAdder &)
Invalidated assignment operator.
NBEdge::incLaneNo
void incLaneNo(int by)
increment lane
Definition: NBEdge.cpp:3150
NBEdge::Lane::endOffset
double endOffset
This lane's offset to the intersection begin.
Definition: NBEdge.h:159
NBEdge::bothLeftIntersect
bool bothLeftIntersect(const NBNode &n, const PositionVector &shape, LinkDirection dir, NBEdge *otherFrom, const NBEdge::Connection &otherCon, int numPoints, double width2, int shapeFlag=0) const
determine conflict between opposite left turns
Definition: NBEdge.cpp:1793
NBEdge::Lane::shape
PositionVector shape
The lane's shape.
Definition: NBEdge.h:147
NBEdge::Connection::getLength
double getLength() const
Definition: NBEdge.h:295
Bresenham::BresenhamCallBack
Definition: Bresenham.h:43
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
NBEdge::connections_sorter
static bool connections_sorter(const Connection &c1, const Connection &c2)
connections_sorter sort by fromLane, toEdge and toLane
Definition: NBEdge.cpp:3439
NBEdge::needsLaneSpecificOutput
bool needsLaneSpecificOutput() const
whether at least one lane has values differing from the edges values
Definition: NBEdge.cpp:2117
NBEdge::getLaneStruct
const Lane & getLaneStruct(int lane) const
Definition: NBEdge.h:1294
NBEdge::allowVehicleClass
void allowVehicleClass(int lane, SUMOVehicleClass vclass)
set allowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:3200
NBEdge::hasConnectionTo
bool hasConnectionTo(NBEdge *destEdge, int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:1143
GNEJunction
Definition: GNEJunction.h:47
NBEdge::computeLaneShape
PositionVector computeLaneShape(int lane, double offset) const
Computes the shape for the given lane.
Definition: NBEdge.cpp:1922
NBEdge::hasLaneParams
bool hasLaneParams() const
whether one of the lanes has parameters set
Definition: NBEdge.cpp:2107
NBEdge::getShapeEndAngle
double getShapeEndAngle() const
Returns the angle at the end of the edge.
Definition: NBEdge.cpp:1994
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:189
NBEdge::myStreetName
std::string myStreetName
The street name (or whatever arbitrary string you wish to attach)
Definition: NBEdge.h:1620
SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:135
NBEdge::MainDirections::~MainDirections
~MainDirections()
destructor
Definition: NBEdge.cpp:239
NBEdge::Connection::visibility
double visibility
custom foe visiblity for connection
Definition: NBEdge.h:236
NBEdge::ToEdgeConnectionsAdder::~ToEdgeConnectionsAdder
~ToEdgeConnectionsAdder()
destructor
Definition: NBEdge.h:1405
NBEdge::hasSignalisedConnectionTo
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Check if edge has signalised connections.
Definition: NBEdge.cpp:3073
NBEdge::sortOutgoingConnectionsByAngle
void sortOutgoingConnectionsByAngle()
sorts the outgoing connections by their angle relative to their junction
Definition: NBEdge.cpp:1238
NBEdge::MainDirections::getStraightest
int getStraightest() const
returns the index of the straightmost among the given outgoing edges
Definition: NBEdge.h:1444
NBEdge::MainDirections
Holds (- relative to the edge it is build from -!!!) the list of main directions a vehicle that drive...
Definition: NBEdge.h:1431
NBEdge::Connection::internalLaneIndex
int internalLaneIndex
The lane index of this internal lane within the internal edge.
Definition: NBEdge.h:272
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:76
NBEdge::getAngleAtNode
double getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
Definition: NBEdge.cpp:1836
NBEdge::setAverageLengthWithOpposite
void setAverageLengthWithOpposite(double val)
patch average lane length in regard to the opposite edge
Definition: NBEdge.cpp:3424
NBEdge::getNodeBorder
const PositionVector & getNodeBorder(const NBNode *node)
Definition: NBEdge.cpp:669
PositionVector.h
NBEdge::addLane2LaneConnection
bool addLane2LaneConnection(int fromLane, NBEdge *dest, int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED, SVCPermissions=SVC_UNSPECIFIED)
Adds a connection between the specified this edge's lane and an approached one.
Definition: NBEdge.cpp:984
NBEdge::getConnections
const std::vector< Connection > & getConnections() const
Returns the connections.
Definition: NBEdge.h:934
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:491
NBEdge::getTotalAngle
double getTotalAngle() const
Returns the angle at the start of the edge.
Definition: NBEdge.h:538
NBEdge::setSignalOffset
void setSignalOffset(double offset, NBNode *signalNode)
sets the offset of a traffic signal from the end of this edge
Definition: NBEdge.h:648
NBEdge::myTotalAngle
double myTotalAngle
Definition: NBEdge.h:1555
SUMOXMLDefinitions.h
NBEdge::setStopOffsets
bool setStopOffsets(int lane, std::map< int, double > offsets, bool overwrite=false)
set lane and vehicle class specific stopOffset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3316
NBEdge::getCCWBoundaryLine
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:2911
NBEdge::mySignalNode
NBNode * mySignalNode
Definition: NBEdge.h:1627
NBEdge::connections_fromlane_finder::operator=
connections_fromlane_finder & operator=(const connections_fromlane_finder &s)
invalidated assignment operator
NBEdge::setGeometry
void setGeometry(const PositionVector &g, bool inner=false)
(Re)sets the edge's geometry
Definition: NBEdge.cpp:582
NBEdge::mySigns
std::vector< NBSign > mySigns
the street signs along this edge
Definition: NBEdge.h:1623
NBEdge::EdgeBuildingStep::LANES2LANES_USER
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
NBEdge::hasCustomLaneShape
bool hasCustomLaneShape() const
whether one of the lanes has a custom shape
Definition: NBEdge.cpp:2096
NBEdge::EdgeBuildingStep::LANES2EDGES
Lanes to edges - relationships are computed/loaded.
NBEdge::myLength
double myLength
The length of the edge.
Definition: NBEdge.h:1549
NBCont.h
NBEdge::Lane::connectionsDone
bool connectionsDone
Whether connection information for this lane is already completed.
Definition: NBEdge.h:176
NBEdge::getDistance
double getDistance() const
Definition: NBEdge.h:616
NBRouterEdge::getLength
virtual double getLength() const =0
NBEdge::connections_conflict_finder::myCheckRight
bool myCheckRight
check if is right
Definition: NBEdge.h:1757
NBEdge::EdgeBuildingStep::INIT
The edge has been loaded, nothing is computed yet.
NBEdge::getLaneSpreadFunction
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
Definition: NBEdge.h:777
NBEdge::hasLaneSpecificWidth
bool hasLaneSpecificWidth() const
whether lanes differ in width
Definition: NBEdge.cpp:2038
NBEdge::hasDefaultGeometryEndpoints
bool hasDefaultGeometryEndpoints() const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
Definition: NBEdge.cpp:564
NBEdge::connections_fromlane_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1772
NBEdge::getTurnDestination
NBEdge * getTurnDestination(bool possibleDestination=false) const
Definition: NBEdge.cpp:3084
NBEdge::getID
const std::string & getID() const
Definition: NBEdge.h:1380
NBEdge::MainDirections::DIR_FORWARD
Definition: NBEdge.h:1434
NBEdge::Connection::getNumericalID
int getNumericalID() const
Definition: NBEdge.h:298
NBEdge::restoreRestrictedLane
void restoreRestrictedLane(SUMOVehicleClass vclass, std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore a restricted lane
Definition: NBEdge.cpp:3613