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 /****************************************************************************/
17 // The representation of a single edge during network building
18 /****************************************************************************/
19 #ifndef NBEdge_h
20 #define NBEdge_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <map>
29 #include <vector>
30 #include <string>
31 #include <set>
32 #include <cassert>
33 #include <utils/common/Named.h>
37 #include <utils/geom/Bresenham.h>
41 #include "NBCont.h"
42 #include "NBHelpers.h"
43 #include "NBSign.h"
44 
45 
46 // ===========================================================================
47 // class declarations
48 // ===========================================================================
49 class NBNode;
50 class NBConnection;
51 class NBNodeCont;
52 class NBEdgeCont;
53 class OutputDevice;
54 class GNELane;
55 class NBVehicle;
56 
57 
58 // ===========================================================================
59 // class definitions
60 // ===========================================================================
65 class NBRouterEdge {
66 public:
67  virtual const std::string& getID() const = 0;
68  virtual double getSpeed() const = 0;
69  virtual double getLength() const = 0;
70  virtual int getNumericalID() const = 0;
72  virtual bool isInternal() const {
73  return false;
74  }
75 
76  static inline double getTravelTimeStatic(const NBRouterEdge* const edge, const NBVehicle* const /*veh*/, double /*time*/) {
77  return edge->getLength() / edge->getSpeed();
78  }
79 };
80 
81 
86 class NBEdge : public Named, public Parameterised, public NBRouterEdge {
87  friend class NBEdgeCont;
88 
90  friend class GNELane;
91  friend class GNEEdge;
92  friend class GNEJunction;
93 
94 public:
95 
118  };
119 
120 
131  };
132 
133 
137  struct Lane final : public Parameterised {
139  Lane(NBEdge* e, const std::string& _origID);
140 
143 
145  double speed;
146 
149 
152 
154  double endOffset;
155 
158  std::map<int, double> stopOffsets;
159 
161  double width;
162 
164  std::string oppositeID;
165 
167  bool accelRamp;
168 
170  // @note (see NIImporter_DlrNavteq::ConnectedLanesHandler)
172 
175 
177  std::string type;
178  };
179 
180 
184  struct Connection final : public Parameterised, public NBRouterEdge {
190  Connection(int fromLane_, NBEdge* toEdge_, int toLane_);
191 
193  Connection(int fromLane_, NBEdge* toEdge_, int toLane_, bool mayDefinitelyPass_,
194  bool keepClear_ = true,
195  double contPos_ = UNSPECIFIED_CONTPOS,
196  double visibility_ = UNSPECIFIED_VISIBILITY_DISTANCE,
197  double speed_ = UNSPECIFIED_SPEED,
198  bool haveVia_ = false,
199  bool uncontrolled_ = false,
200  const PositionVector& customShape_ = PositionVector::EMPTY);
201 
203  int fromLane;
204 
207 
209  int toLane;
210 
212  std::string tlID;
213 
216 
219 
221  bool keepClear;
222 
224  double contPos;
225 
227  double visibility;
228 
230  double speed;
231 
234 
236  std::string id;
237 
240 
242  double vmax;
243 
245  bool haveVia;
246 
248  std::string viaID;
249 
252 
254  std::vector<int> foeInternalLinks;
255 
257  std::vector<std::string> foeIncomingLanes;
258 
261 
264 
266  std::string getInternalLaneID() const;
267 
269  std::string getDescription(const NBEdge* parent) const;
270 
272  double length;
273 
277  const std::string& getID() const {
278  return id;
279  }
280  double getSpeed() const {
281  return vmax;
282  }
283  double getLength() const {
284  return shape.length() + viaShape.length();
285  }
286  int getNumericalID() const {
287  throw ProcessError("NBEdge::Connection does not implement getNumericalID()");
288  }
289  bool isInternal() const {
290  return true;
291  }
293  UNUSED_PARAMETER(vClass);
294  return myViaSuccessors;
295  }
297  };
298 
301 
303  static const double UNSPECIFIED_WIDTH;
304 
306  static const double UNSPECIFIED_OFFSET;
307 
309  static const double UNSPECIFIED_SPEED;
310 
312  static const double UNSPECIFIED_CONTPOS;
313 
315  static const double UNSPECIFIED_VISIBILITY_DISTANCE;
316 
318  static const double UNSPECIFIED_LOADED_LENGTH;
319 
321  static const double UNSPECIFIED_SIGNAL_OFFSET;
322 
324  static const double ANGLE_LOOKAHEAD;
325 
328 
331 
336  ROUNDABOUT = 1000
337  };
338 
339 public:
358  NBEdge(const std::string& id,
359  NBNode* from, NBNode* to, std::string type,
360  double speed, int nolanes, int priority,
361  double width, double endOffset,
362  const std::string& streetName = "",
364 
365 
387  NBEdge(const std::string& id,
388  NBNode* from, NBNode* to, std::string type,
389  double speed, int nolanes, int priority,
390  double width, double endOffset,
391  PositionVector geom,
392  const std::string& streetName = "",
393  const std::string& origID = "",
395  bool tryIgnoreNodePositions = false);
396 
408  NBEdge(const std::string& id,
409  NBNode* from, NBNode* to,
410  const NBEdge* tpl,
411  const PositionVector& geom = PositionVector(),
412  int numLanes = -1);
413 
414 
416  ~NBEdge();
417 
418 
434  void reinit(NBNode* from, NBNode* to, const std::string& type,
435  double speed, int nolanes, int priority,
436  PositionVector geom, double width, double endOffset,
437  const std::string& streetName,
439  bool tryIgnoreNodePositions = false);
440 
445  void reinitNodes(NBNode* from, NBNode* to);
446 
449 
453  void reshiftPosition(double xoff, double yoff);
454 
456  void mirrorX();
458 
460 
461 
465  int getNumLanes() const {
466  return (int)myLanes.size();
467  }
468 
472  int getPriority() const {
473  return myPriority;
474  }
475 
479  NBNode* getFromNode() const {
480  return myFrom;
481  }
482 
486  NBNode* getToNode() const {
487  return myTo;
488  }
489 
495  inline double getStartAngle() const {
496  return myStartAngle;
497  }
498 
504  inline double getEndAngle() const {
505  return myEndAngle;
506  }
507 
512  double getShapeStartAngle() const;
513 
514 
520  double getShapeEndAngle() const;
521 
526  inline double getTotalAngle() const {
527  return myTotalAngle;
528  }
529 
533  double getLength() const {
534  return myLength;
535  }
536 
537 
542  double getLoadedLength() const {
543  return myLoadedLength > 0 ? myLoadedLength : myLength;
544  }
545 
547  double getFinalLength() const;
548 
552  bool hasLoadedLength() const {
553  return myLoadedLength > 0;
554  }
555 
559  double getSpeed() const {
560  return mySpeed;
561  }
562 
569  return myStep;
570  }
571 
575  double getLaneWidth() const {
576  return myLaneWidth;
577  }
578 
582  double getLaneWidth(int lane) const;
583 
585  double getTotalWidth() const;
586 
588  const std::string& getStreetName() const {
589  return myStreetName;
590  }
591 
593  void setStreetName(const std::string& name) {
594  myStreetName = name;
595  }
596 
600  double getEndOffset() const {
601  return myEndOffset;
602  }
603 
604  double getDistance() const {
605  return myDistance;
606  }
607 
611  const std::map<int, double>& getStopOffsets() const {
612  return myStopOffsets;
613  }
614 
618  double getEndOffset(int lane) const;
619 
623  const std::map<int, double>& getStopOffsets(int lane) const;
624 
626  double getSignalOffset() const {
627  return mySignalOffset;
628  }
629 
632  return mySignalNode;
633  }
634 
636  void setSignalOffset(double offset, NBNode* signalNode) {
637  mySignalOffset = offset;
638  mySignalNode = signalNode;
639  }
640 
644  const std::vector<NBEdge::Lane>& getLanes() const {
645  return myLanes;
646  }
648 
653  int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const;
654 
656  int getSpecialLane(SVCPermissions permissions) const;
657 
661  int getFirstAllowedLaneIndex(int direction) const;
662 
664  NBEdge::Lane getFirstNonPedestrianLane(int direction) const;
665 
667  std::set<SVCPermissions> getPermissionVariants(int iStart, int iEnd) const;
668 
670  double getCrossingAngle(NBNode* node);
671 
673  std::string getSidewalkID();
674 
676 
677 
680  const PositionVector& getGeometry() const {
681  return myGeom;
682  }
683 
685  const PositionVector getInnerGeometry() const;
686 
688  bool hasDefaultGeometry() const;
689 
695  bool hasDefaultGeometryEndpoints() const;
696 
702  bool hasDefaultGeometryEndpointAtNode(const NBNode* node) const;
703 
714  void setGeometry(const PositionVector& g, bool inner = false);
715 
725  void addGeometryPoint(int index, const Position& p);
726 
728  void extendGeometryAtNode(const NBNode* node, double maxExtent);
729 
731  void shortenGeometryAtNode(const NBNode* node, double reduction);
732 
734  void shiftPositionAtNode(NBNode* node, NBEdge* opposite);
735 
745  void computeEdgeShape(double smoothElevationThreshold = -1);
746 
750  const PositionVector& getLaneShape(int i) const;
751 
757 
763  return myLaneSpreadFunction;
764  }
765 
771  bool splitGeometry(NBEdgeCont& ec, NBNodeCont& nc);
772 
776  void reduceGeometry(const double minDist);
777 
783  void checkGeometry(const double maxAngle, const double minRadius, bool fix);
785 
788 
802  bool addEdge2EdgeConnection(NBEdge* dest);
803 
824  bool addLane2LaneConnection(int fromLane, NBEdge* dest,
825  int toLane, Lane2LaneInfoType type,
826  bool mayUseSameDestination = false,
827  bool mayDefinitelyPass = false,
828  bool keepClear = true,
829  double contPos = UNSPECIFIED_CONTPOS,
830  double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
831  double speed = UNSPECIFIED_SPEED,
832  const PositionVector& customShape = PositionVector::EMPTY,
833  const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED);
834 
852  bool addLane2LaneConnections(int fromLane,
853  NBEdge* dest, int toLane, int no,
854  Lane2LaneInfoType type, bool invalidatePrevious = false,
855  bool mayDefinitelyPass = false);
856 
867  bool setConnection(int lane, NBEdge* destEdge,
868  int destLane,
869  Lane2LaneInfoType type,
870  bool mayUseSameDestination = false,
871  bool mayDefinitelyPass = false,
872  bool keepClear = true,
873  double contPos = UNSPECIFIED_CONTPOS,
874  double visibility = UNSPECIFIED_VISIBILITY_DISTANCE,
875  double speed = UNSPECIFIED_SPEED,
876  const PositionVector& customShape = PositionVector::EMPTY,
877  const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED);
878 
889  std::vector<Connection> getConnectionsFromLane(int lane, NBEdge* to = nullptr, int toLane = -1) const;
890 
895  Connection getConnection(int fromLane, const NBEdge* to, int toLane) const;
896 
901  Connection& getConnectionRef(int fromLane, const NBEdge* to, int toLane);
902 
911  bool hasConnectionTo(NBEdge* destEdge, int destLane, int fromLane = -1) const;
912 
919  bool isConnectedTo(const NBEdge* e) const;
920 
924  const std::vector<Connection>& getConnections() const {
925  return myConnections;
926  }
927 
931  std::vector<Connection>& getConnections() {
932  return myConnections;
933  }
934 
939 
944 
949 
953  std::vector<int> getConnectionLanes(NBEdge* currentOutgoing, bool withBikes = true) const;
954 
957 
960 
966  void remapConnections(const EdgeVector& incoming);
967 
975  void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false, const bool adaptToLaneRemoval = false, const bool keepPossibleTurns = false);
976 
978  bool removeFromConnections(NBEdge::Connection connectionToRemove);
979 
981  void invalidateConnections(bool reallowSetting = false);
982 
984  void replaceInConnections(NBEdge* which, NBEdge* by, int laneOff);
985 
987  void replaceInConnections(NBEdge* which, const std::vector<NBEdge::Connection>& origConns);
988 
990  void copyConnectionsFrom(NBEdge* src);
991 
993  void shiftToLanesToEdge(NBEdge* to, int laneOff);
995 
1001  bool isTurningDirectionAt(const NBEdge* const edge) const;
1002 
1007  void setTurningDestination(NBEdge* e, bool onlyPossible = false);
1008 
1013  myAmMacroscopicConnector = true;
1014  }
1015 
1019  bool isMacroscopicConnector() const {
1020  return myAmMacroscopicConnector;
1021  }
1022 
1024  void setInsideTLS() {
1025  myAmInTLS = true;
1026  }
1027 
1031  bool isInsideTLS() const {
1032  return myAmInTLS;
1033  }
1035 
1041  void setJunctionPriority(const NBNode* const node, int prio);
1042 
1052  int getJunctionPriority(const NBNode* const node) const;
1053 
1055  void setLoadedLength(double val);
1056 
1059 
1061  const std::string& getTypeID() const {
1062  return myType;
1063  }
1064 
1066  bool needsLaneSpecificOutput() const;
1067 
1069  bool hasPermissions() const;
1070 
1072  bool hasLaneSpecificPermissions() const;
1073 
1075  bool hasLaneSpecificSpeed() const;
1076 
1078  bool hasLaneSpecificWidth() const;
1079 
1081  bool hasLaneSpecificType() const;
1082 
1084  bool hasLaneSpecificEndOffset() const;
1085 
1087  bool hasLaneSpecificStopOffsets() const;
1088 
1090  bool hasAccelLane() const;
1091 
1093  bool hasCustomLaneShape() const;
1094 
1096  bool hasLaneParams() const;
1097 
1099  bool computeEdge2Edges(bool noLeftMovers);
1100 
1102  bool computeLanes2Edges();
1103 
1105  bool recheckLanes();
1106 
1115  void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike, bool checkPermissions);
1116 
1120  NBNode* tryGetNodeAtPosition(double pos, double tolerance = 5.0) const;
1121 
1123  double getMaxLaneOffset();
1124 
1126  bool lanesWereAssigned() const;
1127 
1129  bool mayBeTLSControlled(int fromLane, NBEdge* toEdge, int toLane) const;
1130 
1132  bool setControllingTLInformation(const NBConnection& c, const std::string& tlID);
1133 
1136 
1139 
1141  PositionVector getCWBoundaryLine(const NBNode& n) const;
1142 
1144  PositionVector getCCWBoundaryLine(const NBNode& n) const;
1145 
1147  bool expandableBy(NBEdge* possContinuation, std::string& reason) const;
1148 
1150  void append(NBEdge* continuation);
1151 
1153  bool hasSignalisedConnectionTo(const NBEdge* const e) const;
1154 
1156  void moveOutgoingConnectionsFrom(NBEdge* e, int laneOff);
1157 
1158  /* @brief return the turn destination if it exists
1159  * @param[in] possibleDestination Wether myPossibleTurnDestination should be returned if no turnaround connection
1160  * exists
1161  */
1162  NBEdge* getTurnDestination(bool possibleDestination = false) const;
1163 
1165  std::string getLaneID(int lane) const;
1166 
1168  double getLaneSpeed(int lane) const;
1169 
1171  bool isNearEnough2BeJoined2(NBEdge* e, double threshold) const;
1172 
1180  double getAngleAtNode(const NBNode* const node) const;
1181 
1190  double getAngleAtNodeToCenter(const NBNode* const node) const;
1191 
1193  void incLaneNo(int by);
1194 
1196  void decLaneNo(int by);
1197 
1199  void deleteLane(int index, bool recompute, bool shiftIndices);
1200 
1202  void addLane(int index, bool recomputeShape, bool recomputeConnections, bool shiftIndices);
1203 
1205  void markAsInLane2LaneState();
1206 
1208  void addSidewalk(double width);
1209 
1211  void restoreSidewalk(std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1212 
1214  void addBikeLane(double width);
1215 
1217  void restoreBikelane(std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1218 
1220  void setPermissions(SVCPermissions permissions, int lane = -1);
1221 
1223  void setPreferredVehicleClass(SVCPermissions permissions, int lane = -1);
1224 
1226  void allowVehicleClass(int lane, SUMOVehicleClass vclass);
1227 
1229  void disallowVehicleClass(int lane, SUMOVehicleClass vclass);
1230 
1232  void preferVehicleClass(int lane, SUMOVehicleClass vclass);
1233 
1235  void setLaneWidth(int lane, double width);
1236 
1238  void setLaneType(int lane, const std::string& type);
1239 
1241  void setEndOffset(int lane, double offset);
1242 
1244  void setSpeed(int lane, double speed);
1245 
1248  bool setStopOffsets(int lane, std::map<int, double> offsets, bool overwrite = false);
1249 
1251  void setAcceleration(int lane, bool accelRamp);
1252 
1254  void setLaneShape(int lane, const PositionVector& shape);
1255 
1257  SVCPermissions getPermissions(int lane = -1) const;
1258 
1260  void setOrigID(const std::string origID);
1261 
1263  void setDistance(double distance) {
1264  myDistance = distance;
1265  }
1266 
1268  void disableConnection4TLS(int fromLane, NBEdge* toEdge, int toLane);
1269 
1270  // @brief returns a reference to the internal structure for the convenience of NETEDIT
1271  Lane& getLaneStruct(int lane) {
1272  assert(lane >= 0);
1273  assert(lane < (int)myLanes.size());
1274  return myLanes[lane];
1275  }
1276 
1277  // @brief returns a reference to the internal structure for the convenience of NETEDIT
1278  const Lane& getLaneStruct(int lane) const {
1279  assert(lane >= 0);
1280  assert(lane < (int)myLanes.size());
1281  return myLanes[lane];
1282  }
1283 
1286  myStep = step;
1287  }
1288 
1289  /* @brief fill connection attributes shape, viaShape, ...
1290  *
1291  * @param[in,out] edgeIndex The number of connections already handled
1292  * @param[in,out] splitIndex The number of via edges already built
1293  * @param[in] tryIgnoreNodePositions Does not add node geometries if geom.size()>=2
1294  */
1295  void buildInnerEdges(const NBNode& n, int noInternalNoSplits, int& linkIndex, int& splitIndex);
1296 
1298  inline const std::vector<NBSign>& getSigns() const {
1299  return mySigns;
1300  }
1301 
1303  inline void addSign(NBSign sign) {
1304  mySigns.push_back(sign);
1305  }
1306 
1309 
1311  void setNodeBorder(const NBNode* node, const Position& p, const Position& p2, bool rectangularCut);
1312  const PositionVector& getNodeBorder(const NBNode* node);
1313  void resetNodeBorder(const NBNode* node);
1314 
1316  bool isBidiRail(bool ignoreSpread = false) const;
1317 
1319  bool isRailDeadEnd() const;
1320 
1322  void debugPrintConnections(bool outgoing = true, bool incoming = false) const;
1323 
1325  static double firstIntersection(const PositionVector& v1, const PositionVector& v2, double width2, const std::string& error = "");
1326 
1330  static PositionVector startShapeAt(const PositionVector& laneShape, const NBNode* startNode, PositionVector nodeShape);
1331 
1333 
1334 
1335  static inline double getTravelTimeStatic(const NBEdge* const edge, const NBVehicle* const /*veh*/, double /*time*/) {
1336  return edge->getLength() / edge->getSpeed();
1337  }
1338 
1339  static int getLaneIndexFromLaneID(const std::string laneID);
1340 
1342  void setNumericalID(int index) {
1343  myIndex = index;
1344  }
1345 
1350  int getNumericalID() const {
1351  return myIndex;
1352  }
1353 
1356  const EdgeVector& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const;
1357 
1358 
1362 
1364  const std::string& getID() const {
1365  return Named::getID();
1366  }
1367 
1369  bool joinLanes(SVCPermissions perms);
1370 
1371 private:
1376  private:
1378  std::map<NBEdge*, std::vector<int> > myConnections;
1379 
1382 
1383  public:
1386  : myTransitions(transitions) { }
1387 
1390 
1392  void execute(const int lane, const int virtEdge);
1393 
1395  const std::map<NBEdge*, std::vector<int> >& getBuiltConnections() const {
1396  return myConnections;
1397  }
1398 
1399  private:
1402 
1405  };
1406 
1407 
1416  public:
1419 
1420  public:
1422  MainDirections(const EdgeVector& outgoing, NBEdge* parent, NBNode* to, const std::vector<int>& availableLanes);
1423 
1425  ~MainDirections();
1426 
1428  int getStraightest() const {
1429  return myStraightest;
1430  }
1431 
1433  bool empty() const;
1434 
1436  bool includes(Direction d) const;
1437 
1438  private:
1441 
1443  std::vector<Direction> myDirs;
1444 
1447 
1450  };
1451 
1453  PositionVector computeLaneShape(int lane, double offset) const;
1454 
1456  void computeLaneShapes();
1457 
1458 private:
1475  void init(int noLanes, bool tryIgnoreNodePositions, const std::string& origID);
1476 
1478  void divideOnEdges(const EdgeVector* outgoing);
1479 
1481  void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector<int>& availableLanes);
1482 
1484  void addStraightConnections(const EdgeVector* outgoing, const std::vector<int>& availableLanes, const std::vector<int>& priorities);
1485 
1487  const std::vector<int> prepareEdgePriorities(const EdgeVector* outgoing, const std::vector<int>& availableLanes);
1488 
1491 
1494  void moveConnectionToLeft(int lane);
1495 
1499  void moveConnectionToRight(int lane);
1500 
1502  bool canMoveConnection(const Connection& con, int newFromLane) const;
1504 
1506  void computeAngle();
1507 
1509  bool bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2, int shapeFlag = 0) const;
1510 
1512  bool hasRestrictedLane(SUMOVehicleClass vclass) const;
1513 
1515  void addRestrictedLane(double width, SUMOVehicleClass vclass);
1516 
1518  void restoreRestrictedLane(SUMOVehicleClass vclass, std::vector<NBEdge::Lane> oldLanes, PositionVector oldGeometry, std::vector<NBEdge::Connection> oldConnections);
1519 
1521  void assignInternalLaneLength(std::vector<Connection>::iterator i, int numLanes, double lengthSum);
1522 
1523 private:
1528 
1530  std::string myType;
1531 
1534 
1536  double myLength;
1537 
1541  double myEndAngle;
1544 
1547 
1549  double mySpeed;
1550 
1552  double myDistance;
1553 
1557  std::vector<Connection> myConnections;
1558 
1560  std::vector<Connection> myConnectionsToDelete;
1561 
1564 
1567 
1570 
1573 
1576 
1579 
1581  double myEndOffset;
1582 
1587  std::map<int, double> myStopOffsets;
1588 
1590  double myLaneWidth;
1591 
1595  std::vector<Lane> myLanes;
1596 
1599 
1602 
1605 
1607  std::string myStreetName;
1608 
1610  std::vector<NBSign> mySigns;
1611 
1615 
1621 
1622 
1624  int myIndex;
1625 
1626  // @brief a static list of successor edges. Set by NBEdgeCont and requires reset when the network changes
1628 
1629  // @brief a static list of successor edges. Set by NBEdgeCont and requires reset when the network changes
1631 
1632 public:
1633 
1636  public:
1638  connections_toedge_finder(const NBEdge* const edge2find, bool hasFromLane = false) :
1639  myHasFromLane(hasFromLane),
1640  myEdge2Find(edge2find) { }
1641 
1643  bool operator()(const Connection& c) const {
1644  return c.toEdge == myEdge2Find && (!myHasFromLane || c.fromLane != -1);
1645  }
1646 
1647  private:
1649  const bool myHasFromLane;
1650 
1652  const NBEdge* const myEdge2Find;
1653 
1654  private:
1657  };
1658 
1661  public:
1663  connections_toedgelane_finder(NBEdge* const edge2find, int lane2find, int fromLane2find) :
1664  myEdge2Find(edge2find),
1665  myLane2Find(lane2find),
1666  myFromLane2Find(fromLane2find) { }
1667 
1669  bool operator()(const Connection& c) const {
1670  return c.toEdge == myEdge2Find && c.toLane == myLane2Find && (myFromLane2Find < 0 || c.fromLane == myFromLane2Find);
1671  }
1672 
1673  private:
1676 
1679 
1682 
1683  private:
1686 
1687  };
1688 
1691  public:
1693  connections_finder(int fromLane, NBEdge* const edge2find, int lane2find, bool invertEdge2find = false) :
1694  myFromLane(fromLane), myEdge2Find(edge2find), myLane2Find(lane2find), myInvertEdge2find(invertEdge2find) { }
1695 
1697  bool operator()(const Connection& c) const {
1698  return ((c.fromLane == myFromLane || myFromLane == -1)
1700  && (c.toLane == myLane2Find || myLane2Find == -1));
1701  }
1702 
1703  private:
1706 
1709 
1712 
1715 
1716  private:
1719 
1720  };
1721 
1724  public:
1726  connections_conflict_finder(int fromLane, NBEdge* const edge2find, bool checkRight) :
1727  myFromLane(fromLane), myEdge2Find(edge2find), myCheckRight(checkRight) { }
1728 
1730  bool operator()(const Connection& c) const {
1731  return (((myCheckRight && c.fromLane < myFromLane) || (!myCheckRight && c.fromLane > myFromLane))
1732  && c.fromLane >= 0 // already assigned
1733  && c.toEdge == myEdge2Find);
1734  }
1735 
1736  private:
1739 
1742 
1745 
1746  private:
1749 
1750  };
1751 
1754  public:
1756  connections_fromlane_finder(int lane2find) : myLane2Find(lane2find) { }
1757 
1759  bool operator()(const Connection& c) const {
1760  return c.fromLane == myLane2Find;
1761  }
1762 
1763  private:
1766 
1767  private:
1770 
1771  };
1772 
1774  static bool connections_sorter(const Connection& c1, const Connection& c2);
1775 
1781  public:
1784 
1785  public:
1787  int operator()(const Connection& c1, const Connection& c2) const;
1788 
1789  private:
1792  };
1793 
1794 private:
1796  NBEdge(const NBEdge& s);
1797 
1799  NBEdge& operator=(const NBEdge& s);
1800 
1802  NBEdge();
1803 
1804 };
1805 
1806 
1807 #endif
1808 
1809 /****************************************************************************/
1810 
NBEdge::cutAtIntersection
PositionVector cutAtIntersection(const PositionVector &old) const
cut shape at the intersection shapes
Definition: NBEdge.cpp:709
NBEdge::append
void append(NBEdge *continuation)
append another edge
Definition: NBEdge.cpp:3056
NBEdge::Connection::tlID
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBEdge.h:212
NBEdge::reinitNodes
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
Definition: NBEdge.cpp:414
NBEdge::Lane::preferred
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
Definition: NBEdge.h:151
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:32
NBEdge::UNSPECIFIED_OFFSET
static const double UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:306
NBEdge::connections_toedge_finder::myHasFromLane
const bool myHasFromLane
check if has from lane
Definition: NBEdge.h:1649
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
NBEdge::Lane::Lane
Lane(NBEdge *e, const std::string &_origID)
constructor
Definition: NBEdge.cpp:130
NBEdge::connections_relative_edgelane_sorter::operator()
int operator()(const Connection &c1, const Connection &c2) const
comparing operation
Definition: NBEdge.cpp:255
NBEdge::addStraightConnections
void addStraightConnections(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > &priorities)
add some straight connections
Definition: NBEdge.cpp:2557
NBEdge::checkGeometry
void checkGeometry(const double maxAngle, const double minRadius, bool fix)
Check the angles of successive geometry segments.
Definition: NBEdge.cpp:944
NBEdge::Connection::toEdge
NBEdge * toEdge
The edge the connections yields in.
Definition: NBEdge.h:206
NBEdge::Connection::getSpeed
double getSpeed() const
Definition: NBEdge.h:280
NBEdge::Lane::speed
double speed
The speed allowed on this lane.
Definition: NBEdge.h:145
NBEdge::ROUNDABOUT
Definition: NBEdge.h:336
NBEdge::myTo
NBNode * myTo
Definition: NBEdge.h:1533
NBEdge::myFromBorder
PositionVector myFromBorder
intersection borders (because the node shape might be invalid)
Definition: NBEdge.h:1618
NBEdge::setOrigID
void setOrigID(const std::string origID)
set origID for all lanes
Definition: NBEdge.cpp:3725
NBEdge::getLaneSpeed
double getLaneSpeed(int lane) const
get lane speed
Definition: NBEdge.cpp:1899
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:1176
NBEdge::splitGeometry
bool splitGeometry(NBEdgeCont &ec, NBNodeCont &nc)
Splits this edge at geometry points.
Definition: NBEdge.cpp:893
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:2721
NBEdge::Connection::haveVia
bool haveVia
check if Connection have a Via
Definition: NBEdge.h:245
NBEdge::Connection::length
double length
computed length (average of all internal lane shape lengths that share an internal edge)
Definition: NBEdge.h:272
NBEdge::Connection::vmax
double vmax
maximum velocity
Definition: NBEdge.h:242
NBEdge::getConnections
std::vector< Connection > & getConnections()
Returns the connections.
Definition: NBEdge.h:931
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:1552
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:43
Named
Base class for objects which have an id.
Definition: Named.h:57
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:61
NBEdge::UNSPECIFIED_CONNECTION_UNCONTROLLED
static const bool UNSPECIFIED_CONNECTION_UNCONTROLLED
TLS-controlled despite its node controlled not specified.
Definition: NBEdge.h:330
NBEdge::ToEdgeConnectionsAdder
A class that being a bresenham-callback assigns the incoming lanes to the edges.
Definition: NBEdge.h:1375
NBRouterEdge::getTravelTimeStatic
static double getTravelTimeStatic(const NBRouterEdge *const edge, const NBVehicle *const, double)
Definition: NBEdge.h:76
NBEdge::shortenGeometryAtNode
void shortenGeometryAtNode(const NBNode *node, double reduction)
linearly extend the geometry at the given node
Definition: NBEdge.cpp:611
NBEdge::restoreBikelane
void restoreBikelane(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added BikeLane
Definition: NBEdge.cpp:3595
NBEdge::Lane::type
std::string type
the type of this lane
Definition: NBEdge.h:177
NBEdge::connections_toedgelane_finder
Definition: NBEdge.h:1660
NBEdge::myLaneSpreadFunction
LaneSpreadFunction myLaneSpreadFunction
The information about how to spread the lanes.
Definition: NBEdge.h:1578
NBRouterEdge::isInternal
virtual bool isInternal() const
Definition: NBEdge.h:72
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
NBEdge::canMoveConnection
bool canMoveConnection(const Connection &con, int newFromLane) const
whether the connection can originate on newFromLane
Definition: NBEdge.cpp:1485
NBEdge::getStep
EdgeBuildingStep getStep() const
The building step of this edge.
Definition: NBEdge.h:568
NBEdge::mirrorX
void mirrorX()
mirror coordinates along the x-axis
Definition: NBEdge.cpp:527
NBEdge::hasRestrictedLane
bool hasRestrictedLane(SUMOVehicleClass vclass) const
returns whether any lane already allows the given vclass exclusively
Definition: NBEdge.cpp:3600
NBSign
A class representing a single street sign.
Definition: NBSign.h:44
NBEdge::shiftPositionAtNode
void shiftPositionAtNode(NBNode *node, NBEdge *opposite)
shift geometry at the given node to avoid overlap
Definition: NBEdge.cpp:3679
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:1141
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:1041
NBEdge::Connection::uncontrolled
bool uncontrolled
check if Connection is uncontrolled
Definition: NBEdge.h:263
NBEdge::LANES2LANES_RECHECK
Lanes to lanes - relationships are computed; should be recheked.
Definition: NBEdge.h:113
NBEdge::getNumericalID
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition: NBEdge.h:1350
NBEdge::hasLaneSpecificSpeed
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
Definition: NBEdge.cpp:2054
NBEdge::buildInnerEdges
void buildInnerEdges(const NBNode &n, int noInternalNoSplits, int &linkIndex, int &splitIndex)
Definition: NBEdge.cpp:1522
NBEdge::getSignalOffset
double getSignalOffset() const
Returns the offset of a traffic signal from the end of this edge.
Definition: NBEdge.h:626
LANESPREAD_RIGHT
Definition: SUMOXMLDefinitions.h:1093
NBEdge::getSignalNode
NBNode * getSignalNode() const
Returns the node that (possibly) represents a traffic signal controlling at the end of this edge.
Definition: NBEdge.h:631
NBEdge::setJunctionPriority
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
Definition: NBEdge.cpp:1853
NBEdge::sortOutgoingConnectionsByIndex
void sortOutgoingConnectionsByIndex()
sorts the outgoing connections by their from-lane-index and their to-lane-index
Definition: NBEdge.cpp:1271
NBEdge::setStreetName
void setStreetName(const std::string &name)
sets the street name of this edge
Definition: NBEdge.h:593
NBEdge::setLaneType
void setLaneType(int lane, const std::string &type)
set lane specific type (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3286
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:103
NBEdge::markAsInLane2LaneState
void markAsInLane2LaneState()
mark edge as in lane to state lane
Definition: NBEdge.cpp:3225
NBEdge::Connection::foeIncomingLanes
std::vector< std::string > foeIncomingLanes
FOE Incomings lanes.
Definition: NBEdge.h:257
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:2639
EdgeVector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:35
NBEdge::setNodeBorder
void setNodeBorder(const NBNode *node, const Position &p, const Position &p2, bool rectangularCut)
Set Node border.
Definition: NBEdge.cpp:625
NBEdge::hasDefaultGeometry
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
Definition: NBEdge.cpp:550
NBEdge::Connection::contPos
double contPos
custom position for internal junction on this connection
Definition: NBEdge.h:224
NBRouterEdge::getSpeed
virtual double getSpeed() const =0
NBEdge::copyConnectionsFrom
void copyConnectionsFrom(NBEdge *src)
copy connections from antoher edge
Definition: NBEdge.cpp:1478
NBEdge::isTurningDirectionAt
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
Definition: NBEdge.cpp:2783
ConstRouterEdgePairVector
std::vector< std::pair< const NBRouterEdge *, const NBRouterEdge * > > ConstRouterEdgePairVector
Definition: NBCont.h:46
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:770
NBEdge::moveConnectionToRight
void moveConnectionToRight(int lane)
Definition: NBEdge.cpp:1509
NBEdge::myFromJunctionPriority
int myFromJunctionPriority
The priority normalised for the node the edge is outgoing of.
Definition: NBEdge.h:1569
NBEdge::getCrossingAngle
double getCrossingAngle(NBNode *node)
return the angle for computing pedestrian crossings at the given node
Definition: NBEdge.cpp:3536
NBEdge::getConnectionsFromLane
std::vector< Connection > getConnectionsFromLane(int lane, NBEdge *to=nullptr, int toLane=-1) const
Returns connections from a given lane.
Definition: NBEdge.cpp:1127
NBEdge::isBidiRail
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
Definition: NBEdge.cpp:683
NBEdge::addEdge2EdgeConnection
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
Definition: NBEdge.cpp:990
NBEdge::replaceInConnections
void replaceInConnections(NBEdge *which, NBEdge *by, int laneOff)
replace in current connections of edge
Definition: NBEdge.cpp:1375
NBEdge::connections_toedgelane_finder::connections_toedgelane_finder
connections_toedgelane_finder(NBEdge *const edge2find, int lane2find, int fromLane2find)
constructor
Definition: NBEdge.h:1663
NBEdge::connections_relative_edgelane_sorter::myEdge
NBEdge * myEdge
the edge to compute the relative angle of
Definition: NBEdge.h:1791
NBEdge::getViaSuccessors
const ConstRouterEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
Definition: NBEdge.cpp:3758
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:2847
NBEdge::MINOR_ROAD
Definition: NBEdge.h:334
NBEdge::MainDirections::empty
bool empty() const
returns the information whether no following street has a higher priority
Definition: NBEdge.cpp:240
NBEdge::EDGE2EDGES
The relationships between edges are computed/loaded.
Definition: NBEdge.h:109
NBEdge::connections_conflict_finder
Definition: NBEdge.h:1723
NBEdge::getPriority
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:472
NBEdge::MainDirections::myDirs
std::vector< Direction > myDirs
list of the main direction within the following junction relative to the edge
Definition: NBEdge.h:1443
NBEdge::computeLaneShapes
void computeLaneShapes()
compute lane shapes
Definition: NBEdge.cpp:1905
NBEdge::getSpecialLane
int getSpecialLane(SVCPermissions permissions) const
return index of the first lane that allows the given permissions
Definition: NBEdge.cpp:3499
NBEdge::setDistance
void setDistance(double distance)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.h:1263
NBEdge::connections_conflict_finder::myFromLane
int myFromLane
index of from lane
Definition: NBEdge.h:1738
PositionVector::length
double length() const
Returns the length.
Definition: PositionVector.cpp:476
NBEdge::myTurnDestination
NBEdge * myTurnDestination
The turn destination edge (if a connection exists)
Definition: NBEdge.h:1563
NBEdge::myStartAngle
double myStartAngle
The angles of the edge.
Definition: NBEdge.h:1540
NBEdge::Connection::foeInternalLinks
std::vector< int > foeInternalLinks
FOE Internal links.
Definition: NBEdge.h:254
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:3413
NBEdge::getShapeStartAngle
double getShapeStartAngle() const
Returns the angle at the start of the edge.
Definition: NBEdge.cpp:2013
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:3441
NBEdge::ToEdgeConnectionsAdder::ToEdgeConnectionsAdder
ToEdgeConnectionsAdder(const EdgeVector &transitions)
constructor
Definition: NBEdge.h:1385
LinkDirection
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
Definition: SUMOXMLDefinitions.h:1171
NBEdge::setLoadedLength
void setLoadedLength(double val)
set loaded lenght
Definition: NBEdge.cpp:3456
NBEdge::setLaneSpreadFunction
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
Definition: NBEdge.cpp:877
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:1624
NBEdge::Connection::tlLinkIndex
int tlLinkIndex
The index of this connection within the controlling traffic light.
Definition: NBEdge.h:215
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:300
NBEdge::operator=
NBEdge & operator=(const NBEdge &s)
invalidated assignment operator
NBEdge::mySpeed
double mySpeed
The maximal speed.
Definition: NBEdge.h:1549
NBEdge::L2L_USER
The connection was given by the user.
Definition: NBEdge.h:128
PositionVector
A list of positions.
Definition: PositionVector.h:46
NBEdge::connections_fromlane_finder::connections_fromlane_finder
connections_fromlane_finder(int lane2find)
@briefconstructor
Definition: NBEdge.h:1756
NBEdge::myPriority
int myPriority
The priority of the edge.
Definition: NBEdge.h:1546
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:563
Bresenham.h
NBEdge::isRailDeadEnd
bool isRailDeadEnd() const
whether this edge is a railway edge that does not continue
Definition: NBEdge.cpp:694
NBEdge::~NBEdge
~NBEdge()
Destructor.
Definition: NBEdge.cpp:509
NBEdge::extendGeometryAtNode
void extendGeometryAtNode(const NBNode *node, double maxExtent)
linearly extend the geometry at the given node
Definition: NBEdge.cpp:588
NBEdge::remapConnections
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
Definition: NBEdge.cpp:1277
NBEdge::Connection::myViaSuccessors
static ConstRouterEdgePairVector myViaSuccessors
Definition: NBEdge.h:276
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:2796
NBEdge::UNSPECIFIED_INTERNAL_LANE_INDEX
static const int UNSPECIFIED_INTERNAL_LANE_INDEX
internal lane computation not yet done
Definition: NBEdge.h:327
NBEdge::setInsideTLS
void setInsideTLS()
Marks this edge being within an intersection.
Definition: NBEdge.h:1024
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:1765
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:1776
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:60
NBEdge::Connection::fromLane
int fromLane
The lane the connections starts at.
Definition: NBEdge.h:203
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:3245
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:2915
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:86
NBEdge::LANES2EDGES
Lanes to edges - relationships are computed/loaded.
Definition: NBEdge.h:111
NBEdge::joinLanes
bool joinLanes(SVCPermissions perms)
join adjacent lanes with the given permissions
Definition: NBEdge.cpp:3805
NBEdge::myGeom
PositionVector myGeom
The geometry for the edge.
Definition: NBEdge.h:1575
NBEdge::MainDirections::DIR_LEFTMOST
Definition: NBEdge.h:1418
NBEdge::reshiftPosition
void reshiftPosition(double xoff, double yoff)
Applies an offset to the edge.
Definition: NBEdge.cpp:514
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:3483
NBEdge::Connection::speed
double speed
custom speed for connection
Definition: NBEdge.h:230
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
NBEdge::MainDirections::myStraightest
int myStraightest
the index of the straightmost among the given outgoing edges
Definition: NBEdge.h:1440
NBEdge::LANES2LANES_DONE
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
Definition: NBEdge.h:115
NBEdge::connections_conflict_finder::myEdge2Find
NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1741
NBEdge::Connection::toLane
int toLane
The lane the connections yields in.
Definition: NBEdge.h:209
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:246
NBEdge::setLaneShape
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
Definition: NBEdge.cpp:3405
NBEdge::setEndOffset
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3332
NBEdge::lanesWereAssigned
bool lanesWereAssigned() const
Check if lanes were assigned.
Definition: NBEdge.cpp:2824
NBEdge::dismissVehicleClassInformation
void dismissVehicleClassInformation()
dimiss vehicle class information
Definition: NBEdge.cpp:3462
NBEdge::invalidateConnections
void invalidateConnections(bool reallowSetting=false)
invalidate current connections of edge
Definition: NBEdge.cpp:1363
NBEdge::connections_relative_edgelane_sorter
Class to sort edges by their angle.
Definition: NBEdge.h:1780
VectorHelper.h
NBEdge::connections_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1697
NBEdge::myFrom
NBNode * myFrom
The source and the destination node.
Definition: NBEdge.h:1533
NBEdge::connections_finder
Definition: NBEdge.h:1690
NBEdge::clearControllingTLInformation
void clearControllingTLInformation()
clears tlID for all connections
Definition: NBEdge.cpp:2907
NBEdge::isNearEnough2BeJoined2
bool isNearEnough2BeJoined2(NBEdge *e, double threshold) const
Check if edge is near enought to be joined to another edge.
Definition: NBEdge.cpp:3131
NBEdge::Lane2LaneInfoType
Lane2LaneInfoType
Modes of setting connections between lanes.
Definition: NBEdge.h:124
NBEdge::getToNode
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:486
NBEdge::connections_toedgelane_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1669
NBEdge::setNumericalID
void setNumericalID(int index)
sets the index of the edge in the list of all network edges
Definition: NBEdge.h:1342
NBEdge::getMaxLaneOffset
double getMaxLaneOffset()
get max lane offset
Definition: NBEdge.cpp:2830
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)
Adds a connection between the specified this edge's lane and an approached one.
Definition: NBEdge.cpp:1014
NBEdge::Connection::viaShape
PositionVector viaShape
shape of via
Definition: NBEdge.h:251
NBEdge::decLaneNo
void decLaneNo(int by)
decrement lane
Definition: NBEdge.cpp:3213
NBEdge::getGeometry
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:680
NBEdge::hasLaneSpecificPermissions
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
Definition: NBEdge.cpp:2040
NBEdge::getLaneWidth
double getLaneWidth() const
Returns the default width of lanes of this edge.
Definition: NBEdge.h:575
NBEdge::Connection::mayDefinitelyPass
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Definition: NBEdge.h:218
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:1726
NBEdge::hasLaneSpecificEndOffset
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
Definition: NBEdge.cpp:2087
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:219
NBEdge::connections_finder::myLane2Find
int myLane2Find
lane to find
Definition: NBEdge.h:1711
NBEdge::getStopOffsets
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
Definition: NBEdge.h:611
NBEdge::myToJunctionPriority
int myToJunctionPriority
The priority normalised for the node the edge is incoming in.
Definition: NBEdge.h:1572
NBEdge::UNSPECIFIED_CONTPOS
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:312
NBEdge::ToEdgeConnectionsAdder::execute
void execute(const int lane, const int virtEdge)
executes a bresenham - step
Definition: NBEdge.cpp:149
NBEdge::Connection::getDescription
std::string getDescription(const NBEdge *parent) const
get string describing this connection
Definition: NBEdge.cpp:88
Parameterised.h
NBEdge::getLaneID
std::string getLaneID(int lane) const
get lane ID
Definition: NBEdge.cpp:3125
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:2225
NBEdge::setAsMacroscopicConnector
void setAsMacroscopicConnector()
Definition: NBEdge.h:1012
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:3800
NBEdge::isInsideTLS
bool isInsideTLS() const
Returns whether this edge was marked as being within an intersection.
Definition: NBEdge.h:1031
NBEdge::Connection::shape
PositionVector shape
shape of Connection
Definition: NBEdge.h:239
SUMOVehicleClass.h
NBEdge::getInnerGeometry
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
Definition: NBEdge.cpp:544
NBEdge::moveOutgoingConnectionsFrom
void moveOutgoingConnectionsFrom(NBEdge *e, int laneOff)
move outgoing connection
Definition: NBEdge.cpp:2810
NBEdge::MainDirections::DIR_RIGHTMOST
Definition: NBEdge.h:1418
NBEdge::computeLanes2Edges
bool computeLanes2Edges()
computes the edge, step2: computation of which lanes approach the edges)
Definition: NBEdge.cpp:2193
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:3509
NBEdge::getNumLanes
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:465
NBEdge::NBEdge
NBEdge()
constructor for dummy edge
Definition: NBEdge.cpp:361
NBEdge::hasLoadedLength
bool hasLoadedLength() const
Returns whether a length was set explicitly.
Definition: NBEdge.h:552
NBEdge::L2L_COMPUTED
The connection was computed.
Definition: NBEdge.h:126
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:158
NBEdge::myConnectionsToDelete
std::vector< Connection > myConnectionsToDelete
List of connections marked for delayed removal.
Definition: NBEdge.h:1560
NBEdge::connections_finder::myInvertEdge2find
bool myInvertEdge2find
invert edge to find
Definition: NBEdge.h:1714
ProcessError
Definition: UtilExceptions.h:40
NBEdge::myPossibleTurnDestination
NBEdge * myPossibleTurnDestination
The edge that would be the turn destination if there was one.
Definition: NBEdge.h:1566
NBEdge::setTurningDestination
void setTurningDestination(NBEdge *e, bool onlyPossible=false)
Sets the turing destination at the given edge.
Definition: NBEdge.cpp:1890
NBEdge::computeAngle
void computeAngle()
computes the angle of this edge and stores it in myAngle
Definition: NBEdge.cpp:1961
NBEdge::myEndOffset
double myEndOffset
This edges's offset to the intersection begin (will be applied to all lanes)
Definition: NBEdge.h:1581
NBEdge::hasAccelLane
bool hasAccelLane() const
whether one of the lanes is an acceleration lane
Definition: NBEdge.cpp:2112
NBEdge::setSpeed
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3382
NBEdge::myAmInTLS
bool myAmInTLS
Information whether this is lies within a joined tls.
Definition: NBEdge.h:1601
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
NBEdge::PRIORITY_ROAD
Definition: NBEdge.h:335
NBEdge::ANGLE_LOOKAHEAD
static const double ANGLE_LOOKAHEAD
the distance at which to take the default angle
Definition: NBEdge.h:324
NBVehicle
A vehicle as used by router.
Definition: NBVehicle.h:44
NBEdge::hasLaneSpecificStopOffsets
bool hasLaneSpecificStopOffsets() const
whether lanes differ in stopOffsets
Definition: NBEdge.cpp:2098
NBEdge::connections_relative_edgelane_sorter::connections_relative_edgelane_sorter
connections_relative_edgelane_sorter(NBEdge *e)
constructor
Definition: NBEdge.h:1783
NBEdge::MainDirections::MainDirections
MainDirections(const EdgeVector &outgoing, NBEdge *parent, NBNode *to, const std::vector< int > &availableLanes)
constructor
Definition: NBEdge.cpp:180
NBEdge::getTotalWidth
double getTotalWidth() const
Returns the combined width of all lanes of this edge.
Definition: NBEdge.cpp:3308
UtilExceptions.h
NBHelpers.h
NBEdge::setPreferredVehicleClass
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
set preferred Vehicle Class
Definition: NBEdge.cpp:3427
NBEdge::getSigns
const std::vector< NBSign > & getSigns() const
get Signs
Definition: NBEdge.h:1298
NBEdge::mayBeTLSControlled
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
return true if certain connection must be controlled by TLS
Definition: NBEdge.cpp:2836
PositionVector::EMPTY
static const PositionVector EMPTY
empty Vector
Definition: PositionVector.h:74
NBEdge::startShapeAt
static PositionVector startShapeAt(const PositionVector &laneShape, const NBNode *startNode, PositionVector nodeShape)
Definition: NBEdge.cpp:811
NBEdge::mySuccessors
EdgeVector mySuccessors
Definition: NBEdge.h:1627
NBEdge::Connection::Connection
Connection(int fromLane_, NBEdge *toEdge_, int toLane_)
Constructor.
Definition: NBEdge.cpp:93
NBEdge::myToBorder
PositionVector myToBorder
Definition: NBEdge.h:1619
NBEdge::getLaneStruct
Lane & getLaneStruct(int lane)
Definition: NBEdge.h:1271
NBEdge::Lane::width
double width
This lane's width.
Definition: NBEdge.h:161
NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:315
NBEdge::reduceGeometry
void reduceGeometry(const double minDist)
Removes points with a distance lesser than the given.
Definition: NBEdge.cpp:938
NBEdge::connections_toedge_finder
Definition: NBEdge.h:1635
NBEdge::UNSPECIFIED_SIGNAL_OFFSET
static const double UNSPECIFIED_SIGNAL_OFFSET
unspecified signal offset
Definition: NBEdge.h:321
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:1155
NBEdge::addBikeLane
void addBikeLane(double width)
add a bicycle lane of the given width and shift existing connctions
Definition: NBEdge.cpp:3589
NBEdge::addSidewalk
void addSidewalk(double width)
add a pedestrian sidewalk of the given width and shift existing connctions
Definition: NBEdge.cpp:3577
NBConnection
Definition: NBConnection.h:44
NBEdge::getConnectedSorted
const EdgeVector * getConnectedSorted()
Returns the list of outgoing edges without the turnaround sorted in clockwise direction.
Definition: NBEdge.cpp:1189
NBEdge::Connection::getID
const std::string & getID() const
Definition: NBEdge.h:277
NBEdge::myStep
EdgeBuildingStep myStep
The building step.
Definition: NBEdge.h:1527
NBEdge::resetNodeBorder
void resetNodeBorder(const NBNode *node)
Definition: NBEdge.cpp:672
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:1875
NBEdge::myViaSuccessors
ConstRouterEdgePairVector myViaSuccessors
Definition: NBEdge.h:1630
NBEdge::UNSPECIFIED_SPEED
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:309
NBEdge::restoreSidewalk
void restoreSidewalk(std::vector< NBEdge::Lane > oldLanes, PositionVector oldGeometry, std::vector< NBEdge::Connection > oldConnections)
restore an previously added sidewalk
Definition: NBEdge.cpp:3583
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:1293
NBEdge::L2L_VALIDATED
The connection was computed and validated.
Definition: NBEdge.h:130
NBEdge::declareConnectionsAsLoaded
void declareConnectionsAsLoaded(EdgeBuildingStep step=LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
Definition: NBEdge.h:1285
NBEdge::JunctionPriority
JunctionPriority
junction priority values set by setJunctionPriority
Definition: NBEdge.h:333
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:504
NBRouterEdge
Superclass for NBEdge and NBEdge::Connection to initialize Router.
Definition: NBEdge.h:65
NBEdge::myConnections
std::vector< Connection > myConnections
List of connections to following edges.
Definition: NBEdge.h:1557
NBEdge::getLanes
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:644
NBEdge::myAmMacroscopicConnector
bool myAmMacroscopicConnector
Information whether this edge is a (macroscopic) connector.
Definition: NBEdge.h:1604
NBEdge::UNSPECIFIED_LOADED_LENGTH
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
Definition: NBEdge.h:318
NBEdge::computeEdge2Edges
bool computeEdge2Edges(bool noLeftMovers)
computes the edge (step1: computation of approached edges)
Definition: NBEdge.cpp:2160
NBEdge::getStreetName
const std::string & getStreetName() const
Returns the street name of this edge.
Definition: NBEdge.h:588
NBEdge::getFirstNonPedestrianLane
NBEdge::Lane getFirstNonPedestrianLane(int direction) const
@brif get first non-pedestrian lane
Definition: NBEdge.cpp:3552
NBEdge::expandableBy
bool expandableBy(NBEdge *possContinuation, std::string &reason) const
Check if Node is expandable.
Definition: NBEdge.cpp:2955
NBEdge::getLoadedLength
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
Definition: NBEdge.h:542
NBEdge::connections_toedge_finder::myEdge2Find
const NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1652
NBEdge::getIncomingEdges
EdgeVector getIncomingEdges() const
Returns the list of incoming edges unsorted.
Definition: NBEdge.cpp:1238
NBEdge::connections_toedgelane_finder::myFromLane2Find
int myFromLane2Find
from lane to find
Definition: NBEdge.h:1681
NBEdge::init
void init(int noLanes, bool tryIgnoreNodePositions, const std::string &origID)
Initialization routines common to all constructors.
Definition: NBEdge.cpp:440
NBEdge::Connection::getViaSuccessors
const ConstRouterEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Definition: NBEdge.h:292
NBEdge::getLength
double getLength() const
Returns the computed length of the edge.
Definition: NBEdge.h:533
NBEdge::getEndOffset
double getEndOffset() const
Returns the offset to the destination node.
Definition: NBEdge.h:600
NBEdge::getLaneShape
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
Definition: NBEdge.cpp:871
NBEdge::Connection::isInternal
bool isInternal() const
Definition: NBEdge.h:289
NBEdge::connections_toedge_finder::connections_toedge_finder
connections_toedge_finder(const NBEdge *const edge2find, bool hasFromLane=false)
constructor
Definition: NBEdge.h:1638
NBEdge::Lane::customShape
PositionVector customShape
A custom shape for this lane set by the user.
Definition: NBEdge.h:174
NBEdge::divideOnEdges
void divideOnEdges(const EdgeVector *outgoing)
divides the lanes on the outgoing edges
Definition: NBEdge.cpp:2370
NBEdge::INIT
The edge has been loaded, nothing is computed yet.
Definition: NBEdge.h:107
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:1788
NBEdge::connections_fromlane_finder
Definition: NBEdge.h:1753
NBEdge::deleteLane
void deleteLane(int index, bool recompute, bool shiftIndices)
delete lane
Definition: NBEdge.cpp:3193
NBEdge::addGeometryPoint
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
Definition: NBEdge.cpp:883
NBEdge::shiftToLanesToEdge
void shiftToLanesToEdge(NBEdge *to, int laneOff)
modifify the toLane for all connections to the given edge
Definition: NBEdge.cpp:3668
NBEdge::myEndAngle
double myEndAngle
Definition: NBEdge.h:1541
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:1708
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:366
NBEdge::Connection::id
std::string id
id of Connection
Definition: NBEdge.h:236
NBEdge::getJunctionPriority
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
Definition: NBEdge.cpp:1843
NBEdge::setAcceleration
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
Definition: NBEdge.cpp:3397
NBEdge::setLaneWidth
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3271
NBEdge::connections_conflict_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1730
NBEdge::getSpeed
double getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:559
NBEdge::Connection::viaID
std::string viaID
if Connection have a via, ID of it
Definition: NBEdge.h:248
NBEdge::Lane
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:137
NBEdge::addSign
void addSign(NBSign sign)
add Sign
Definition: NBEdge.h:1303
NBEdge::ToEdgeConnectionsAdder::getBuiltConnections
const std::map< NBEdge *, std::vector< int > > & getBuiltConnections() const
get built connections
Definition: NBEdge.h:1395
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:495
NBEdge::Connection::keepClear
bool keepClear
whether the junction must be kept clear when using this connection
Definition: NBEdge.h:221
NBEdge::Lane::oppositeID
std::string oppositeID
An opposite lane ID, if given.
Definition: NBEdge.h:164
NBEdge::myLoadedLength
double myLoadedLength
An optional length to use (-1 if not valid)
Definition: NBEdge.h:1598
NBEdge::hasLaneSpecificType
bool hasLaneSpecificType() const
whether lanes differ in type
Definition: NBEdge.cpp:2076
NBEdge::connections_toedgelane_finder::myEdge2Find
NBEdge *const myEdge2Find
edge to find
Definition: NBEdge.h:1675
NBEdge::hasPermissions
bool hasPermissions() const
whether at least one lane has restrictions
Definition: NBEdge.cpp:2029
NBEdge::myLanes
std::vector< Lane > myLanes
Lane information.
Definition: NBEdge.h:1595
NBEdge::myLaneWidth
double myLaneWidth
This width of this edge's lanes.
Definition: NBEdge.h:1590
NBEdge::Lane::permissions
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
Definition: NBEdge.h:148
NBEdge::ToEdgeConnectionsAdder::myTransitions
const EdgeVector & myTransitions
the transition from the virtual lane to the edge it belongs to
Definition: NBEdge.h:1381
NBEdge::myType
std::string myType
The type of the edge.
Definition: NBEdge.h:1530
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:1251
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:1587
NBEdge::UNSPECIFIED_WIDTH
static const double UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:303
NBEdge::addLane
void addLane(int index, bool recomputeShape, bool recomputeConnections, bool shiftIndices)
add lane
Definition: NBEdge.cpp:3139
NBEdge::Connection::customShape
PositionVector customShape
custom shape for connection
Definition: NBEdge.h:233
NBEdge::isMacroscopicConnector
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
Definition: NBEdge.h:1019
LaneSpreadFunction
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
Definition: SUMOXMLDefinitions.h:1092
NBEdge::connections_toedgelane_finder::myLane2Find
int myLane2Find
lane to find
Definition: NBEdge.h:1678
NBEdge::moveConnectionToLeft
void moveConnectionToLeft(int lane)
Definition: NBEdge.cpp:1494
NBEdge::getFinalLength
double getFinalLength() const
get length that will be assigned to the lanes in the final network
Definition: NBEdge.cpp:3704
NBEdge::MainDirections::Direction
Direction
enum of possible directions
Definition: NBEdge.h:1418
NBEdge::debugPrintConnections
void debugPrintConnections(bool outgoing=true, bool incoming=false) const
debugging helper to print all connections
Definition: NBEdge.cpp:3781
NBEdge::connections_finder::connections_finder
connections_finder(int fromLane, NBEdge *const edge2find, int lane2find, bool invertEdge2find=false)
constructor
Definition: NBEdge.h:1693
NBEdge::getTypeID
const std::string & getTypeID() const
get ID of type
Definition: NBEdge.h:1061
NBEdge::Lane::accelRamp
bool accelRamp
Whether this lane is an acceleration lane.
Definition: NBEdge.h:167
NBSign.h
NBEdge::getSidewalkID
std::string getSidewalkID()
get the lane id for the canonical sidewalk lane
Definition: NBEdge.cpp:3561
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:1613
NBEdge::getConnectedEdges
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
Definition: NBEdge.cpp:1226
NBEdge::connections_finder::myFromLane
int myFromLane
index of from lane
Definition: NBEdge.h:1705
NBEdge::Connection::getInternalLaneID
std::string getInternalLaneID() const
get ID of internal lane
Definition: NBEdge.cpp:82
NBEdge::getSuccessors
const EdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges for the given vClass.
Definition: NBEdge.cpp:3740
NBEdge::divideSelectedLanesOnEdges
void divideSelectedLanesOnEdges(const EdgeVector *outgoing, const std::vector< int > &availableLanes)
divide selected lanes on edges
Definition: NBEdge.cpp:2442
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:3523
NBEdge::connections_toedge_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1643
NBEdge::preferVehicleClass
void preferVehicleClass(int lane, SUMOVehicleClass vclass)
prefer certain vehicle class
Definition: NBEdge.cpp:3258
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:3611
NBEdge::ToEdgeConnectionsAdder::myConnections
std::map< NBEdge *, std::vector< int > > myConnections
map of edges to this edge's lanes that reach them
Definition: NBEdge.h:1378
NBEdge::getTravelTimeStatic
static double getTravelTimeStatic(const NBEdge *const edge, const NBVehicle *const, double)
Definition: NBEdge.h:1335
NBEdge::ToEdgeConnectionsAdder::operator=
ToEdgeConnectionsAdder & operator=(const ToEdgeConnectionsAdder &)
Invalidated assignment operator.
NBEdge::incLaneNo
void incLaneNo(int by)
increment lane
Definition: NBEdge.cpp:3182
NBEdge::Lane::endOffset
double endOffset
This lane's offset to the intersection begin.
Definition: NBEdge.h:154
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:1820
NBEdge::INIT_REJECT_CONNECTIONS
The edge has been loaded and connections shall not be added.
Definition: NBEdge.h:105
NBEdge::Lane::shape
PositionVector shape
The lane's shape.
Definition: NBEdge.h:142
NBEdge::Connection::getLength
double getLength() const
Definition: NBEdge.h:283
Bresenham::BresenhamCallBack
Definition: Bresenham.h:44
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:68
NBEdge::connections_sorter
static bool connections_sorter(const Connection &c1, const Connection &c2)
connections_sorter sort by fromLane, toEdge and toLane
Definition: NBEdge.cpp:3471
NBEdge::needsLaneSpecificOutput
bool needsLaneSpecificOutput() const
whether at least one lane has values differing from the edges values
Definition: NBEdge.cpp:2144
NBEdge::getLaneStruct
const Lane & getLaneStruct(int lane) const
Definition: NBEdge.h:1278
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:3232
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:1170
GNEJunction
Definition: GNEJunction.h:48
NBEdge::computeLaneShape
PositionVector computeLaneShape(int lane, double offset) const
Computes the shape for the given lane.
Definition: NBEdge.cpp:1949
NBEdge::hasLaneParams
bool hasLaneParams() const
whether one of the lanes has parameters set
Definition: NBEdge.cpp:2134
NBEdge::getShapeEndAngle
double getShapeEndAngle() const
Returns the angle at the end of the edge.
Definition: NBEdge.cpp:2021
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:184
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)
Adds a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:1058
NBEdge::myStreetName
std::string myStreetName
The street name (or whatever arbitrary string you wish to attach)
Definition: NBEdge.h:1607
NBEdge::LANES2LANES_USER
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
Definition: NBEdge.h:117
SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:136
NBEdge::MainDirections::~MainDirections
~MainDirections()
destructor
Definition: NBEdge.cpp:236
NBEdge::Connection::visibility
double visibility
custom foe visiblity for connection
Definition: NBEdge.h:227
NBEdge::ToEdgeConnectionsAdder::~ToEdgeConnectionsAdder
~ToEdgeConnectionsAdder()
destructor
Definition: NBEdge.h:1389
NBEdge::hasSignalisedConnectionTo
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Check if edge has signalised connections.
Definition: NBEdge.cpp:3105
NBEdge::sortOutgoingConnectionsByAngle
void sortOutgoingConnectionsByAngle()
sorts the outgoing connections by their angle relative to their junction
Definition: NBEdge.cpp:1265
NBEdge::MainDirections::getStraightest
int getStraightest() const
returns the index of the straightmost among the given outgoing edges
Definition: NBEdge.h:1428
NBEdge::MainDirections
Holds (- relative to the edge it is build from -!!!) the list of main directions a vehicle that drive...
Definition: NBEdge.h:1415
NBEdge::Connection::internalLaneIndex
int internalLaneIndex
The lane index of this internal lane within the internal edge.
Definition: NBEdge.h:260
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:77
NBEdge::getAngleAtNode
double getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
Definition: NBEdge.cpp:1863
NBEdge::getNodeBorder
const PositionVector & getNodeBorder(const NBNode *node)
Definition: NBEdge.cpp:661
PositionVector.h
NBEdge::getConnections
const std::vector< Connection > & getConnections() const
Returns the connections.
Definition: NBEdge.h:924
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:479
NBEdge::getTotalAngle
double getTotalAngle() const
Returns the angle at the start of the edge.
Definition: NBEdge.h:526
NBEdge::setSignalOffset
void setSignalOffset(double offset, NBNode *signalNode)
sets the offset of a traffic signal from the end of this edge
Definition: NBEdge.h:636
NBEdge::myTotalAngle
double myTotalAngle
Definition: NBEdge.h:1542
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:3348
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:2935
NBEdge::mySignalNode
NBNode * mySignalNode
Definition: NBEdge.h:1614
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:574
NBEdge::mySigns
std::vector< NBSign > mySigns
the street signs along this edge
Definition: NBEdge.h:1610
NBEdge::hasCustomLaneShape
bool hasCustomLaneShape() const
whether one of the lanes has a custom shape
Definition: NBEdge.cpp:2123
NBEdge::myLength
double myLength
The length of the edge.
Definition: NBEdge.h:1536
NBCont.h
NBEdge::Lane::connectionsDone
bool connectionsDone
Whether connection information for this lane is already completed.
Definition: NBEdge.h:171
NBEdge::getDistance
double getDistance() const
Definition: NBEdge.h:604
NBRouterEdge::getLength
virtual double getLength() const =0
NBEdge::connections_conflict_finder::myCheckRight
bool myCheckRight
check if is right
Definition: NBEdge.h:1744
NBEdge::getLaneSpreadFunction
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
Definition: NBEdge.h:762
NBEdge::hasLaneSpecificWidth
bool hasLaneSpecificWidth() const
whether lanes differ in width
Definition: NBEdge.cpp:2065
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:556
NBEdge::connections_fromlane_finder::operator()
bool operator()(const Connection &c) const
operator ()
Definition: NBEdge.h:1759
NBEdge::getTurnDestination
NBEdge * getTurnDestination(bool possibleDestination=false) const
Definition: NBEdge.cpp:3116
NBEdge::getID
const std::string & getID() const
Definition: NBEdge.h:1364
NBEdge::MainDirections::DIR_FORWARD
Definition: NBEdge.h:1418
NBEdge::Connection::getNumericalID
int getNumericalID() const
Definition: NBEdge.h:286
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:3645