SUMO - Simulation of Urban MObility
NBEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // The representation of a single edge during network building
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NBEdge_h
23 #define NBEdge_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <map>
36 #include <vector>
37 #include <string>
38 #include <set>
39 #include <utils/common/Named.h>
43 #include <utils/geom/Bresenham.h>
47 #include "NBCont.h"
48 #include "NBHelpers.h"
49 #include "NBSign.h"
50 
51 
52 // ===========================================================================
53 // class declarations
54 // ===========================================================================
55 class NBNode;
56 class NBConnection;
57 class NBNodeCont;
58 class NBEdgeCont;
59 class OutputDevice;
60 class GNELane;
61 
62 
63 // ===========================================================================
64 // class definitions
65 // ===========================================================================
70 class NBEdge : public Named, public Parameterised {
72  friend class NBEdgeSuccessorBuilder;
73  friend class NBEdgeCont;
74 
76  friend class GNELane;
77  friend class GNEEdge;
78 
79 public:
80 
103  };
104 
105 
116  };
117 
118 
122  struct Lane {
123  Lane(NBEdge* e, const std::string& _origID) :
126  origID(_origID) {}
140  std::string origID;
142  std::string oppositeID;
143 
144  };
145 
146 
150  struct Connection {
156  Connection(int fromLane_, NBEdge* toEdge_, int toLane_)
157  : fromLane(fromLane_), toEdge(toEdge_), toLane(toLane_),
158  mayDefinitelyPass(false), keepClear(true), haveVia(false) { }
159 
161 
162 
164  int fromLane;
168  int toLane;
170  std::string tlID;
172  int tlLinkNo;
176  bool keepClear;
179 
180 
181  std::string origID;
182 
183  std::string id;
186 
187  bool haveVia;
188  std::string viaID;
191 
192  std::vector<int> foeInternalLinks;
193  std::string foeIncomingLanes;
194 
197 
198  std::string getInternalLaneID() const;
199 
200  };
201 
210 
216  static const SUMOReal ANGLE_LOOKAHEAD;
217 
218 public:
237  NBEdge(const std::string& id,
238  NBNode* from, NBNode* to, std::string type,
239  SUMOReal speed, int nolanes, int priority,
240  SUMOReal width, SUMOReal offset,
241  const std::string& streetName = "",
243 
244 
266  NBEdge(const std::string& id,
267  NBNode* from, NBNode* to, std::string type,
268  SUMOReal speed, int nolanes, int priority,
269  SUMOReal width, SUMOReal offset,
270  PositionVector geom,
271  const std::string& streetName = "",
272  const std::string& origID = "",
274  bool tryIgnoreNodePositions = false);
275 
287  NBEdge(const std::string& id,
288  NBNode* from, NBNode* to,
289  NBEdge* tpl,
290  const PositionVector& geom = PositionVector(),
291  int numLanes = -1);
292 
293 
296  ~NBEdge();
297 
298 
314  void reinit(NBNode* from, NBNode* to, const std::string& type,
315  SUMOReal speed, int nolanes, int priority,
316  PositionVector geom, SUMOReal width, SUMOReal offset,
317  const std::string& streetName,
319  bool tryIgnoreNodePositions = false);
320 
325  void reinitNodes(NBNode* from, NBNode* to);
326 
327 
330 
335  void reshiftPosition(SUMOReal xoff, SUMOReal yoff);
336 
338  void mirrorX();
340 
342 
343 
347  int getNumLanes() const {
348  return (int)myLanes.size();
349  }
350 
351 
355  int getPriority() const {
356  return myPriority;
357  }
358 
359 
363  NBNode* getFromNode() const {
364  return myFrom;
365  }
366 
367 
371  NBNode* getToNode() const {
372  return myTo;
373  }
374 
375 
381  inline SUMOReal getStartAngle() const {
382  return myStartAngle;
383  }
384 
385 
391  inline SUMOReal getEndAngle() const {
392  return myEndAngle;
393  }
394 
400 
401 
407  SUMOReal getShapeEndAngle() const;
408 
409 
410 
411 
413 
417  inline SUMOReal getTotalAngle() const {
418  return myTotalAngle;
419  }
420 
424  SUMOReal getLength() const {
425  return myLength;
426  }
427 
428 
434  return myLoadedLength > 0 ? myLoadedLength : myLength;
435  }
436 
438  SUMOReal getFinalLength() const;
439 
443  bool hasLoadedLength() const {
444  return myLoadedLength > 0;
445  }
446 
447 
451  SUMOReal getSpeed() const {
452  return mySpeed;
453  }
454 
455 
462  return myStep;
463  }
464 
465 
470  return myLaneWidth;
471  }
472 
476  SUMOReal getLaneWidth(int lane) const;
477 
478 
481  SUMOReal getTotalWidth() const;
482 
485  const std::string& getStreetName() const {
486  return myStreetName;
487  }
488 
491  void setStreetName(const std::string& name) {
492  myStreetName = name;
493  }
494 
499  return myEndOffset;
500  }
501 
505  SUMOReal getEndOffset(int lane) const;
506 
510  return mySignalOffset;
511  }
512 
515  void setSignalOffset(SUMOReal offset) {
516  mySignalOffset = offset;
517  }
518 
522  const std::vector<NBEdge::Lane>& getLanes() const {
523  return myLanes;
524  }
526 
531  int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const;
532  NBEdge::Lane getFirstNonPedestrianLane(int direction) const;
533 
535  std::set<SVCPermissions> getPermissionVariants(int iStart, int iEnd) const;
536 
539 
541 
542 
546  const PositionVector& getGeometry() const {
547  return myGeom;
548  }
549 
550 
552  const PositionVector getInnerGeometry() const;
553 
554 
557  bool hasDefaultGeometry() const;
558 
559 
565  bool hasDefaultGeometryEndpoints() const;
566 
567 
578  void setGeometry(const PositionVector& g, bool inner = false);
579 
580 
590  void addGeometryPoint(int index, const Position& p);
591 
595  void shiftPositionAtNode(NBNode* node, NBEdge* opposite);
596 
606  void computeEdgeShape();
607 
608 
612  const PositionVector& getLaneShape(int i) const;
613 
614 
620 
621 
627  return myLaneSpreadFunction;
628  }
629 
630 
636  bool splitGeometry(NBEdgeCont& ec, NBNodeCont& nc);
637 
638 
642  void reduceGeometry(const SUMOReal minDist);
643 
644 
650  void checkGeometry(const SUMOReal maxAngle, const SUMOReal minRadius, bool fix);
652 
653 
654 
657 
672  bool addEdge2EdgeConnection(NBEdge* dest);
673 
674 
695  bool addLane2LaneConnection(int fromLane, NBEdge* dest,
696  int toLane, Lane2LaneInfoType type,
697  bool mayUseSameDestination = false,
698  bool mayDefinitelyPass = false,
699  bool keepClear = true,
700  SUMOReal contPos = UNSPECIFIED_CONTPOS);
701 
702 
720  bool addLane2LaneConnections(int fromLane,
721  NBEdge* dest, int toLane, int no,
722  Lane2LaneInfoType type, bool invalidatePrevious = false,
723  bool mayDefinitelyPass = false);
724 
725 
736  bool setConnection(int lane, NBEdge* destEdge,
737  int destLane,
738  Lane2LaneInfoType type,
739  bool mayUseSameDestination = false,
740  bool mayDefinitelyPass = false,
741  bool keepClear = true,
742  SUMOReal contPos = UNSPECIFIED_CONTPOS);
743 
744 
745 
754  std::vector<Connection> getConnectionsFromLane(int lane) const;
755 
760  Connection getConnection(int fromLane, const NBEdge* to, int toLane) const;
761 
762 
771  bool hasConnectionTo(NBEdge* destEdge, int destLane, int fromLane = -1) const;
772 
773 
780  bool isConnectedTo(NBEdge* e);
781 
782 
786  const std::vector<Connection>& getConnections() const {
787  return myConnections;
788  }
789 
790 
794  std::vector<Connection>& getConnections() {
795  return myConnections;
796  }
797 
798 
803 
804 
809 
810 
814  std::vector<int> getConnectionLanes(NBEdge* currentOutgoing) const;
815 
816 
820 
821 
825 
826 
832  void remapConnections(const EdgeVector& incoming);
833 
834 
841  void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false);
842 
843  void invalidateConnections(bool reallowSetting = false);
844 
845  void replaceInConnections(NBEdge* which, NBEdge* by, int laneOff);
846  void replaceInConnections(NBEdge* which, const std::vector<NBEdge::Connection>& origConns);
847  void copyConnectionsFrom(NBEdge* src);
848 
850  void shiftToLanesToEdge(NBEdge* to, int laneOff);
852 
853 
854 
860  bool isTurningDirectionAt(const NBEdge* const edge) const;
861 
862 
867  void setTurningDestination(NBEdge* e, bool onlyPossible = false);
868 
869 
870 
873 
878  }
879 
880 
884  bool isMacroscopicConnector() const {
886  }
887 
888 
891  void setIsInnerEdge() {
892  myAmInnerEdge = true;
893  }
894 
895 
899  bool isInnerEdge() const {
900  return myAmInnerEdge;
901  }
903 
904 
905 
906 
912  void setJunctionPriority(const NBNode* const node, int prio);
913 
914 
924  int getJunctionPriority(const NBNode* const node) const;
925 
926  void setLoadedLength(SUMOReal val);
928 
929 
930  const std::string& getTypeID() const {
931  return myType;
932  }
933 
935  bool needsLaneSpecificOutput() const;
936 
938  bool hasPermissions() const;
939 
941  bool hasLaneSpecificPermissions() const;
942 
944  bool hasLaneSpecificSpeed() const;
945 
947  bool hasLaneSpecificWidth() const;
948 
950  bool hasLaneSpecificEndOffset() const;
951 
953  bool computeEdge2Edges(bool noLeftMovers);
954 
956  bool computeLanes2Edges();
957 
960  bool recheckLanes();
961 
970  void appendTurnaround(bool noTLSControlled, bool checkPermissions);
971 
972 
973 
977  NBNode* tryGetNodeAtPosition(SUMOReal pos, SUMOReal tolerance = 5.0) const;
978 
979 
981 
982  bool lanesWereAssigned() const;
983 
984  bool mayBeTLSControlled(int fromLane, NBEdge* toEdge, int toLane) const;
985 
987  bool setControllingTLInformation(const NBConnection& c, const std::string& tlID);
988 
991 
993  PositionVector& into);
994 
996  PositionVector getCWBoundaryLine(const NBNode& n) const;
997 
999  PositionVector getCCWBoundaryLine(const NBNode& n) const;
1000 
1001  bool expandableBy(NBEdge* possContinuation) const;
1002  void append(NBEdge* continuation);
1003 
1004  bool hasSignalisedConnectionTo(const NBEdge* const e) const;
1005 
1006 
1007  void moveOutgoingConnectionsFrom(NBEdge* e, int laneOff);
1008 
1009  /* @brief return the turn destination if it exists
1010  * @param[in] possibleDestination Wether myPossibleTurnDestination should be returned if no turnaround connection
1011  * exists
1012  */
1013  NBEdge* getTurnDestination(bool possibleDestination = false) const;
1014 
1015  std::string getLaneID(int lane) const;
1016 
1017  std::string getLaneIDInsecure(int lane) const;
1018 
1019  SUMOReal getLaneSpeed(int lane) const;
1020 
1021  bool isNearEnough2BeJoined2(NBEdge* e, SUMOReal threshold) const;
1022 
1023 
1031  SUMOReal getAngleAtNode(const NBNode* const node) const;
1032 
1033 
1042  SUMOReal getAngleAtNodeToCenter(const NBNode* const node) const;
1043 
1044 
1045  void incLaneNo(int by);
1046 
1047  void decLaneNo(int by);
1048 
1049  void deleteLane(int index, bool recompute = true);
1050 
1051  void addLane(int index, bool recompute = true);
1052 
1053  void markAsInLane2LaneState();
1054 
1056  void addSidewalk(SUMOReal width);
1057 
1059  void addBikeLane(SUMOReal width);
1060 
1062  void setPermissions(SVCPermissions permissions, int lane = -1);
1063 
1064  void setPreferredVehicleClass(SVCPermissions permissions, int lane = -1);
1065 
1067  void allowVehicleClass(int lane, SUMOVehicleClass vclass);
1069  void disallowVehicleClass(int lane, SUMOVehicleClass vclass);
1070 
1071  void preferVehicleClass(int lane, SUMOVehicleClass vclass);
1072 
1073 
1075  void setLaneWidth(int lane, SUMOReal width);
1076 
1078  void setEndOffset(int lane, SUMOReal offset);
1079 
1081  void setSpeed(int lane, SUMOReal speed);
1082 
1084  SVCPermissions getPermissions(int lane = -1) const;
1085 
1086  void disableConnection4TLS(int fromLane, NBEdge* toEdge, int toLane);
1087 
1088 
1089  // returns a reference to the internal structure for the convenience of NETEDIT
1090  Lane& getLaneStruct(int lane) {
1091  return myLanes[lane];
1092  }
1093 
1094  // returns a reference to the internal structure for the convenience of NETEDIT
1095  const Lane& getLaneStruct(int lane) const {
1096  return myLanes[lane];
1097  }
1098 
1099  /* declares connections as fully loaded. This is needed to avoid recomputing connections
1100  * if an edge has no connections intentionally. */
1103  }
1104 
1105  /* @brief fill connection attributes shape, viaShape, ...
1106  *
1107  * @param[in,out] edgeIndex The number of connections already handled
1108  * @param[in,out] splitIndex The number of via edges already built
1109  * @param[in] tryIgnoreNodePositions Does not add node geometries if geom.size()>=2
1110  */
1111  void buildInnerEdges(const NBNode& n, int noInternalNoSplits, int& linkIndex, int& splitIndex);
1112 
1113  inline const std::vector<NBSign>& getSigns() const {
1114  return mySigns;
1115  }
1116 
1117  inline void addSign(NBSign sign) {
1118  mySigns.push_back(sign);
1119  }
1120 
1123 
1124 private:
1131  private:
1133  std::map<NBEdge*, std::vector<int> > myConnections;
1134 
1137 
1138  public:
1141  : myTransitions(transitions) { }
1142 
1145 
1147  void execute(const int lane, const int virtEdge);
1148 
1149  const std::map<NBEdge*, std::vector<int> >& getBuiltConnections() const {
1150  return myConnections;
1151  }
1152 
1153  private:
1156 
1159 
1160  };
1161 
1162 
1171  public:
1173  enum Direction { DIR_RIGHTMOST, DIR_LEFTMOST, DIR_FORWARD };
1174 
1177  std::vector<Direction> myDirs;
1178 
1179  public:
1181  MainDirections(const EdgeVector& outgoing,
1182  NBEdge* parent, NBNode* to, int indexOfStraightest);
1183 
1185  ~MainDirections();
1186 
1189  bool empty() const;
1190 
1193  bool includes(Direction d) const;
1194 
1195  private:
1198 
1201 
1202  };
1203 
1205  PositionVector computeLaneShape(int lane, SUMOReal offset) const;
1206 
1207  void computeLaneShapes();
1208 
1209 
1210 
1211 private:
1228  void init(int noLanes, bool tryIgnoreNodePositions, const std::string& origID);
1229 
1230 
1232  void divideOnEdges(const EdgeVector* outgoing);
1233  void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector<int>& availableLanes,
1234  const std::vector<int>* priorities);
1235 
1237  void addStraightConnections(const EdgeVector* outgoing, const std::vector<int>& availableLanes, const std::vector<int>* priorities);
1238 
1241  std::vector<int>* prepareEdgePriorities(
1242  const EdgeVector* outgoing);
1243 
1245  static int computePrioritySum(const std::vector<int>& priorities);
1246 
1247 
1250 
1253  void moveConnectionToLeft(int lane);
1254 
1257  void moveConnectionToRight(int lane);
1258 
1260  bool canMoveConnection(const Connection& con, int newFromLane) const;
1262 
1263 
1268  PositionVector startShapeAt(const PositionVector& laneShape, const NBNode* startNode) const;
1269 
1271  void computeAngle();
1272 
1273 
1274  /* @brief compute the first intersection point between the given lane
1275  * geometries considering their rspective widths */
1276  static SUMOReal firstIntersection(const PositionVector& v1, const PositionVector& v2, SUMOReal width2);
1277 
1278 
1280  void addRestrictedLane(SUMOReal width, SUMOVehicleClass vclass);
1281 
1282 private:
1287 
1289  std::string myType;
1290 
1293 
1296 
1301 
1304 
1307 
1311  std::vector<Connection> myConnections;
1312 
1315  std::vector<Connection> myConnectionsToDelete;
1316 
1321 
1324 
1327 
1330 
1333 
1336 
1339 
1343  std::vector<Lane> myLanes;
1344 
1347 
1350 
1353 
1357  int toLane;
1358  };
1359 
1360  std::vector<TLSDisabledConnection> myTLSDisabledConnections;
1361 
1362 
1364  std::string myStreetName;
1365 
1366 
1368  std::vector<NBSign> mySigns;
1369 
1372 
1373 public:
1378  public:
1380  tls_disable_finder(const TLSDisabledConnection& tpl) : myDefinition(tpl) { }
1381 
1382  bool operator()(const TLSDisabledConnection& e) const {
1383  if (e.to != myDefinition.to) {
1384  return false;
1385  }
1386  if (e.fromLane != myDefinition.fromLane) {
1387  return false;
1388  }
1389  if (e.toLane != myDefinition.toLane) {
1390  return false;
1391  }
1392  return true;
1393  }
1394 
1395  private:
1397 
1398  private:
1401 
1402  };
1403 
1404 
1405 
1410  public:
1412  connections_toedge_finder(NBEdge* const edge2find, bool hasFromLane = false) :
1413  myHasFromLane(hasFromLane),
1414  myEdge2Find(edge2find) { }
1415 
1416  bool operator()(const Connection& c) const {
1417  return c.toEdge == myEdge2Find && (!myHasFromLane || c.fromLane != -1);
1418  }
1419 
1420  private:
1421  const bool myHasFromLane;
1423 
1424  private:
1427 
1428  };
1429 
1434  public:
1436  connections_toedgelane_finder(NBEdge* const edge2find, int lane2find, int fromLane2find) :
1437  myEdge2Find(edge2find),
1438  myLane2Find(lane2find),
1439  myFromLane2Find(fromLane2find) { }
1440 
1441  bool operator()(const Connection& c) const {
1442  return c.toEdge == myEdge2Find && c.toLane == myLane2Find && (myFromLane2Find < 0 || c.fromLane == myFromLane2Find);
1443  }
1444 
1445  private:
1449 
1450  private:
1453 
1454  };
1455 
1456 
1461  public:
1463  connections_finder(int fromLane, NBEdge* const edge2find, int lane2find, bool invertEdge2find = false) :
1464  myFromLane(fromLane), myEdge2Find(edge2find), myLane2Find(lane2find), myInvertEdge2find(invertEdge2find) { }
1465 
1466  bool operator()(const Connection& c) const {
1467  return ((c.fromLane == myFromLane || myFromLane == -1)
1468  && ((!myInvertEdge2find && c.toEdge == myEdge2Find) || (myInvertEdge2find && c.toEdge != myEdge2Find))
1469  && (c.toLane == myLane2Find || myLane2Find == -1));
1470  }
1471 
1472  private:
1477 
1478  private:
1481 
1482  };
1483 
1484 
1489  public:
1491  connections_conflict_finder(int fromLane, NBEdge* const edge2find, bool checkRight) :
1492  myFromLane(fromLane), myEdge2Find(edge2find), myCheckRight(checkRight) { }
1493 
1494  bool operator()(const Connection& c) const {
1495  return (((myCheckRight && c.fromLane < myFromLane) || (!myCheckRight && c.fromLane > myFromLane))
1496  && c.fromLane >= 0 // already assigned
1497  && c.toEdge == myEdge2Find);
1498  }
1499 
1500  private:
1504 
1505  private:
1508 
1509  };
1510 
1515  public:
1517  connections_fromlane_finder(int lane2find) : myLane2Find(lane2find) { }
1518 
1519  bool operator()(const Connection& c) const {
1520  return c.fromLane == myLane2Find;
1521  }
1522 
1523  private:
1525 
1526  private:
1529 
1530  };
1531 
1535  static bool connections_sorter(const Connection& c1, const Connection& c2);
1536 
1542  public:
1544  explicit connections_relative_edgelane_sorter(NBEdge* e) : myEdge(e) {}
1545 
1546  public:
1548  int operator()(const Connection& c1, const Connection& c2) const;
1549 
1550  private:
1553  };
1554 
1555 private:
1557  NBEdge(const NBEdge& s);
1558 
1560  NBEdge& operator=(const NBEdge& s);
1561 
1562 
1563 };
1564 
1565 
1566 #endif
1567 
1568 /****************************************************************************/
1569 
ToEdgeConnectionsAdder(const EdgeVector &transitions)
constructor
Definition: NBEdge.h:1140
NBEdge::Lane getFirstNonPedestrianLane(int direction) const
Definition: NBEdge.cpp:2663
std::string id
Definition: NBEdge.h:183
void moveConnectionToRight(int lane)
Definition: NBEdge.cpp:1074
void invalidateConnections(bool reallowSetting=false)
Definition: NBEdge.cpp:962
int tlLinkNo
The index of this connection within the controlling traffic light.
Definition: NBEdge.h:172
void init(int noLanes, bool tryIgnoreNodePositions, const std::string &origID)
Initialization routines common to all constructors.
Definition: NBEdge.cpp:347
std::vector< Lane > myLanes
Lane information.
Definition: NBEdge.h:1343
PositionVector cutAtIntersection(const PositionVector &old) const
cut shape at the intersection shapes
Definition: NBEdge.cpp:463
const std::string & getTypeID() const
Definition: NBEdge.h:930
bool setControllingTLInformation(const NBConnection &c, const std::string &tlID)
Returns if the link could be set as to be controlled.
Definition: NBEdge.cpp:2102
SUMOReal endOffset
This lane&#39;s offset to the intersection begin.
Definition: NBEdge.h:136
void divideOnEdges(const EdgeVector *outgoing)
Definition: NBEdge.cpp:1640
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:150
int toLane
The lane the connections yields in.
Definition: NBEdge.h:168
static const SUMOReal UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:203
SUMOReal myTotalAngle
Definition: NBEdge.h:1300
A class representing a single street sign.
Definition: NBSign.h:51
std::string foeIncomingLanes
Definition: NBEdge.h:193
connections_conflict_finder(int fromLane, NBEdge *const edge2find, bool checkRight)
constructor
Definition: NBEdge.h:1491
PositionVector shape
The lane&#39;s shape.
Definition: NBEdge.h:128
SUMOReal myEndOffset
This edges&#39;s offset to the intersection begin (will be applied to all lanes)
Definition: NBEdge.h:1335
std::vector< TLSDisabledConnection > myTLSDisabledConnections
Definition: NBEdge.h:1360
connections_relative_edgelane_sorter(NBEdge *e)
constructor
Definition: NBEdge.h:1544
~NBEdge()
Destructor.
Definition: NBEdge.cpp:400
static const SUMOReal UNSPECIFIED_SIGNAL_OFFSET
unspecified signal offset
Definition: NBEdge.h:214
LaneSpreadFunction myLaneSpreadFunction
The information about how to spread the lanes.
Definition: NBEdge.h:1332
SUMOReal viaVmax
Definition: NBEdge.h:189
void sortOutgoingConnectionsByAngle()
sorts the outgoing connections by their angle relative to their junction
Definition: NBEdge.cpp:907
std::string viaID
Definition: NBEdge.h:188
void addSign(NBSign sign)
Definition: NBEdge.h:1117
NBEdge * toEdge
The edge the connections yields in.
Definition: NBEdge.h:166
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
Definition: NBEdge.cpp:436
void mirrorX()
mirror coordinates along the x-axis
Definition: NBEdge.cpp:415
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool operator()(const Connection &c) const
Definition: NBEdge.h:1494
NBNode * myTo
Definition: NBEdge.h:1292
The relationships between edges are computed/loaded.
Definition: NBEdge.h:94
std::vector< Connection > getConnectionsFromLane(int lane) const
Returns connections from a given lane.
Definition: NBEdge.cpp:798
bool operator()(const TLSDisabledConnection &e) const
Definition: NBEdge.h:1382
bool setConnection(int lane, NBEdge *destEdge, int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, SUMOReal contPos=UNSPECIFIED_CONTPOS)
Adds a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:737
std::vector< NBSign > mySigns
the street signs along this edge
Definition: NBEdge.h:1368
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
Definition: NBEdge.cpp:1491
void setLaneWidth(int lane, SUMOReal width)
set lane specific width (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2476
void setSpeed(int lane, SUMOReal speed)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2531
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:522
void moveConnectionToLeft(int lane)
Definition: NBEdge.cpp:1059
~ToEdgeConnectionsAdder()
destructor
Definition: NBEdge.h:1144
void addSidewalk(SUMOReal width)
add a pedestrian sidewalk of the given width and shift existing connctions
Definition: NBEdge.cpp:2673
SUMOReal 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:391
int SVCPermissions
std::map< NBEdge *, std::vector< int > > myConnections
map of edges to this edge&#39;s lanes that reach them
Definition: NBEdge.h:1133
The representation of a single edge during network building.
Definition: NBEdge.h:70
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
Definition: NBEdge.cpp:327
void clearControllingTLInformation()
clears tlID for all connections
Definition: NBEdge.cpp:2167
Lane2LaneInfoType
Modes of setting connections between lanes.
Definition: NBEdge.h:109
void declareConnectionsAsLoaded()
Definition: NBEdge.h:1101
std::vector< int > * prepareEdgePriorities(const EdgeVector *outgoing)
Definition: NBEdge.cpp:1910
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
Definition: NBEdge.cpp:2091
bool hasDefaultGeometryEndpoints() const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
Definition: NBEdge.cpp:442
Lane(NBEdge *e, const std::string &_origID)
Definition: NBEdge.h:123
bool operator()(const Connection &c) const
Definition: NBEdge.h:1441
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:2203
void setStreetName(const std::string &name)
sets the street name of this edge
Definition: NBEdge.h:491
static const SUMOReal UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:207
std::vector< Direction > myDirs
Definition: NBEdge.h:1177
void markAsInLane2LaneState()
Definition: NBEdge.cpp:2430
SUMOReal getTotalWidth() const
Returns the combined width of all lanes of this edge.
Definition: NBEdge.cpp:2500
Lanes to lanes - relationships are computed; should be recheked.
Definition: NBEdge.h:98
SUMOReal getLaneWidth() const
Returns the default width of lanes of this edge.
Definition: NBEdge.h:469
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:2547
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
int myFromJunctionPriority
The priority normalised for the node the edge is outgoing of.
Definition: NBEdge.h:1323
void computeLaneShapes()
Definition: NBEdge.cpp:1342
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Definition: NBEdge.h:174
tls_disable_finder(const TLSDisabledConnection &tpl)
constructor
Definition: NBEdge.h:1380
SUMOReal getShapeStartAngle() const
Returns the angle at the start of the edge (only using edge shape)
Definition: NBEdge.cpp:1428
bool isInnerEdge() const
Returns whether this edge was marked as being within an intersection.
Definition: NBEdge.h:899
PositionVector myGeom
The geometry for the edge.
Definition: NBEdge.h:1329
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
Definition: NBEdge.cpp:919
static const SUMOReal UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:209
const SVCPermissions SVCAll
Lane & getLaneStruct(int lane)
Definition: NBEdge.h:1090
static const SUMOReal UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:205
void setGeometry(const PositionVector &g, bool inner=false)
(Re)sets the edge&#39;s geometry
Definition: NBEdge.cpp:449
static SUMOReal firstIntersection(const PositionVector &v1, const PositionVector &v2, SUMOReal width2)
Definition: NBEdge.cpp:1254
void setSignalOffset(SUMOReal offset)
sets the offset of a traffic signal from the end of this edge
Definition: NBEdge.h:515
bool addLane2LaneConnection(int fromLane, NBEdge *dest, int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, SUMOReal contPos=UNSPECIFIED_CONTPOS)
Adds a connection between the specified this edge&#39;s lane and an approached one.
Definition: NBEdge.cpp:697
SUMOReal getLaneSpeed(int lane) const
Definition: NBEdge.cpp:1336
const EdgeVector & myTransitions
the transition from the virtual lane to the edge it belongs to
Definition: NBEdge.h:1136
The connection was computed and validated.
Definition: NBEdge.h:115
void reinit(NBNode *from, NBNode *to, const std::string &type, SUMOReal speed, int nolanes, int priority, PositionVector geom, SUMOReal width, SUMOReal offset, const std::string &streetName, LaneSpreadFunction spread=LANESPREAD_RIGHT, bool tryIgnoreNodePositions=false)
Resets initial values.
Definition: NBEdge.cpp:279
PositionVector startShapeAt(const PositionVector &laneShape, const NBNode *startNode) const
Definition: NBEdge.cpp:509
SUMOReal vmax
Definition: NBEdge.h:185
const std::vector< NBSign > & getSigns() const
Definition: NBEdge.h:1113
The edge has been loaded, nothing is computed yet.
Definition: NBEdge.h:92
int myToJunctionPriority
The priority normalised for the node the edge is incoming in.
Definition: NBEdge.h:1326
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
Definition: NBEdge.cpp:881
PositionVector shape
Definition: NBEdge.h:184
SUMOReal speed
The speed allowed on this lane.
Definition: NBEdge.h:130
bool keepClear
whether the junction must be kept clear when using this connection
Definition: NBEdge.h:176
bool operator()(const Connection &c) const
Definition: NBEdge.h:1416
bool hasPermissions() const
whether at least one lane has restrictions
Definition: NBEdge.cpp:1444
SUMOReal getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn&#39;t set.
Definition: NBEdge.h:433
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:122
connections_toedge_finder(NBEdge *const edge2find, bool hasFromLane=false)
constructor
Definition: NBEdge.h:1412
SUMOReal mySpeed
The maximal speed.
Definition: NBEdge.h:1306
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
Definition: NBEdge.h:132
void addLane(int index, bool recompute=true)
Definition: NBEdge.cpp:2368
bool addEdge2EdgeConnection(NBEdge *dest)
Adds a connection to another edge.
Definition: NBEdge.cpp:673
void incLaneNo(int by)
Definition: NBEdge.cpp:2392
bool myAmMacroscopicConnector
Information whether this edge is a (macroscopic) connector.
Definition: NBEdge.h:1352
bool isConnectedTo(NBEdge *e)
Returns the information whethe a connection to the given edge has been added (or computed) ...
Definition: NBEdge.cpp:831
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
Definition: NBEdge.cpp:430
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the edge.
Definition: NBEdge.cpp:405
bool computeLanes2Edges()
computes the edge, step2: computation of which lanes approach the edges)
Definition: NBEdge.cpp:1530
NBEdge * myTurnDestination
The turn destination edge (if a connection exists)
Definition: NBEdge.h:1318
friend class NBEdgeSuccessorBuilder
Definition: NBEdge.h:72
connections_finder(int fromLane, NBEdge *const edge2find, int lane2find, bool invertEdge2find=false)
constructor
Definition: NBEdge.h:1463
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
Definition: NBEdge.h:102
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
Definition: NBEdge.cpp:810
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:825
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
Definition: NBEdge.cpp:1469
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:355
void checkGeometry(const SUMOReal maxAngle, const SUMOReal minRadius, bool fix)
Check the angles of successive geometry segments.
Definition: NBEdge.cpp:627
void addCrossingPointsAsIncomingWithGivenOutgoing(NBEdge *o, PositionVector &into)
void decLaneNo(int by)
Definition: NBEdge.cpp:2418
NBEdge(const std::string &id, NBNode *from, NBNode *to, std::string type, SUMOReal speed, int nolanes, int priority, SUMOReal width, SUMOReal offset, const std::string &streetName="", LaneSpreadFunction spread=LANESPREAD_RIGHT)
Constructor.
Definition: NBEdge.cpp:197
std::string tlID
The id of the traffic light that controls this connection.
Definition: NBEdge.h:170
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
Definition: NBEdge.h:134
int fromLane
The lane the connections starts at.
Definition: NBEdge.h:164
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void deleteLane(int index, bool recompute=true)
Definition: NBEdge.cpp:2403
TLSDisabledConnection myDefinition
Definition: NBEdge.h:1396
NBEdge & operator=(const NBEdge &s)
invalidated assignment operator
A list of positions.
SUMOReal myEndAngle
Definition: NBEdge.h:1299
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:720
void moveOutgoingConnectionsFrom(NBEdge *e, int laneOff)
Definition: NBEdge.cpp:2065
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
Definition: NBEdge.cpp:1455
bool lanesWereAssigned() const
Definition: NBEdge.cpp:2079
static int computePrioritySum(const std::vector< int > &priorities)
Definition: NBEdge.cpp:2000
static bool connections_sorter(const Connection &c1, const Connection &c2)
Definition: NBEdge.cpp:2605
std::vector< Connection > & getConnections()
Returns the connections.
Definition: NBEdge.h:794
const std::map< NBEdge *, std::vector< int > > & getBuiltConnections() const
Definition: NBEdge.h:1149
EdgeBuildingStep
Current state of the edge within the building process.
Definition: NBEdge.h:88
NBEdge * myPossibleTurnDestination
The edge that would be the turn destination if there was one.
Definition: NBEdge.h:1320
void setAsMacroscopicConnector()
Marks this edge as a macroscopic connector.
Definition: NBEdge.h:876
PositionVector getCWBoundaryLine(const NBNode &n) const
get the outer boundary of this edge when going clock-wise around the given node
Definition: NBEdge.cpp:2185
bool hasLoadedLength() const
Returns whether a length was set explicitly.
Definition: NBEdge.h:443
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:347
EdgeBuildingStep getStep() const
The building step of this edge.
Definition: NBEdge.h:461
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
Definition: NBEdge.cpp:2038
SUMOReal contPos
custom position for internal junction on this connection
Definition: NBEdge.h:178
SUMOReal myLaneWidth
This width of this edge&#39;s lanes.
Definition: NBEdge.h:1338
int myPriority
The priority of the edge.
Definition: NBEdge.h:1303
int getFirstNonPedestrianLaneIndex(int direction, bool exclusive=false) const
return the first lane with permissions other than SVC_PEDESTRIAN and 0
Definition: NBEdge.cpp:2617
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
std::string origID
Definition: NBEdge.h:181
bool needsLaneSpecificOutput() const
whether at least one lane has values differing from the edges values
Definition: NBEdge.cpp:1502
Connection(int fromLane_, NBEdge *toEdge_, int toLane_)
Constructor.
Definition: NBEdge.h:156
EdgeBuildingStep myStep
The building step.
Definition: NBEdge.h:1286
bool canMoveConnection(const Connection &con, int newFromLane) const
whether the connection can originate on newFromLane
Definition: NBEdge.cpp:1050
std::string getLaneIDInsecure(int lane) const
Definition: NBEdge.cpp:2354
void buildInnerEdges(const NBNode &n, int noInternalNoSplits, int &linkIndex, int &splitIndex)
Definition: NBEdge.cpp:1087
SUMOReal getAngleAtNodeToCenter(const NBNode *const node) const
Returns the angle of from the node shape center to where the edge meets the node shape.
Definition: NBEdge.cpp:1312
std::vector< Connection > myConnections
List of connections to following edges.
Definition: NBEdge.h:1311
void setLoadedLength(SUMOReal val)
Definition: NBEdge.cpp:2590
connections_fromlane_finder(int lane2find)
constructor
Definition: NBEdge.h:1517
The connection was given by the user.
Definition: NBEdge.h:113
An upper class for objects with additional parameters.
Definition: Parameterised.h:47
SUMOReal getSignalOffset() const
Returns the offset of a traffic signal from the end of this edge.
Definition: NBEdge.h:509
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false)
Removes the specified connection(s)
Definition: NBEdge.cpp:935
SUMOReal getEndOffset() const
Returns the offset to the destination node.
Definition: NBEdge.h:498
bool myAmInnerEdge
Information whether this is a junction-inner edge.
Definition: NBEdge.h:1349
Base class for objects which have an id.
Definition: Named.h:46
bool recheckLanes()
Definition: NBEdge.cpp:1554
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
Definition: NBEdge.cpp:1280
SUMOReal myLoadedLength
An optional length to use (-1 if not valid)
Definition: NBEdge.h:1346
std::string origID
An original ID, if given.
Definition: NBEdge.h:140
int internalLaneIndex
The lane index of this internal lane within the internal edge.
Definition: NBEdge.h:196
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:54
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:2575
SUMOReal getCrossingAngle(NBNode *node)
return the angle for computing pedestrian crossings at the given node
Definition: NBEdge.cpp:2647
void addRestrictedLane(SUMOReal width, SUMOVehicleClass vclass)
add a lane of the given width, restricted to the given class and shift existing connctions ...
Definition: NBEdge.cpp:2685
void setTurningDestination(NBEdge *e, bool onlyPossible=false)
Sets the turing destination at the given edge.
Definition: NBEdge.cpp:1327
void addBikeLane(SUMOReal width)
add a bicycle lane of the given width and shift existing connctions
Definition: NBEdge.cpp:2679
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:371
#define sign(a)
Definition: polyfonts.c:68
std::vector< int > getConnectionLanes(NBEdge *currentOutgoing) const
Returns the list of lanes that may be used to reach the given edge.
Definition: NBEdge.cpp:893
void computeEdgeShape()
Recomputeds the lane shapes to terminate at the node shape For every lane the intersection with the f...
Definition: NBEdge.cpp:493
void addStraightConnections(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > *priorities)
add some straight connections
Definition: NBEdge.cpp:1830
void disableConnection4TLS(int fromLane, NBEdge *toEdge, int toLane)
Definition: NBEdge.cpp:2175
PositionVector viaShape
Definition: NBEdge.h:190
std::string oppositeID
An opposite lane ID, if given.
Definition: NBEdge.h:142
SUMOReal getMaxLaneOffset()
Definition: NBEdge.cpp:2085
static const SUMOReal UNSPECIFIED_LOADED_LENGTH
no length override given
Definition: NBEdge.h:212
std::vector< NBEdge * > EdgeVector
Definition: NBCont.h:41
NBEdge * myEdge
the edge to compute the relative angle of
Definition: NBEdge.h:1552
SUMOReal myLength
The length of the edge.
Definition: NBEdge.h:1295
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
Definition: NBEdge.cpp:2561
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:546
The edge has been loaded and connections shall not be added.
Definition: NBEdge.h:90
std::vector< Connection > myConnectionsToDelete
List of connections marked for delayed removal.
Definition: NBEdge.h:1315
bool isMacroscopicConnector() const
Returns whether this edge was marked as a macroscopic connector.
Definition: NBEdge.h:884
connections_toedgelane_finder(NBEdge *const edge2find, int lane2find, int fromLane2find)
constructor
Definition: NBEdge.h:1436
void reduceGeometry(const SUMOReal minDist)
Removes points with a distance lesser than the given.
Definition: NBEdge.cpp:621
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
Definition: NBEdge.cpp:1290
const EdgeVector * getConnectedSorted()
Returns the list of outgoing edges without the turnaround sorted in clockwise direction.
Definition: NBEdge.cpp:844
NBEdge *const myEdge2Find
Definition: NBEdge.h:1474
void setIsInnerEdge()
Marks this edge being within an intersection.
Definition: NBEdge.h:891
void sortOutgoingConnectionsByIndex()
sorts the outgoing connections by their from-lane-index and their to-lane-index
Definition: NBEdge.cpp:913
std::string myType
The type of the edge.
Definition: NBEdge.h:1289
SUMOReal mySignalOffset
the offset of a traffic light signal from the end of this edge (-1 for None)
Definition: NBEdge.h:1371
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge&#39;s lateral offset shal...
void append(NBEdge *continuation)
Definition: NBEdge.cpp:2300
const Lane & getLaneStruct(int lane) const
Definition: NBEdge.h:1095
NBNode * tryGetNodeAtPosition(SUMOReal pos, SUMOReal tolerance=5.0) const
Returns the node at the given edges length (using an epsilon) When no node is existing at the given p...
Definition: NBEdge.cpp:2051
The connection was computed.
Definition: NBEdge.h:111
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge&#39;s lanes&#39; lateral offset is computed.
Definition: NBEdge.h:626
SUMOReal myStartAngle
The angles of the edge.
Definition: NBEdge.h:1298
SUMOReal getTotalAngle() const
get the angle as measure from the start to the end of this edge
Definition: NBEdge.h:417
Represents a single node (junction) during network building.
Definition: NBNode.h:74
PositionVector computeLaneShape(int lane, SUMOReal offset) const
Computes the shape for the given lane.
Definition: NBEdge.cpp:1382
void dismissVehicleClassInformation()
Definition: NBEdge.cpp:2596
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Definition: NBEdge.cpp:2328
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
Definition: NBEdge.h:100
void replaceInConnections(NBEdge *which, NBEdge *by, int laneOff)
Definition: NBEdge.cpp:974
bool hasLaneSpecificWidth() const
whether lanes differ in width
Definition: NBEdge.cpp:1480
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
void setEndOffset(int lane, SUMOReal offset)
set lane specific end-offset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:2515
void appendTurnaround(bool noTLSControlled, bool checkPermissions)
Add a connection to the previously computed turnaround, if wished.
Definition: NBEdge.cpp:2010
Direction
enum of possible directions
Definition: NBEdge.h:1173
#define SUMOReal
Definition: config.h:213
bool isNearEnough2BeJoined2(NBEdge *e, SUMOReal threshold) const
Definition: NBEdge.cpp:2360
void preferVehicleClass(int lane, SUMOVehicleClass vclass)
Definition: NBEdge.cpp:2463
std::string getLaneID(int lane) const
Definition: NBEdge.cpp:2348
void allowVehicleClass(int lane, SUMOVehicleClass vclass)
set allowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:2437
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
Definition: NBEdge.cpp:566
void shiftToLanesToEdge(NBEdge *to, int laneOff)
modifify the toLane for all connections to the given edge
Definition: NBEdge.cpp:2719
SUMOReal getShapeEndAngle() const
Returns the angle at the end of the edge (only using edge shape) The angle is computed in computeAngl...
Definition: NBEdge.cpp:1436
void computeAngle()
computes the angle of this edge and stores it in myAngle
Definition: NBEdge.cpp:1394
SUMOReal getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:451
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:63
SUMOReal getFinalLength() const
length that will be assigned to the lanes in the final network
Definition: NBEdge.cpp:2755
SUMOReal getStartAngle() const
Returns the angle at the start of the edge (relative to the node shape center) The angle is computed ...
Definition: NBEdge.h:381
bool computeEdge2Edges(bool noLeftMovers)
computes the edge (step1: computation of approached edges)
Definition: NBEdge.cpp:1509
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
Definition: NBEdge.cpp:560
bool operator()(const Connection &c) const
Definition: NBEdge.h:1466
void divideSelectedLanesOnEdges(const EdgeVector *outgoing, const std::vector< int > &availableLanes, const std::vector< int > *priorities)
Definition: NBEdge.cpp:1720
std::set< SVCPermissions > getPermissionVariants(int iStart, int iEnd) const
return all permission variants within the specified lane range [iStart, iEnd[
Definition: NBEdge.cpp:2634
Lanes to edges - relationships are computed/loaded.
Definition: NBEdge.h:96
std::string myStreetName
The street name (or whatever arbitrary string you wish to attach)
Definition: NBEdge.h:1364
const std::string & getStreetName() const
Returns the street name of this edge.
Definition: NBEdge.h:485
const std::vector< Connection > & getConnections() const
Returns the connections.
Definition: NBEdge.h:786
NBNode * myFrom
The source and the destination node.
Definition: NBEdge.h:1292
bool expandableBy(NBEdge *possContinuation) const
Definition: NBEdge.cpp:2221
NBEdge * getTurnDestination(bool possibleDestination=false) const
Definition: NBEdge.cpp:2339
std::vector< int > foeInternalLinks
Definition: NBEdge.h:192
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
Definition: NBEdge.cpp:554
void shiftPositionAtNode(NBNode *node, NBEdge *opposite)
shift geometry at the given node to avoid overlap
Definition: NBEdge.cpp:2730
bool operator()(const Connection &c) const
Definition: NBEdge.h:1519
void disallowVehicleClass(int lane, SUMOVehicleClass vclass)
set disallowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:2450
SUMOReal width
This lane&#39;s width.
Definition: NBEdge.h:138
void copyConnectionsFrom(NBEdge *src)
Definition: NBEdge.cpp:1043
static const SUMOReal ANGLE_LOOKAHEAD
the distance at which to take the default angle
Definition: NBEdge.h:216
SUMOReal getLength() const
Returns the computed length of the edge.
Definition: NBEdge.h:424
SUMOReal getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge&#39;s geometry at the given node.
Definition: NBEdge.cpp:1300
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:363
bool splitGeometry(NBEdgeCont &ec, NBNodeCont &nc)
Splits this edge at geometry points.
Definition: NBEdge.cpp:576