68 #ifdef CHECK_MEMORY_LEAKS
70 #endif // CHECK_MEMORY_LEAKS
85 myApproaching(approaching), myCurrentOutgoing(currentOutgoing) {
96 assert(myApproaching->size() > src);
98 NBEdge* incomingEdge = (*myApproaching)[src];
102 std::vector<int> approachingLanes =
104 assert(approachingLanes.size() != 0);
105 std::deque<int>* approachedLanes = spread(approachingLanes, dest);
106 assert(approachedLanes->size() <= myCurrentOutgoing->getNumLanes());
108 for (
unsigned int i = 0; i < approachedLanes->size(); i++) {
109 unsigned int approached = (*approachedLanes)[i];
110 assert(approachedLanes->size() > i);
111 assert(approachingLanes.size() > i);
112 incomingEdge->setConnection((
unsigned int) approachingLanes[i], myCurrentOutgoing,
115 delete approachedLanes;
122 std::deque<int>* ret =
new std::deque<int>();
123 unsigned int noLanes = (
unsigned int) approachingLanes.size();
127 ret->push_back(dest);
131 unsigned int noOutgoingLanes = myCurrentOutgoing->getNumLanes();
133 ret->push_back(dest);
134 unsigned int noSet = 1;
137 while (noSet < noLanes) {
143 if (noOutgoingLanes == noSet) {
152 if (dest + loffset >= static_cast<int>(noOutgoingLanes)) {
155 for (
unsigned int i = 0; i < ret->size(); i++) {
156 (*ret)[i] = (*ret)[i] - 1;
161 ret->push_back(dest + loffset);
166 if (noOutgoingLanes == noSet) {
171 if (noSet < noLanes) {
174 if (dest < roffset) {
177 for (
unsigned int i = 0; i < ret->size(); i++) {
178 (*ret)[i] = (*ret)[i] + 1;
181 ret->push_front(dest - roffset);
205 myPosition(position),
206 myType(type), myDistrict(0), myRequest(0)
212 myPosition(position),
224 bool updateEdgeGeometries) {
231 if (updateEdgeGeometries) {
235 (*i)->setGeometry(geom);
240 (*i)->setGeometry(geom);
275 for (std::set<NBTrafficLightDefinition*>::const_iterator i = trafficLights.begin(); i != trafficLights.end(); ++i) {
287 if ((*i)->getID().find(
"joined") == 0) {
298 std::set<NBTrafficLightDefinition*> newDefs;
301 if (dynamic_cast<NBOwnTLDef*>(orig) != 0) {
303 newDefs.insert(orig);
305 const std::string new_id = orig->
getID() +
"_reguessed";
307 if (!tlCont.
insert(newDef)) {
313 newDefs.insert(newDef);
317 for (std::set<NBTrafficLightDefinition*>::iterator it = newDefs.begin(); it != newDefs.end(); ++it) {
318 (*it)->addNode(
this);
327 unsigned int ret = 0;
328 unsigned int pos = 0;
344 if ((*i)->isConnectedTo(dummy) && *i != dummy) {
345 incomingConnected.push_back(*i);
352 outgoingConnected.push_back(*i);
357 remapRemoved(tc, dummy, incomingConnected, outgoingConnected);
406 if (in->
getNumLanes() != (*opposite)->getNumLanes()) {
419 NBEdge* toE,
int toL,
int numPoints)
const {
426 bool noSpline =
false;
432 unsigned int noInitialPoints = 0;
446 Line cross(straightConn);
447 cross.
sub(cross.
p1().
x(), cross.
p1().
y());
449 center.
sub(cross.
p2());
454 if (angle < M_PI / 4. || angle > 7. / 4.*
M_PI) {
495 WRITE_WARNING(
"Could not use edge geometry for internal lane, node '" +
getID() +
"'.");
512 for (
int i = 0; i < (
int) init.size(); ++i) {
514 def[i * 3 + 1] = init[i].x();
516 def[i * 3 + 3] = init[i].y();
519 bezier(noInitialPoints, def, numPoints, ret_buf);
522 for (
int i = 0; i < (
int) numPoints; i++) {
523 Position current(ret_buf[i * 3 + 1], ret_buf[i * 3 + 3]);
524 if (prev != current) {
546 if (fromE == otherFromE) {
550 if (!
foes(otherFromE, otherToE, fromE, toE)) {
558 bool bothLeft = thisLeft && otherLeft;
559 if (c.
tlID !=
"" && !bothLeft) {
592 if (numConnections >= 64) {
594 WRITE_WARNING(
"Junction '" +
getID() +
"' is too complicated (#links>64); will be set to unregulated.");
598 }
else if (numConnections == 0) {
680 std::swap(inc1, inc2);
703 std::swap(out1, out2);
714 EdgeVector::reverse_iterator i;
716 NBEdge* currentOutgoing = *i;
719 if (approaching->size() != 0) {
731 (*i)->markAsInLane2LaneState();
740 EdgeVector::const_iterator i = find(
myAllEdges.begin(),
746 for (; *i != currentOutgoing;) {
748 if ((*i)->getToNode() ==
this && (*i)->getTurnDestination() != currentOutgoing) {
749 std::vector<int> connLanes = (*i)->getConnectionLanes(currentOutgoing);
750 if (connLanes.size() != 0) {
751 approaching->push_back(*i);
781 unsigned int laneOff = 0;
782 for (EdgeVector::const_iterator i = which.begin(); i != which.end(); i++) {
784 laneOff += (*i)->getNumLanes();
813 unsigned int laneOff = 0;
814 for (EdgeVector::const_iterator i = which.begin(); i != which.end(); i++) {
816 laneOff += (*i)->getNumLanes();
831 unsigned int whichLaneOff,
unsigned int byLaneOff) {
835 bool changed =
false;
837 if (c.
replaceFrom(which, whichLaneOff, by, byLaneOff)) {
840 if (c.
replaceTo(which, whichLaneOff, by, byLaneOff)) {
854 for (NBConnectionVector::iterator k = prohibiting.begin(); k != prohibiting.end(); k++) {
856 sprohibiting.
replaceFrom(which, whichLaneOff, by, byLaneOff);
857 sprohibiting.
replaceTo(which, whichLaneOff, by, byLaneOff);
918 if (find(edges.begin(), edges.end(), e) != edges.end()) {
919 edges.erase(find(edges.begin(), edges.end(), e));
921 if (edges.size() == 0) {
937 mayDrive.
getTo() == 0 ||
939 mustStop.
getTo() == 0) {
941 WRITE_WARNING(
"Something went wrong during the building of a connection...");
945 conn.push_back(mayDrive);
952 unsigned int size = (
unsigned int) edgeid.length();
954 std::string
id = (*i)->
getID();
955 if (
id.substr(0, size) == edgeid) {
965 unsigned int size = (
unsigned int) edgeid.length();
967 std::string
id = (*i)->
getID();
968 if (
id.substr(0, size) == edgeid) {
993 if (removeFromConnections) {
995 (*i)->removeFromConnections(edge);
1005 EdgeVector::const_iterator i;
1007 NBNode* conn = (*i)->getFromNode();
1010 toAdd.
mul((
SUMOReal) 1.0 / sqrt(toAdd.
x()*toAdd.
x() + toAdd.
y()*toAdd.
y()));
1014 NBNode* conn = (*i)->getToNode();
1017 toAdd.
mul((
SUMOReal) 1.0 / sqrt(toAdd.
x()*toAdd.
x() + toAdd.
y()*toAdd.
y()));
1021 if (pos.
x() == 0 && pos.
y() == 0) {
1033 (*i)->invalidateConnections();
1041 (*i)->invalidateConnections();
1081 std::vector<NBEdge*>::const_iterator i = std::find(
myAllEdges.begin(),
myAllEdges.end(), from);
1091 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
1092 bool regardNonSignalisedLowerPriority)
const {
1094 possProhibitedFrom, possProhibitedTo,
1095 regardNonSignalisedLowerPriority);
1101 const NBEdge*
const from2,
const NBEdge*
const to2)
const {
1110 assert(find(incoming.begin(), incoming.end(), removed) == incoming.end());
1111 bool changed =
true;
1117 for (NBConnectionProhibits::iterator i = blockedConnectionsTmp.begin(); i != blockedConnectionsTmp.end(); i++) {
1122 bool blockedChanged =
false;
1124 NBConnectionVector::const_iterator j;
1125 for (j = blocked.begin(); j != blocked.end(); j++) {
1127 if (sblocked.
getFrom() == removed || sblocked.
getTo() == removed) {
1128 blockedChanged =
true;
1132 for (j = blocked.begin(); blockedChanged && j != blocked.end(); j++) {
1134 if (sblocked.
getFrom() == removed && sblocked.
getTo() == removed) {
1138 }
else if (sblocked.
getFrom() == removed) {
1139 assert(sblocked.
getTo() != removed);
1140 for (EdgeVector::const_iterator k = incoming.begin(); k != incoming.end(); k++) {
1143 }
else if (sblocked.
getTo() == removed) {
1144 assert(sblocked.
getFrom() != removed);
1145 for (EdgeVector::const_iterator k = outgoing.begin(); k != outgoing.end(); k++) {
1152 if (blockedChanged) {
1153 blockedConnectionsNew[blocker] = newBlocked;
1158 if (blocker.
getFrom() == removed && blocker.
getTo() == removed) {
1163 }
else if (blocker.
getFrom() == removed) {
1164 assert(blocker.
getTo() != removed);
1166 for (EdgeVector::const_iterator k = incoming.begin(); k != incoming.end(); k++) {
1169 }
else if (blocker.
getTo() == removed) {
1170 assert(blocker.
getFrom() != removed);
1172 for (EdgeVector::const_iterator k = outgoing.begin(); k != outgoing.end(); k++) {
1176 blockedConnectionsNew[blocker] = blocked;
1190 if (outgoing == 0) {
1201 if (
abs((
int) angle) + 1 < 45) {
1208 EdgeVector::const_iterator i =
1211 while ((*i) != incoming) {
1212 if ((*i)->getFromNode() ==
this) {
1220 EdgeVector::const_iterator i =
1223 while ((*i) != incoming) {
1235 bool mayDefinitelyPass,
const std::string& tlID)
const {
1239 if (outgoing == 0) {
1248 if ((!incoming->
isInnerEdge() &&
mustBrake(incoming, outgoing, fromlane)) && !mayDefinitelyPass) {
1262 EdgeVector::const_iterator i;
1275 std::set<NBNode*> origSet;
1277 origSet.insert((*i)->getFromNode());
1279 if (origSet.size() < 2) {
1286 NBNode* origin = (*i)->getFromNode();
1288 EdgeVector::const_iterator j =
1297 if (!(*i)->expandableBy(*j)) {
1313 std::vector<std::pair<NBEdge*, NBEdge*> >
1316 std::vector<std::pair<NBEdge*, NBEdge*> > ret;
1320 std::pair<NBEdge*, NBEdge*>(
1326 NBNode* origin = (*i)->getFromNode();
1327 EdgeVector::const_iterator j =
1331 ret.push_back(std::pair<NBEdge*, NBEdge*>(*i, *j));
1346 if ((*i)->getToNode() == n) {
1361 back_inserter(edges));
1363 back_inserter(edges));
1364 for (EdgeVector::const_iterator j = edges.begin(); j != edges.end(); ++j) {
1375 for (EdgeVector::const_iterator k = edges2.begin(); k != edges2.end(); ++k) {
1376 if ((*k)->getFromNode()->isDistrict() || (*k)->getToNode()->isDistrict()) {
1393 unsigned int noInternalNoSplits = 0;
1395 const std::vector<NBEdge::Connection>& elv = (*i)->getConnections();
1396 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
1397 if ((*k).toEdge == 0) {
1400 noInternalNoSplits++;
1403 unsigned int lno = 0;
1404 unsigned int splitNo = 0;
1406 (*i)->buildInnerEdges(*
this, noInternalNoSplits, lno, splitNo);
1425 if (
MAX2(angle0, angle1) <= 160) {
void sub(SUMOReal dx, SUMOReal dy)
Substracts the given position from this one.
The link is a partial left direction.
const PositionVector & getLaneShape(unsigned int i) const
Returns the shape of the nth lane.
void replaceIncoming(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of incoming by the second Connections are remap...
const Position & p2() const
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges.
void replaceOutgoing(const EdgeVector &which, NBEdge *const by)
Replaces outgoing edges from the vector (source) by the given edge.
Position getEmptyDir() const
Returns something like the most unused direction Should only be used to add source or sink nodes...
static SUMOReal getCWAngleDiff(SUMOReal angle1, SUMOReal angle2)
Returns the distance of second angle from first angle clockwise.
A structure which describes a connection between edges or lanes.
int toLane
The lane the connections yields in.
void setRoundabout()
update the type of this node as a roundabout
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
ApproachingDivider(EdgeVector *approaching, NBEdge *currentOutgoing)
Constructor.
static SUMOReal getCCWAngleDiff(SUMOReal angle1, SUMOReal angle2)
Returns the distance of second angle from first angle counter-clockwise.
PositionVector shape
The lane's shape.
bool isInStringVector(const std::string &optionName, const std::string &itemName)
Returns the named option is a list of string values containing the specified item.
void add(const Position &pos)
Adds the given position to this one.
PositionVector myPoly
the (outer) shape of the junction
NBEdge * getOppositeIncoming(NBEdge *e) const
void execute(const unsigned int src, const unsigned int dest)
SumoXMLNodeType myType
The type of the junction.
A container for traffic light definitions and built programs.
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
static SUMOReal normRelAngle(SUMOReal angle1, SUMOReal angle2)
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Some static methods for string processing.
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
TrafficLightType getType() const
get the algorithm type (static etc..)
PositionVector computeInternalLaneShape(NBEdge *fromE, int fromL, NBEdge *toE, int toL, int numPoints=5) const
Compute the shape for an internal lane.
This class computes shapes of junctions.
This is an uncontrolled, minor link, has to stop.
void computeNodeShape(bool leftHand)
void removeEdge(NBEdge *edge, bool removeFromConnections=true)
Removes edge from this node and optionally removes connections as well.
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const std::string & getProgramID() const
Returns the ProgramID.
The representation of a single edge during network building.
Class to sort edges by their angle in relation to the given edge.
bool replaceTo(NBEdge *which, NBEdge *by)
replaces the to-edge by the one given
The link is a 180 degree turn.
void rotateAtP1(SUMOReal rot)
bool mustBrake(const NBEdge *const from, const NBEdge *const to, int toLane) const
Returns the information whether the described flow must let any other flow pass.
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
A container for districts.
The base class for traffic light logic definitions.
bool addLane2LaneConnections(unsigned int fromLane, NBEdge *dest, unsigned int toLane, unsigned int no, Lane2LaneInfoType type, bool invalidatePrevious=false, bool mayDefinitelyPass=false)
Builds no connections starting at the given lanes.
bool isJoinedTLSControlled() const
Returns whether this node is controlled by a tls that spans over more than one node.
void extrapolateFirstBy(SUMOReal length)
bool isInnerEdge() const
Returns whether this edge was marked as being within an intersection.
This is an uncontrolled, right-before-left link.
static void nextCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
void remapConnections(const EdgeVector &incoming)
Remaps the connection in a way that allows the removal of it.
SUMOReal distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
bool checkIsRemovable() const
bool around(const Position &p, SUMOReal offset=0) const
Returns the information whether the position vector describes a polygon lying around the given point ...
bool isTurningDirectionAt(const NBNode *n, const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
bool almostSame(const Position &p2, SUMOReal maxDiv=POSITION_EPS) const
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
The link is controlled by a tls which is off, not blinking, may pass.
NBConnectionProhibits myBlockedConnections
void writeLogic(std::string key, OutputDevice &into, const bool checkLaneFoes) const
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
SUMOReal x() const
Returns the x-position.
This is an uncontrolled, all-way stop link.
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
NBEdge * getFrom() const
returns the from-edge (start of the connection)
The link is a (hard) left direction.
#define WRITE_WARNING(msg)
The connection was computed and validated.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
NBTrafficLightDefinition * getDefinition(const std::string &id, const std::string &programID) const
Returns the named definition.
The link is a straight direction.
SUMOTime getOffset()
Returns the offset.
NBDistrict * myDistrict
The district the node is the centre of.
A class representing a single district.
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges.
An (internal) definition of a single lane of an edge.
const std::string & getID() const
Returns the id.
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
void computeLanes2Lanes()
computes the connections of lanes to edges
Position getPositionAtDistance(SUMOReal offset) const
void invalidateIncomingConnections()
bool isConnectedTo(NBEdge *e)
Returns the information whethe a connection to the given edge has been added (or computed) ...
const Position & getPosition() const
Returns the position of this node.
const Position & p1() const
bool replaceFrom(NBEdge *which, NBEdge *by)
replaces the from-edge by the one given
Lanes to lanes - relationships are loaded; no recheck is necessary/wished.
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
bool isSimpleContinuation() const
void buildBitfieldLogic(bool leftHanded)
void remapRemoved(NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
Replaces occurences of the removed edge in incoming/outgoing edges of all definitions.
std::string tlID
The id of the traffic light that controls this connection.
This is an uncontrolled, minor link, has to brake.
A point in 2D or 3D with translation and scaling methods.
bool mustBrake(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
void add(SUMOReal xoff, SUMOReal yoff, SUMOReal zoff)
bool needsCont(NBEdge *fromE, NBEdge *toE, NBEdge *otherFromE, NBEdge *otherToE, const NBEdge::Connection &c) const
unsigned int getNumLanes() const
Returns the number of lanes.
bool geometryLike() const
whether this is structurally similar to a geometry node
SUMOReal offset
This lane's offset to the intersection begin.
void invalidateOutgoingConnections()
SUMOReal distance(const Position &p) const
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void removeTrafficLights()
Removes all references to traffic lights that control this tls.
EdgeVector * getEdgesThatApproach(NBEdge *currentOutgoing)
std::set< NBTrafficLightDefinition * > myTrafficLights
Storage for edges, including some functionality operating on multiple edges.
void bezier(int npts, SUMOReal b[], int cpts, SUMOReal p[])
The link is a (hard) right direction.
PositionVector compute(bool leftHand)
Computes the shape of the assigned junction.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
const PositionVector & getShape() const
The link is a partial right direction.
static void compute(BresenhamCallBack *callBack, const unsigned int val1, const unsigned int val2)
NBEdge * getConnectionTo(NBNode *n) const
SUMOReal atan2Angle() const
virtual void removeNode(NBNode *node)
Removes the given node from the list of controlled nodes.
EdgeVector myIncomingEdges
Vector of incoming edges.
bool isLeftMover(const NBEdge *const from, const NBEdge *const to) const
Computes whether the given connection is a left mover across the junction.
Base class for objects which have an id.
std::vector< NBConnection > NBConnectionVector
Definition of a connection vector.
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
bool intersects(const Line &l) const
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
unsigned int removeSelfLoops(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
Removes edges which are both incoming and outgoing into this node.
EdgeVector myOutgoingEdges
Vector of outgoing edges.
SUMOReal length() const
Returns the length.
void push_back(const PositionVector &p)
Appends all positions from the given vector.
std::string myID
The name of the object.
NBNode * getToNode() const
Returns the destination node of the edge.
void addTrafficLight(NBTrafficLightDefinition *tlDef)
Adds a traffic light to the list of traffic lights that control this node.
void extrapolateSecondBy(SUMOReal length)
bool isNearDistrict() const
std::vector< int > getConnectionLanes(NBEdge *currentOutgoing) const
Returns the list of lanes that may be used to reach the given edge.
Position myPosition
The position the node lies at.
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
void replaceOutgoing(NBEdge *which, NBEdge *by, unsigned int laneOff)
Replaces occurences of the first edge within the list of outgoing by the second Connections are remap...
~ApproachingDivider()
Destructor.
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass, const std::string &tlID) const
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
bool isLeftHanded() const
Returns whether the built edges are left-handed.
void replaceInConnectionProhibitions(NBEdge *which, NBEdge *by, unsigned int whichLaneOff, unsigned int byLaneOff)
The link is controlled by a tls which is off and blinks, has to brake.
std::vector< NBEdge * > EdgeVector
EdgeVector * myApproaching
The list of edges that approach the current edge.
SUMOReal y() const
Returns the y-position.
A storage for options typed value containers)
void sub(SUMOReal x, SUMOReal y)
void erase(NBDistrictCont &dc, NBEdge *edge)
Removes the given edge from the container (deleting it)
void replaceInConnections(NBEdge *which, NBEdge *by, unsigned int laneOff)
This is an uncontrolled, major link, may pass.
void mul(SUMOReal val)
Multiplies both positions with the given value.
std::deque< int > * spread(const std::vector< int > &approachingLanes, int dest) const
NBEdge * getTo() const
returns the to-edge (end of the connection)
The connection was computed.
Represents a single node (junction) during network building.
Lane & getLaneStruct(unsigned int lane)
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
Lanes to lanes - relationships are computed; no recheck is necessary/wished.
NBNode(const std::string &id, const Position &position)
Constructor.
bool insert(NBTrafficLightDefinition *logic, bool forceInsert=false)
Adds a logic definition to the dictionary.
NBEdge * getTurnDestination() const
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
Static storage of an output device and its base (abstract) implementation.
Computes lane-2-lane connections.
bool writeLogic(OutputDevice &into, const bool checkLaneFoes) const
static SUMOReal relAngle(SUMOReal angle1, SUMOReal angle2)
void computeLogic(const NBEdgeCont &ec, OptionsCont &oc)
computes the node's type, logic and traffic light
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
void setConnection(unsigned int lane, NBEdge *destEdge, unsigned int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false)
Adds a connection to a certain lane of a certain edge.
A traffic light logics which must be computed (only nodes/edges are given)
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
void invalidateTLS(NBTrafficLightLogicCont &tlCont)
causes the traffic light to be computed anew
void closePolygon()
ensures that the last position equals the first
Lanes to edges - relationships are computed/loaded.
void append(const PositionVector &v)
Position intersectsAt(const Line &l) const
PositionVector getSubpart(SUMOReal beginOffset, SUMOReal endOffset) const
static void nextCCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
void reshiftPosition(SUMOReal xoff, SUMOReal yoff)
Applies an offset to the node.
void remapRemoved(NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
std::pair< unsigned int, unsigned int > getSizes() const
returns the number of the junction's lanes and the number of the junction's links in respect...
void replaceIncoming(const EdgeVector &which, NBEdge *const by)
Replaces incoming edges from the vector (sinks) by the given edge.
SUMOReal getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
The link has no direction (is a dead end link)
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing) const
Returns the representation of the described stream's direction.
NBNode * getFromNode() const
Returns the origin node of the edge.