SUMO - Simulation of Urban MObility
|
Represents a single node (junction) during network building. More...
#include <NBNode.h>
Data Structures | |
class | ApproachingDivider |
Computes lane-2-lane connections. More... | |
struct | Crossing |
A definition of a pedestrian crossing. More... | |
class | edge_by_direction_sorter |
Sorts outgoing before incoming edges. More... | |
class | nodes_by_id_sorter |
Used for sorting the cells by the begin time they describe. More... | |
struct | WalkingArea |
A definition of a pedestrian walking area. More... | |
Public Types | |
typedef std::map< std::string, PositionVector > | CustomShapeMap |
Public Member Functions | |
void | addCrossing (EdgeVector edges, SUMOReal width, bool priority) |
add a pedestrian crossing to this node More... | |
void | addIncomingEdge (NBEdge *edge) |
adds an incoming edge More... | |
void | addOutgoingEdge (NBEdge *edge) |
adds an outgoing edge More... | |
void | addSortedLinkFoes (const NBConnection &mayDrive, const NBConnection &mustStop) |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
void | avoidOverlap () |
fix overlap More... | |
unsigned int | buildCrossings () |
void | buildInnerEdges (bool buildCrossingsAndWalkingAreas) |
build internal lanes, pedestrian crossings and walking areas More... | |
void | buildWalkingAreas (int cornerDetail) |
int | checkCrossing (EdgeVector candidates) |
bool | checkIsRemovable () const |
PositionVector | computeInternalLaneShape (NBEdge *fromE, const NBEdge::Connection &con, int numPoints=5) const |
Compute the shape for an internal lane. More... | |
void | computeLanes2Lanes (const bool buildCrossingsAndWalkingAreas) |
computes the connections of lanes to edges More... | |
void | computeLogic (const NBEdgeCont &ec, OptionsCont &oc) |
computes the node's type, logic and traffic light More... | |
void | computeNodeShape (bool leftHand, SUMOReal mismatchThreshold) |
Compute the junction shape for this node. More... | |
PositionVector | computeSmoothShape (const PositionVector &begShape, const PositionVector &endShape, int numPoints, bool isTurnaround, SUMOReal extrapolateBeg, SUMOReal extrapolateEnd) const |
Compute a smooth curve between the given geometries. More... | |
bool | crossingBetween (const NBEdge *e1, const NBEdge *e2) const |
return true if the given edges are connected by a crossing More... | |
EdgeVector | edgesBetween (const NBEdge *e1, const NBEdge *e2) const |
return all edges that lie clockwise between the given edges More... | |
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. More... | |
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. More... | |
bool | geometryLike () const |
whether this is structurally similar to a geometry node More... | |
NBEdge * | getConnectionTo (NBNode *n) const |
const Crossing & | getCrossing (const std::string &id) const |
return the crossing with the given id More... | |
const std::vector< Crossing > & | getCrossings () const |
return this junctions pedestrian crossings More... | |
const CustomShapeMap & | getCustomLaneShapes () const |
sets a custom shape for an internal lane More... | |
LinkDirection | getDirection (const NBEdge *const incoming, const NBEdge *const outgoing) const |
Returns the representation of the described stream's direction. More... | |
std::vector< std::pair< NBEdge *, NBEdge * > > | getEdgesToJoin () const |
Position | getEmptyDir () const |
Returns something like the most unused direction Should only be used to add source or sink nodes. More... | |
const std::string & | getID () const |
Returns the id. More... | |
LinkState | getLinkState (const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass, const std::string &tlID) const |
NBEdge * | getOppositeIncoming (NBEdge *e) const |
NBEdge * | getPossiblySplittedIncoming (const std::string &edgeid) |
NBEdge * | getPossiblySplittedOutgoing (const std::string &edgeid) |
const NBConnectionProhibits & | getProhibitions () |
const PositionVector & | getShape () const |
retrieve the junction shape More... | |
const std::vector< WalkingArea > & | getWalkingAreas () const |
return this junctions pedestrian walking areas More... | |
int | guessCrossings () |
guess pedestrian crossings and return how many were guessed More... | |
bool | hasCustomShape () const |
return whether the shape was set by the user More... | |
bool | hasIncoming (const NBEdge *const e) const |
Returns whether the given edge ends at this node. More... | |
bool | hasOutgoing (const NBEdge *const e) const |
Returns whether the given edge starts at this node. More... | |
void | invalidateIncomingConnections () |
void | invalidateOutgoingConnections () |
bool | isDistrict () const |
bool | isLeftMover (const NBEdge *const from, const NBEdge *const to) const |
Computes whether the given connection is a left mover across the junction. More... | |
bool | isNearDistrict () const |
bool | mustBrake (const NBEdge *const from, const NBEdge *const to, int fromLane, bool includePedCrossings) const |
Returns the information whether the described flow must let any other flow pass. More... | |
bool | mustBrakeForCrossing (const NBEdge *const from, const NBEdge *const to, const Crossing &crossing) const |
Returns the information whether the described flow must brake for the given crossing. More... | |
NBNode (const std::string &id, const Position &position, SumoXMLNodeType type) | |
Constructor. More... | |
NBNode (const std::string &id, const Position &position, NBDistrict *district=0) | |
Constructor. More... | |
bool | needsCont (const NBEdge *fromE, const NBEdge *otherFromE, const NBEdge::Connection &c, const NBEdge::Connection &otherC) const |
whether an internal junction should be built at from and respect other More... | |
int | numNormalConnections () const |
return the number of lane-to-lane connections at this junction (excluding crossings) More... | |
void | reinit (const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false) |
Resets initial values. More... | |
void | removeCrossing (const EdgeVector &edges) |
remove a pedestrian crossing from this node (identified by its edges) More... | |
void | removeDoubleEdges () |
void | removeEdge (NBEdge *edge, bool removeFromConnections=true) |
Removes edge from this node and optionally removes connections as well. More... | |
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 remapped, too. More... | |
void | replaceIncoming (const EdgeVector &which, NBEdge *by) |
Replaces occurences of every edge from the given list within the list of incoming by the second Connections are remapped, too. More... | |
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 remapped, too. More... | |
void | replaceOutgoing (const EdgeVector &which, NBEdge *by) |
Replaces occurences of every edge from the given list within the list of outgoing by the second Connections are remapped, too. More... | |
bool | rightTurnConflict (const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane) const |
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossings More... | |
void | setCrossingTLIndices (unsigned int startIndex) |
set tl indices of this nodes crossing starting at the given index More... | |
void | setCustomLaneShape (const std::string &laneID, const PositionVector &shape) |
sets a custom shape for an internal lane More... | |
void | setCustomShape (const PositionVector &shape) |
set the junction shape More... | |
void | setID (const std::string &newID) |
resets the id More... | |
void | setRadius (SUMOReal radius) |
set the turning radius More... | |
void | setRoundabout () |
update the type of this node as a roundabout More... | |
bool | writeLogic (OutputDevice &into, const bool checkLaneFoes) const |
~NBNode () | |
Destructor. More... | |
Atomar getter methods | |
const Position & | getPosition () const |
Returns the position of this node. More... | |
Position | getCenter () const |
Returns a position that is guaranteed to lie within the node shape. More... | |
const EdgeVector & | getIncomingEdges () const |
Returns this node's incoming edges. More... | |
const EdgeVector & | getOutgoingEdges () const |
Returns this node's outgoing edges. More... | |
const EdgeVector & | getEdges () const |
Returns all edges which participate in this node. More... | |
SumoXMLNodeType | getType () const |
Returns the type of this node. More... | |
SUMOReal | getRadius () const |
Returns the turning radius of this node. More... | |
Methods for dealing with assigned traffic lights | |
void | addTrafficLight (NBTrafficLightDefinition *tlDef) |
Adds a traffic light to the list of traffic lights that control this node. More... | |
void | removeTrafficLight (NBTrafficLightDefinition *tlDef) |
Removes the given traffic light from this node. More... | |
void | removeTrafficLights () |
Removes all references to traffic lights that control this tls. More... | |
bool | isTLControlled () const |
Returns whether this node is controlled by any tls. More... | |
bool | isJoinedTLSControlled () const |
Returns whether this node is controlled by a tls that spans over more than one node. More... | |
const std::set < NBTrafficLightDefinition * > & | getControllingTLS () const |
Returns the traffic lights that were assigned to this node. More... | |
void | invalidateTLS (NBTrafficLightLogicCont &tlCont) |
causes the traffic light to be computed anew More... | |
void | shiftTLConnectionLaneIndex (NBEdge *edge, int offset) |
patches loaded signal plans by modifying lane indices More... | |
Prunning the input | |
unsigned int | removeSelfLoops (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc) |
Removes edges which are both incoming and outgoing into this node. More... | |
Applying offset | |
void | reshiftPosition (SUMOReal xoff, SUMOReal yoff) |
Applies an offset to the node. More... | |
Static Public Member Functions | |
static std::string | getNodeIDFromInternalLane (const std::string id) |
returns the node id for internal lanes, crossings and walkingareas More... | |
Static Public Attributes | |
static const int | BACKWARD |
static const SUMOReal | DEFAULT_CROSSING_WIDTH |
default width of pedetrian crossings More... | |
static const SUMOReal | DEFAULT_RADIUS = 1.5 |
the default turning radius at intersections in m More... | |
static const int | FORWARD |
edge directions (for pedestrian related stuff) More... | |
static const int | MAX_CONNECTIONS |
maximum number of connections allowed More... | |
static const SUMOReal | UNSPECIFIED_RADIUS = -1 |
unspecified lane width More... | |
Protected Attributes | |
std::string | myID |
The name of the object. More... | |
Private Member Functions | |
bool | forbidsPedestriansAfter (std::vector< std::pair< NBEdge *, bool > > normalizedLanes, int startIndex) |
return whether there is a non-sidewalk lane after the given index; More... | |
EdgeVector | getEdgesSortedByAngleAtNodeCenter () const |
returns the list of all edges sorted clockwise by getAngleAtNodeToCenter More... | |
EdgeVector * | getEdgesThatApproach (NBEdge *currentOutgoing) |
bool | isSimpleContinuation () const |
NBNode (const NBNode &s) | |
invalidated copy constructor More... | |
NBNode & | operator= (const NBNode &s) |
invalidated assignment operator More... | |
void | remapRemoved (NBTrafficLightLogicCont &tc, NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing) |
void | replaceInConnectionProhibitions (NBEdge *which, NBEdge *by, unsigned int whichLaneOff, unsigned int byLaneOff) |
void | setPriorityJunctionPriorities () |
sets the priorites in case of a priority junction More... | |
Private Attributes | |
EdgeVector | myAllEdges |
Vector of incoming and outgoing edges. More... | |
NBConnectionProhibits | myBlockedConnections |
std::vector< Crossing > | myCrossings |
Vector of crossings. More... | |
CustomShapeMap | myCustomLaneShapes |
NBDistrict * | myDistrict |
The district the node is the centre of. More... | |
bool | myHaveCustomPoly |
whether this nodes shape was set by the user More... | |
EdgeVector | myIncomingEdges |
Vector of incoming edges. More... | |
EdgeVector | myOutgoingEdges |
Vector of outgoing edges. More... | |
PositionVector | myPoly |
the (outer) shape of the junction More... | |
Position | myPosition |
The position the node lies at. More... | |
SUMOReal | myRadius |
the turning radius (for all corners) at this node in m. More... | |
NBRequest * | myRequest |
std::set < NBTrafficLightDefinition * > | myTrafficLights |
SumoXMLNodeType | myType |
The type of the junction. More... | |
std::vector< WalkingArea > | myWalkingAreas |
Vector of walking areas. More... | |
Friends | |
class | GNEJunction |
class | NBEdgePriorityComputer |
class | NBNodeCont |
class | NBNodesEdgesSorter |
class | NBNodeShapeComputer |
class | NBNodeTypeComputer |
Represents a single node (junction) during network building.
typedef std::map<std::string, PositionVector> NBNode::CustomShapeMap |
NBNode::NBNode | ( | const std::string & | id, |
const Position & | position, | ||
SumoXMLNodeType | type | ||
) |
Constructor.
[in] | id | The id of the node |
[in] | position | The position of the node |
[in] | type | The type of the node |
Definition at line 232 of file NBNode.cpp.
NBNode::NBNode | ( | const std::string & | id, |
const Position & | position, | ||
NBDistrict * | district = 0 |
||
) |
Constructor.
[in] | id | The id of the node |
[in] | position | The position of the node |
[in] | district | The district this district node represents, 0 means no district node |
Definition at line 244 of file NBNode.cpp.
NBNode::~NBNode | ( | ) |
|
private |
invalidated copy constructor
void NBNode::addCrossing | ( | EdgeVector | edges, |
SUMOReal | width, | ||
bool | priority | ||
) |
add a pedestrian crossing to this node
Definition at line 2198 of file NBNode.cpp.
References myCrossings.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLConnectionsHandler::addCrossing(), and checkCrossing().
void NBNode::addIncomingEdge | ( | NBEdge * | edge | ) |
adds an incoming edge
Definition at line 406 of file NBNode.cpp.
References myAllEdges, and myIncomingEdges.
Referenced by NBEdge::init(), NBEdge::reinitNodes(), and NBEdge::splitGeometry().
void NBNode::addOutgoingEdge | ( | NBEdge * | edge | ) |
adds an outgoing edge
Definition at line 416 of file NBNode.cpp.
References myAllEdges, and myOutgoingEdges.
Referenced by NBEdge::init(), and NBEdge::reinitNodes().
void NBNode::addSortedLinkFoes | ( | const NBConnection & | mayDrive, |
const NBConnection & | mustStop | ||
) |
Definition at line 1054 of file NBNode.cpp.
References NBConnection::getFrom(), NBConnection::getTo(), myBlockedConnections, and WRITE_WARNING.
Referenced by NIImporter_SUMO::_loadNetwork(), NIVissimDisturbance::addToNode(), and NIXMLConnectionsHandler::myStartElement().
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 121 of file Named.h.
References Named::StoringVisitor::add().
void NBNode::addTrafficLight | ( | NBTrafficLightDefinition * | tlDef | ) |
Adds a traffic light to the list of traffic lights that control this node.
[in] | tld | The traffic light that controls this node |
Definition at line 295 of file NBNode.cpp.
References myTrafficLights, myType, NODETYPE_RAIL_SIGNAL, NODETYPE_TRAFFIC_LIGHT, and NODETYPE_TRAFFIC_LIGHT_NOJUNCTION.
Referenced by NBTrafficLightDefinition::addNode(), NBLoadedTLDef::addToSignalGroup(), and NIImporter_OpenDrive::loadNetwork().
void NBNode::avoidOverlap | ( | ) |
fix overlap
Definition at line 2303 of file NBNode.cpp.
References NBEdge::getTurnDestination(), myIncomingEdges, and NBEdge::shiftPositionAtNode().
unsigned int NBNode::buildCrossings | ( | ) |
Definition at line 1749 of file NBNode.cpp.
References BACKWARD, PositionVector::extrapolate(), FORWARD, gDebugFlag1, Named::getID(), PositionVector::move2side(), myCrossings, NBHelpers::relAngle(), NBEdge::Lane::shape, SUMO_const_laneWidth, SUMOReal, toString(), NBEdge::UNSPECIFIED_WIDTH, and NBEdge::Lane::width.
Referenced by buildInnerEdges().
void NBNode::buildInnerEdges | ( | bool | buildCrossingsAndWalkingAreas | ) |
build internal lanes, pedestrian crossings and walking areas
Definition at line 1706 of file NBNode.cpp.
References buildCrossings(), buildWalkingAreas(), Named::getID(), OptionsCont::getOptions(), myCrossings, myCustomLaneShapes, myIncomingEdges, and toString().
void NBNode::buildWalkingAreas | ( | int | cornerDetail | ) |
Definition at line 1816 of file NBNode.cpp.
References PositionVector::append(), computeSmoothShape(), crossingBetween(), Position::distanceTo2D(), PositionVector::eraseAt(), gDebugFlag1, getControllingTLS(), getEdgesSortedByAngleAtNodeCenter(), NBEdge::getFromNode(), Named::getID(), NBEdge::getLanes(), NBEdge::getLaneShape(), PositionVector::getSubpartByIndex(), NBEdge::hasConnectionTo(), NBNode::Crossing::id, NBNode::WalkingArea::id, isTLControlled(), NBNode::WalkingArea::length, MAX2(), PositionVector::move2side(), myAllEdges, myCrossings, myWalkingAreas, NBNode::WalkingArea::nextCrossing, NBNode::WalkingArea::nextSidewalks, NBNode::Crossing::nextWalkingArea, NBEdge::Lane::permissions, POSITION_EPS, NBNode::WalkingArea::prevSidewalks, NBNode::Crossing::prevWalkingArea, PositionVector::push_back(), PositionVector::push_back_noDoublePos(), PositionVector::push_front_noDoublePos(), PositionVector::reverse(), NBEdge::Lane::shape, NBNode::Crossing::shape, NBNode::WalkingArea::shape, SUMO_const_laneWidth, SUMOReal, SVC_PEDESTRIAN, NBNode::WalkingArea::tlID, toString(), NBEdge::UNSPECIFIED_WIDTH, NBEdge::Lane::width, NBNode::Crossing::width, and NBNode::WalkingArea::width.
Referenced by buildInnerEdges().
int NBNode::checkCrossing | ( | EdgeVector | candidates | ) |
Definition at line 1604 of file NBNode.cpp.
References addCrossing(), DEFAULT_CROSSING_WIDTH, Position::distanceTo2D(), EXTEND_CROSSING_ANGLE_THRESHOLD, gDebugFlag1, NBEdge::getCrossingAngle(), NBEdge::getFromNode(), NBEdge::getLanes(), NBEdge::getLaneWidth(), NBEdge::getNumLanes(), NBEdge::getSpeed(), NBEdge::getToNode(), isTLControlled(), SPLIT_CROSSING_ANGLE_THRESHOLD, SPLIT_CROSSING_WIDTH_THRESHOLD, SUMOReal, toString(), and UNCONTROLLED_CROSSING_SPEED_THRESHOLD.
Referenced by guessCrossings().
bool NBNode::checkIsRemovable | ( | ) | const |
Definition at line 1380 of file NBNode.cpp.
References myIncomingEdges, myOutgoingEdges, myTrafficLights, and NBContHelper::nextCCW().
Referenced by getEdgesToJoin(), and NBNodeCont::removeUnwishedNodes().
PositionVector NBNode::computeInternalLaneShape | ( | NBEdge * | fromE, |
const NBEdge::Connection & | con, | ||
int | numPoints = 5 |
||
) | const |
Compute the shape for an internal lane.
[in] | fromE | The starting edge |
[in] | con | The connection for this internal lane |
[in] | numPoints | The number of geometry points for the internal lane |
Definition at line 571 of file NBNode.cpp.
References PositionVector::append(), computeSmoothShape(), NBEdge::Connection::fromLane, Named::getID(), NBEdge::Connection::getInternalLaneID(), NBEdge::getLaneShape(), NBEdge::getLaneStruct(), NBEdge::getNumLanes(), PositionVector::getSubpart(), NBEdge::getTurnDestination(), NBEdge::Connection::id, myCustomLaneShapes, NBEdge::Connection::shape, SUMOReal, NBEdge::Connection::toEdge, NBEdge::Connection::toLane, toString(), NBEdge::Connection::viaID, and NBEdge::Connection::viaShape.
Referenced by NBEdge::buildInnerEdges().
void NBNode::computeLanes2Lanes | ( | const bool | buildCrossingsAndWalkingAreas | ) |
computes the connections of lanes to edges
Definition at line 743 of file NBNode.cpp.
References NBEdge::addLane2LaneConnections(), Bresenham::compute(), FORWARD, NBEdge::getAngleAtNode(), GeomHelper::getCCWAngleDiff(), GeomHelper::getCWAngleDiff(), getEdgesThatApproach(), NBEdge::getFirstNonPedestrianLaneIndex(), NBEdge::getNumLanes(), NBEdge::getStep(), NBEdge::getTurnDestination(), NBEdge::isConnectedTo(), NBEdge::L2L_COMPUTED, NBEdge::L2L_VALIDATED, NBEdge::LANES2EDGES, MAX2(), myIncomingEdges, myOutgoingEdges, NBNode::ApproachingDivider::numAvailableLanes(), NBEdge::setConnection(), and SUMOReal.
void NBNode::computeLogic | ( | const NBEdgeCont & | ec, |
OptionsCont & | oc | ||
) |
computes the node's type, logic and traffic light
Definition at line 657 of file NBNode.cpp.
References NBRequest::buildBitfieldLogic(), OptionsCont::getBool(), Named::getID(), isDistrict(), OptionsCont::isInStringVector(), NBEdgeCont::isLeftHanded(), isNearDistrict(), MAX_CONNECTIONS, myAllEdges, myBlockedConnections, myIncomingEdges, myOutgoingEdges, myRequest, myTrafficLights, myType, NODETYPE_DEAD_END, NODETYPE_DISTRICT, NODETYPE_NOJUNCTION, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, numNormalConnections(), removeTrafficLights(), and WRITE_WARNING.
Compute the junction shape for this node.
[in] | lefhand | Whether the network uses left-hand traffic |
[in] | mismatchThreshold | The threshold for warning about shapes which are away from myPosition |
Definition at line 711 of file NBNode.cpp.
References PositionVector::around(), NBNodeShapeComputer::compute(), PositionVector::distance(), Named::getID(), myHaveCustomPoly, Named::myID, myIncomingEdges, myOutgoingEdges, myPoly, myPosition, PositionVector::push_back(), PositionVector::push_back_noDoublePos(), toString(), and WRITE_WARNING.
PositionVector NBNode::computeSmoothShape | ( | const PositionVector & | begShape, |
const PositionVector & | endShape, | ||
int | numPoints, | ||
bool | isTurnaround, | ||
SUMOReal | extrapolateBeg, | ||
SUMOReal | extrapolateEnd | ||
) | const |
Compute a smooth curve between the given geometries.
[in] | begShape | The geometry at the start |
[in] | endShape | The geometry at the end |
[in] | numPoints | The number of geometry points for the internal lane |
[in] | isTurnaround | Whether this shall be the shape for a turnaround |
[in] | extrapolateBeg | Extrapolation distance at the beginning |
[in] | extrapolateEnd | Extrapolation distance at the end |
Definition at line 455 of file NBNode.cpp.
References Position::almostSame(), Line::atan2Angle(), bezier(), Position::distanceTo(), Line::extrapolateFirstBy(), Line::extrapolateSecondBy(), PositionVector::getBegLine(), PositionVector::getEndLine(), Named::getID(), Line::getPositionAtDistance(), Line::intersects(), Line::intersectsAt(), ISNAN(), Line::length(), M_PI, MAX2(), MIN2(), myPosition, Line::p1(), Line::p2(), POSITION_EPS, PositionVector::push_back(), Line::rotateAtP1(), Line::sub(), Position::sub(), SUMOReal, WRITE_WARNING, Position::x(), Position::y(), and Position::z().
Referenced by buildWalkingAreas(), computeInternalLaneShape(), and NBNodeShapeComputer::getSmoothCorner().
return true if the given edges are connected by a crossing
Definition at line 2132 of file NBNode.cpp.
References myCrossings.
Referenced by buildWalkingAreas().
EdgeVector NBNode::edgesBetween | ( | const NBEdge * | e1, |
const NBEdge * | e2 | ||
) | const |
return all edges that lie clockwise between the given edges
Definition at line 2149 of file NBNode.cpp.
References myAllEdges, and NBContHelper::nextCW().
bool NBNode::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.
[in] | from1 | The starting edge of the first stream |
[in] | to1 | The ending edge of the first stream |
[in] | from2 | The starting edge of the second stream |
[in] | to2 | The ending edge of the second stream |
Definition at line 1223 of file NBNode.cpp.
References NBRequest::foes(), and myRequest.
Referenced by NBEdge::buildInnerEdges(), NBTrafficLightDefinition::foes(), NBTrafficLightDefinition::forbids(), and needsCont().
bool NBNode::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.
[in] | possProhibitedFrom | The maybe prohibited connection's begin |
[in] | possProhibitedTo | The maybe prohibited connection's end |
[in] | possProhibitorFrom | The maybe prohibiting connection's begin |
[in] | possProhibitorTo | The maybe prohibiting connection's end |
[in] | regardNonSignalisedLowerPriority | Whether the right of way rules without traffic lights shall be regarded |
Definition at line 1213 of file NBNode.cpp.
References NBRequest::forbids(), and myRequest.
Referenced by NBEdge::buildInnerEdges(), and NBTrafficLightDefinition::forbids().
|
private |
return whether there is a non-sidewalk lane after the given index;
Definition at line 1695 of file NBNode.cpp.
Referenced by guessCrossings().
bool NBNode::geometryLike | ( | ) | const |
whether this is structurally similar to a geometry node
Definition at line 2165 of file NBNode.cpp.
References NBEdge::getAngleAtNode(), MAX2(), myIncomingEdges, myOutgoingEdges, NBHelpers::relAngle(), and SUMOReal.
Referenced by NBNodeCont::discardTrafficLights(), and NBNodeCont::guessTLs().
Position NBNode::getCenter | ( | ) | const |
Returns a position that is guaranteed to lie within the node shape.
Definition at line 2242 of file NBNode.cpp.
References PositionVector::around(), PositionVector::closePolygon(), PositionVector::distance(), PositionVector::getPolygonCenter(), myPoly, myPosition, and POSITION_EPS.
Referenced by NWWriter_SUMO::writeEdge().
Definition at line 1484 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NBEdgeCont::guessRoundabouts(), NBNodeCont::joinJunctions(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Turns(), and NGNet::toNB().
|
inline |
Returns the traffic lights that were assigned to this node.
Definition at line 323 of file NBNode.h.
References myTrafficLights.
Referenced by NIXMLNodesHandler::addNode(), buildWalkingAreas(), NBNodeCont::discardTrafficLights(), NBNodeCont::guessTLs(), NIImporter_OpenDrive::loadNetwork(), and NWWriter_XML::writeNodes().
const NBNode::Crossing & NBNode::getCrossing | ( | const std::string & | id | ) | const |
return the crossing with the given id
Definition at line 2218 of file NBNode.cpp.
References myCrossings.
Referenced by NWWriter_SUMO::writeNetwork().
|
inline |
return this junctions pedestrian crossings
Definition at line 624 of file NBNode.h.
References myCrossings.
Referenced by NBEdge::buildInnerEdges(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), NWWriter_SUMO::writeJunction(), and NWWriter_SUMO::writeNetwork().
|
inline |
sets a custom shape for an internal lane
Definition at line 506 of file NBNode.h.
References myCustomLaneShapes.
Referenced by NWWriter_SUMO::writeLane().
LinkDirection NBNode::getDirection | ( | const NBEdge *const | incoming, |
const NBEdge *const | outgoing | ||
) | const |
Returns the representation of the described stream's direction.
[in] | incoming | The edge the stream starts at |
[in] | outgoing | The edge the stream ends at |
Definition at line 1311 of file NBNode.cpp.
References abs, NBEdge::getAngleAtNode(), NBEdge::isTurningDirectionAt(), LINKDIR_LEFT, LINKDIR_NODIR, LINKDIR_PARTLEFT, LINKDIR_PARTRIGHT, LINKDIR_RIGHT, LINKDIR_STRAIGHT, LINKDIR_TURN, myAllEdges, NBContHelper::nextCCW(), NBContHelper::nextCW(), NBHelpers::normRelAngle(), and SUMOReal.
Referenced by NBEdge::buildInnerEdges(), NBOwnTLDef::computeUnblockedWeightedStreamNumber(), NBEdge::MainDirections::MainDirections(), NBRequest::mustBrake(), NBRequest::mustBrakeForCrossing(), needsCont(), NBOwnTLDef::patchStateForCrossings(), and NWWriter_SUMO::writeConnection().
|
inline |
Returns all edges which participate in this node.
Definition at line 267 of file NBNode.h.
References myAllEdges.
Referenced by NBNodeCont::generateNodeClusters(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), and NBEdgeCont::guessRoundabouts().
|
private |
returns the list of all edges sorted clockwise by getAngleAtNodeToCenter
Definition at line 2260 of file NBNode.cpp.
References gDebugFlag1, myAllEdges, and toString().
Referenced by buildWalkingAreas(), and guessCrossings().
|
private |
returns a list of edges which are connected to the given outgoing edge
Definition at line 858 of file NBNode.cpp.
References myAllEdges, and NBContHelper::nextCW().
Referenced by computeLanes2Lanes().
Definition at line 1437 of file NBNode.cpp.
References checkIsRemovable(), myIncomingEdges, myOutgoingEdges, and NBContHelper::nextCCW().
Referenced by NBNodeCont::removeUnwishedNodes().
Position NBNode::getEmptyDir | ( | ) | const |
Returns something like the most unused direction Should only be used to add source or sink nodes.
Definition at line 1123 of file NBNode.cpp.
References Position::add(), getPosition(), Position::mul(), myIncomingEdges, myOutgoingEdges, myPosition, Position::norm2d(), Position::sub(), SUMOReal, Position::x(), and Position::y().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBEdge::addSidewalk(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), computeInternalLaneShape(), NBEdge::computeLaneShapes(), computeLogic(), NBOwnTLDef::computeLogicAndConts(), computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), getPossiblySplittedIncoming(), getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_JE2013::wantsChange(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Returns this node's incoming edges.
Definition at line 251 of file NBNode.h.
References myIncomingEdges.
Referenced by NBEdge::addSidewalk(), NIImporter_OpenStreetMap::RelationHandler::applyRestriction(), NBEdge::buildInnerEdges(), NBRampsComputer::buildOffRamp(), NBNodeShapeComputer::compute(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::decLaneNo(), NIImporter_VISUM::getNamedEdgeContinuating(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), NBNodeCont::guessTLs(), NBEdge::incLaneNo(), isNearDistrict(), NBNodeCont::joinJunctions(), NBEdgeCont::markRoundabouts(), NBRampsComputer::mayNeedOffRamp(), NBRampsComputer::mayNeedOnRamp(), NBContHelper::node_with_incoming_finder::operator()(), NIImporter_VISUM::parse_Lanes(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeUnwishedNodes(), NBEdgeCont::retrievePossiblySplit(), NGNet::toNB(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), and NWWriter_DlrNavteq::writeTrafficSignals().
LinkState NBNode::getLinkState | ( | const NBEdge * | incoming, |
NBEdge * | outgoing, | ||
int | fromLane, | ||
bool | mayDefinitelyPass, | ||
const std::string & | tlID | ||
) | const |
Definition at line 1357 of file NBNode.cpp.
References NBEdge::isInnerEdge(), LINKSTATE_ALLWAY_STOP, LINKSTATE_EQUAL, LINKSTATE_MAJOR, LINKSTATE_MINOR, LINKSTATE_STOP, LINKSTATE_TL_OFF_BLINKING, LINKSTATE_TL_OFF_NOSIGNAL, mustBrake(), myType, NODETYPE_ALLWAY_STOP, NODETYPE_PRIORITY_STOP, and NODETYPE_RIGHT_BEFORE_LEFT.
Referenced by NWWriter_SUMO::writeConnection().
|
static |
returns the node id for internal lanes, crossings and walkingareas
Definition at line 2283 of file NBNode.cpp.
References WRITE_ERROR.
Referenced by NIXMLConnectionsHandler::addCustomShape(), and NIImporter_SUMO::addLane().
Definition at line 1036 of file NBNode.cpp.
References NBEdge::getToNode(), and myIncomingEdges.
Referenced by NBNodeTypeComputer::computeNodeTypes().
|
inline |
Returns this node's outgoing edges.
Definition at line 259 of file NBNode.h.
References myOutgoingEdges.
Referenced by NIImporter_OpenStreetMap::RelationHandler::applyRestriction(), NBRampsComputer::buildOnRamp(), NBNodeShapeComputer::compute(), NBEdge::computeEdge2Edges(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::decLaneNo(), NBNodeCont::discardTrafficLights(), NBEdge::getConnectedSorted(), NIImporter_VISUM::getEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), NBNodeCont::guessTLs(), isNearDistrict(), NBNodeCont::joinJunctions(), NBEdge::markAsInLane2LaneState(), NBRampsComputer::mayNeedOffRamp(), NBRampsComputer::mayNeedOnRamp(), NIXMLEdgesHandler::myEndElement(), NBContHelper::node_with_outgoing_finder::operator()(), NIImporter_VISUM::parse_Lanes(), NIXMLConnectionsHandler::parseLaneBound(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeUnwishedNodes(), and NBEdgeCont::retrievePossiblySplit().
|
inline |
Returns the position of this node.
Definition at line 239 of file NBNode.h.
References myPosition.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLNodesHandler::addNode(), NIVissimEdge::buildNBEdge(), NBEdge::computeAngle(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNodeCont::discardTrafficLights(), NBHelpers::distance(), NBNodeCont::extract(), getEmptyDir(), NWWriter_DlrNavteq::getGraphLength(), NBEdge::hasDefaultGeometryEndpoints(), NBEdge::init(), NBNodeCont::insert(), NIImporter_OpenStreetMap::insertEdge(), NBContHelper::relative_outgoing_edge_sorter::operator()(), NBContHelper::relative_incoming_edge_sorter::operator()(), NIVissimEdge::remapOneOfNodes(), NIImporter_DlrNavteq::EdgesHandler::report(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NBNodeCont::retrieve(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), NBEdge::splitGeometry(), NBEdge::startShapeAt(), NWWriter_SUMO::writeJunction(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_DlrNavteq::writeTrafficSignals().
NBEdge * NBNode::getPossiblySplittedIncoming | ( | const std::string & | edgeid | ) |
Definition at line 1071 of file NBNode.cpp.
References Named::getID(), and myIncomingEdges.
Referenced by NIVissimDisturbance::getConnection().
NBEdge * NBNode::getPossiblySplittedOutgoing | ( | const std::string & | edgeid | ) |
Definition at line 1084 of file NBNode.cpp.
References Named::getID(), and myOutgoingEdges.
Referenced by NIVissimDisturbance::getConnection().
|
inline |
Definition at line 606 of file NBNode.h.
References myBlockedConnections.
|
inline |
Returns the turning radius of this node.
Definition at line 283 of file NBNode.h.
References myRadius.
Referenced by NBNodeShapeComputer::computeNodeShapeDefault(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
const PositionVector & NBNode::getShape | ( | ) | const |
retrieve the junction shape
Definition at line 1461 of file NBNode.cpp.
References myPoly.
Referenced by NBEdge::computeAngle(), NBNodesEdgesSorter::sortNodesEdges(), NBEdge::startShapeAt(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
|
inline |
Returns the type of this node.
Definition at line 276 of file NBNode.h.
References myType.
Referenced by NIXMLNodesHandler::addNode(), NBEdgeCont::generateStreetSigns(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NBRequest::setBlocking(), NBTrafficLightLogicCont::setTLControllingInformation(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
|
inline |
return this junctions pedestrian walking areas
Definition at line 629 of file NBNode.h.
References myWalkingAreas.
Referenced by NWWriter_SUMO::writeInternalEdges(), and NWWriter_SUMO::writeNetwork().
int NBNode::guessCrossings | ( | ) |
guess pedestrian crossings and return how many were guessed
Definition at line 1532 of file NBNode.cpp.
References checkCrossing(), forbidsPedestriansAfter(), gDebugFlag1, getEdgesSortedByAngleAtNodeCenter(), NBEdge::getFromNode(), Named::getID(), NBEdge::getLanes(), myAllEdges, myCrossings, SVC_PEDESTRIAN, and toString().
|
inline |
return whether the shape was set by the user
Definition at line 516 of file NBNode.h.
References myHaveCustomPoly.
Referenced by NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
Returns whether the given edge ends at this node.
[in] | e | The edge |
Definition at line 1024 of file NBNode.cpp.
References myIncomingEdges.
Referenced by NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeUniqueDirectionList(), NBNodeCont::generateNodeClusters(), NBNodeShapeComputer::joinSameDirectionEdges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), and NIImporter_VISUM::parse_TurnsToSignalGroups().
Returns whether the given edge starts at this node.
[in] | e | The edge |
Definition at line 1030 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by isLeftMover(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), and NIImporter_VISUM::parse_TurnsToSignalGroups().
void NBNode::invalidateIncomingConnections | ( | ) |
Definition at line 1151 of file NBNode.cpp.
References myIncomingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
void NBNode::invalidateOutgoingConnections | ( | ) |
Definition at line 1159 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
void NBNode::invalidateTLS | ( | NBTrafficLightLogicCont & | tlCont | ) |
causes the traffic light to be computed anew
Definition at line 334 of file NBNode.cpp.
References NBTrafficLightDefinition::addNode(), Named::getID(), NBTrafficLightDefinition::getNodes(), NBTrafficLightDefinition::getOffset(), NBTrafficLightDefinition::getType(), NBTrafficLightLogicCont::insert(), isTLControlled(), myTrafficLights, and NBTrafficLightLogicCont::removeFully().
Referenced by NIXMLEdgesHandler::myEndElement(), and NIXMLConnectionsHandler::myStartElement().
bool NBNode::isDistrict | ( | ) | const |
Definition at line 1526 of file NBNode.cpp.
References myType, and NODETYPE_DISTRICT.
Referenced by computeLogic(), and isNearDistrict().
bool NBNode::isJoinedTLSControlled | ( | ) | const |
Returns whether this node is controlled by a tls that spans over more than one node.
Definition at line 320 of file NBNode.cpp.
References isTLControlled(), and myTrafficLights.
Computes whether the given connection is a left mover across the junction.
It is assumed, that it is a left-mover if the clockwise angle is lower than the counter-clockwise angle.
[in] | from | The incoming edge (the begin of the connection) |
[in] | from | The outgoing edge (the end of the connection) |
Definition at line 1194 of file NBNode.cpp.
References NBEdge::getAngleAtNode(), GeomHelper::getCCWAngleDiff(), GeomHelper::getCWAngleDiff(), hasOutgoing(), NBEdge::isTurningDirectionAt(), myAllEdges, myIncomingEdges, myOutgoingEdges, NBContHelper::nextCW(), and SUMOReal.
Referenced by NBEdge::computeEdge2Edges().
bool NBNode::isNearDistrict | ( | ) | const |
Definition at line 1495 of file NBNode.cpp.
References NBEdge::getFromNode(), getIncomingEdges(), getOutgoingEdges(), NBEdge::getToNode(), and isDistrict().
Referenced by computeLogic(), and NBNodeCont::guessTLs().
|
private |
Definition at line 426 of file NBNode.cpp.
References NBEdge::getNumLanes(), myIncomingEdges, myOutgoingEdges, and NBContHelper::nextCW().
Referenced by NBNodeShapeComputer::compute(), and NBNodeTypeComputer::computeNodeTypes().
|
inline |
Returns whether this node is controlled by any tls.
Definition at line 309 of file NBNode.h.
References myTrafficLights.
Referenced by NIXMLConnectionsHandler::addCrossing(), NBEdge::appendTurnaround(), NBEdge::buildInnerEdges(), buildWalkingAreas(), checkCrossing(), NBNodeCont::discardTrafficLights(), NBNodeCont::guessTLs(), invalidateTLS(), isJoinedTLSControlled(), NIImporter_OpenDrive::loadNetwork(), NWWriter_XML::writeNodes(), and NWWriter_DlrNavteq::writeTrafficSignals().
bool NBNode::mustBrake | ( | const NBEdge *const | from, |
const NBEdge *const | to, | ||
int | fromLane, | ||
bool | includePedCrossings | ||
) | const |
Returns the information whether the described flow must let any other flow pass.
[in] | from | The connection's start edge |
[in] | to | The connection's end edge |
[in] | fromLane | The lane the connection start at |
[in] | includePedCrossings | Whether braking due to a pedestrian crossing counts |
Definition at line 1167 of file NBNode.cpp.
References NBRequest::mustBrake(), and myRequest.
Referenced by getLinkState(), NBTrafficLightDefinition::mustBrake(), and needsCont().
bool NBNode::mustBrakeForCrossing | ( | const NBEdge *const | from, |
const NBEdge *const | to, | ||
const Crossing & | crossing | ||
) | const |
Returns the information whether the described flow must brake for the given crossing.
[in] | from | The connection's start edge |
[in] | to | The connection's end edge |
[in] | crossing | The pedestrian crossing to check |
Definition at line 1181 of file NBNode.cpp.
References NBRequest::mustBrakeForCrossing(), and myRequest.
Referenced by NBOwnTLDef::patchStateForCrossings().
bool NBNode::needsCont | ( | const NBEdge * | fromE, |
const NBEdge * | otherFromE, | ||
const NBEdge::Connection & | c, | ||
const NBEdge::Connection & | otherC | ||
) | const |
whether an internal junction should be built at from and respect other
Definition at line 612 of file NBNode.cpp.
References foes(), NBEdge::Connection::fromLane, getDirection(), NBEdge::getJunctionPriority(), LINKDIR_LEFT, LINKDIR_PARTRIGHT, LINKDIR_RIGHT, LINKDIR_STRAIGHT, LINKDIR_TURN, mustBrake(), myRequest, myTrafficLights, myType, NODETYPE_ALLWAY_STOP, NODETYPE_RIGHT_BEFORE_LEFT, NBRequest::rightTurnConflict(), rightTurnConflict(), NBEdge::Connection::tlID, and NBEdge::Connection::toEdge.
Referenced by NBEdge::buildInnerEdges().
int NBNode::numNormalConnections | ( | ) | const |
return the number of lane-to-lane connections at this junction (excluding crossings)
Definition at line 2237 of file NBNode.cpp.
References NBRequest::getSizes(), and myRequest.
Referenced by computeLogic().
void NBNode::reinit | ( | const Position & | position, |
SumoXMLNodeType | type, | ||
bool | updateEdgeGeometries = false |
||
) |
Resets initial values.
[in] | position | The position of the node |
[in] | type | The type of the node |
[in] | updateEdgeGeometries | Whether the geometires of all connected edges shall be updated |
Definition at line 261 of file NBNode.cpp.
References myIncomingEdges, myOutgoingEdges, myPosition, myType, NODETYPE_TRAFFIC_LIGHT, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, and removeTrafficLights().
Referenced by NIXMLNodesHandler::addNode(), NBNodeCont::discardTrafficLights(), and NIImporter_DlrNavteq::TrafficlightsHandler::report().
|
private |
Definition at line 1230 of file NBNode.cpp.
References NBConnection::getFrom(), NBConnection::getTo(), myBlockedConnections, and NBTrafficLightLogicCont::remapRemoved().
Referenced by removeSelfLoops().
void NBNode::removeCrossing | ( | const EdgeVector & | edges | ) |
remove a pedestrian crossing from this node (identified by its edges)
Definition at line 2204 of file NBNode.cpp.
References myCrossings.
void NBNode::removeDoubleEdges | ( | ) |
Definition at line 985 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and myOutgoingEdges.
Referenced by replaceIncoming(), replaceOutgoing(), and NBEdgeCont::splitAt().
Removes edge from this node and optionally removes connections as well.
Definition at line 1097 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and myOutgoingEdges.
Referenced by NBEdgeCont::extract(), NBEdgeCont::insert(), NBEdge::reinit(), NBEdge::reinitNodes(), NBEdgeCont::removeUnwishedEdges(), and NBEdge::splitGeometry().
unsigned int NBNode::removeSelfLoops | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tc | ||
) |
Removes edges which are both incoming and outgoing into this node.
If given, the connections to other edges participating in this node are updated
in,opt. | changed] dc The districts container to update |
in,opt. | changed] ec The edge container to remove the edges from |
in,opt. | changed] tc The traffic lights container to update |
Definition at line 363 of file NBNode.cpp.
References NBEdgeCont::erase(), Named::getID(), NBEdge::isConnectedTo(), myIncomingEdges, myOutgoingEdges, NBEdge::remapConnections(), remapRemoved(), and WRITE_WARNING.
void NBNode::removeTrafficLight | ( | NBTrafficLightDefinition * | tlDef | ) |
Removes the given traffic light from this node.
Definition at line 304 of file NBNode.cpp.
References myTrafficLights, and NBTrafficLightDefinition::removeNode().
Referenced by NBNodeCont::discardTrafficLights(), NBOwnTLDef::initNeedsContRelation(), removeTrafficLights(), and NBTrafficLightLogicCont::setTLControllingInformation().
void NBNode::removeTrafficLights | ( | ) |
Removes all references to traffic lights that control this tls.
Definition at line 311 of file NBNode.cpp.
References myTrafficLights, and removeTrafficLight().
Referenced by NIXMLNodesHandler::addNode(), computeLogic(), NBNodeCont::extract(), NBNodeCont::guessTLs(), and reinit().
Replaces occurences of the first edge within the list of incoming by the second Connections are remapped, too.
Definition at line 917 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and replaceInConnectionProhibitions().
Referenced by NBEdgeCont::joinSameNodeConnectingEdges(), NBNodeCont::removeUnwishedNodes(), replaceIncoming(), and NBEdgeCont::splitAt().
void NBNode::replaceIncoming | ( | const EdgeVector & | which, |
NBEdge * | by | ||
) |
Replaces occurences of every edge from the given list within the list of incoming by the second Connections are remapped, too.
Definition at line 931 of file NBNode.cpp.
References myDistrict, removeDoubleEdges(), NBDistrict::replaceIncoming(), and replaceIncoming().
|
private |
Definition at line 950 of file NBNode.cpp.
References myBlockedConnections, NBConnection::replaceFrom(), and NBConnection::replaceTo().
Referenced by replaceIncoming(), and replaceOutgoing().
Replaces occurences of the first edge within the list of outgoing by the second Connections are remapped, too.
Definition at line 881 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, myOutgoingEdges, replaceInConnectionProhibitions(), and NBEdge::replaceInConnections().
Referenced by NBEdgeCont::joinSameNodeConnectingEdges(), replaceOutgoing(), and NBEdgeCont::splitAt().
void NBNode::replaceOutgoing | ( | const EdgeVector & | which, |
NBEdge * | by | ||
) |
Replaces occurences of every edge from the given list within the list of outgoing by the second Connections are remapped, too.
Definition at line 899 of file NBNode.cpp.
References myDistrict, removeDoubleEdges(), NBDistrict::replaceOutgoing(), and replaceOutgoing().
Applies an offset to the node.
[in] | xoff | The x-offset to apply |
[in] | yoff | The y-offset to apply |
Definition at line 287 of file NBNode.cpp.
References Position::add(), PositionVector::add(), myPoly, and myPosition.
bool NBNode::rightTurnConflict | ( | const NBEdge * | from, |
const NBEdge * | to, | ||
int | fromLane, | ||
const NBEdge * | prohibitorFrom, | ||
const NBEdge * | prohibitorTo, | ||
int | prohibitorFromLane | ||
) | const |
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossings
Definition at line 1187 of file NBNode.cpp.
References myRequest, and NBRequest::rightTurnConflict().
Referenced by NBEdge::buildInnerEdges(), and needsCont().
void NBNode::setCrossingTLIndices | ( | unsigned int | startIndex | ) |
set tl indices of this nodes crossing starting at the given index
Definition at line 2229 of file NBNode.cpp.
References myCrossings.
void NBNode::setCustomLaneShape | ( | const std::string & | laneID, |
const PositionVector & | shape | ||
) |
sets a custom shape for an internal lane
Definition at line 1474 of file NBNode.cpp.
References myCustomLaneShapes.
Referenced by NIXMLConnectionsHandler::addCustomShape(), and NIImporter_SUMO::addJunction().
void NBNode::setCustomShape | ( | const PositionVector & | shape | ) |
set the junction shape
Definition at line 1467 of file NBNode.cpp.
References myHaveCustomPoly, and myPoly.
Referenced by NIImporter_SUMO::addJunction(), and NIXMLNodesHandler::addNode().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 68 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
private |
sets the priorites in case of a priority junction
|
inline |
set the turning radius
Definition at line 511 of file NBNode.h.
References myRadius.
Referenced by NIImporter_SUMO::addJunction(), and NIXMLNodesHandler::addNode().
void NBNode::setRoundabout | ( | ) |
update the type of this node as a roundabout
Definition at line 2190 of file NBNode.cpp.
References myType, NODETYPE_PRIORITY, and NODETYPE_RIGHT_BEFORE_LEFT.
Referenced by NBEdgeCont::markRoundabouts().
void NBNode::shiftTLConnectionLaneIndex | ( | NBEdge * | edge, |
int | offset | ||
) |
patches loaded signal plans by modifying lane indices
Definition at line 355 of file NBNode.cpp.
References myTrafficLights.
Referenced by NBEdge::addSidewalk().
bool NBNode::writeLogic | ( | OutputDevice & | into, |
const bool | checkLaneFoes | ||
) | const |
writes the XML-representation of the logic as a bitset-logic XML representation
Definition at line 701 of file NBNode.cpp.
References Named::myID, myRequest, and NBRequest::writeLogic().
Referenced by NWWriter_SUMO::writeJunction().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Definition at line 189 of file NBNode.h.
Referenced by buildCrossings(), and NBEdge::getFirstNonPedestrianLaneIndex().
|
static |
default width of pedetrian crossings
Definition at line 191 of file NBNode.h.
Referenced by NIXMLConnectionsHandler::addCrossing(), checkCrossing(), and NWWriter_XML::writeEdgesAndConnections().
|
static |
the default turning radius at intersections in m
Definition at line 194 of file NBNode.h.
Referenced by NBNodeShapeComputer::computeNodeShapeDefault().
|
static |
edge directions (for pedestrian related stuff)
Definition at line 188 of file NBNode.h.
Referenced by buildCrossings(), computeLanes2Lanes(), and NBEdge::getFirstNonPedestrianLaneIndex().
|
static |
maximum number of connections allowed
Definition at line 201 of file NBNode.h.
Referenced by computeLogic().
|
private |
Vector of incoming and outgoing edges.
Definition at line 724 of file NBNode.h.
Referenced by addIncomingEdge(), addOutgoingEdge(), buildWalkingAreas(), NBNodeShapeComputer::compute(), NBEdgePriorityComputer::computeEdgePriorities(), computeLogic(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNodeShapeComputer::computeUniqueDirectionList(), edgesBetween(), getDirection(), getEdges(), getEdgesSortedByAngleAtNodeCenter(), getEdgesThatApproach(), guessCrossings(), isLeftMover(), NBNodeShapeComputer::joinSameDirectionEdges(), removeDoubleEdges(), removeEdge(), replaceIncoming(), replaceOutgoing(), and NBNodesEdgesSorter::sortNodesEdges().
|
private |
The container for connection block dependencies
Definition at line 736 of file NBNode.h.
Referenced by addSortedLinkFoes(), computeLogic(), getProhibitions(), remapRemoved(), and replaceInConnectionProhibitions().
|
private |
Vector of crossings.
Definition at line 727 of file NBNode.h.
Referenced by addCrossing(), buildCrossings(), buildInnerEdges(), buildWalkingAreas(), crossingBetween(), getCrossing(), getCrossings(), guessCrossings(), removeCrossing(), and setCrossingTLIndices().
|
private |
Definition at line 754 of file NBNode.h.
Referenced by buildInnerEdges(), computeInternalLaneShape(), getCustomLaneShapes(), and setCustomLaneShape().
|
private |
The district the node is the centre of.
Definition at line 739 of file NBNode.h.
Referenced by replaceIncoming(), and replaceOutgoing().
|
private |
whether this nodes shape was set by the user
Definition at line 745 of file NBNode.h.
Referenced by computeNodeShape(), hasCustomShape(), and setCustomShape().
|
protectedinherited |
The name of the object.
Definition at line 128 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), computeNodeShape(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), MSMeanData::openInterval(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), and MSE3Collector::writeXMLOutput().
|
private |
Vector of incoming edges.
Definition at line 718 of file NBNode.h.
Referenced by addIncomingEdge(), avoidOverlap(), buildInnerEdges(), checkIsRemovable(), NBEdgePriorityComputer::computeEdgePriorities(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), NBNodeTypeComputer::computeNodeTypes(), geometryLike(), getEdgesToJoin(), getEmptyDir(), getIncomingEdges(), getOppositeIncoming(), getPossiblySplittedIncoming(), hasIncoming(), invalidateIncomingConnections(), isLeftMover(), isSimpleContinuation(), reinit(), removeDoubleEdges(), removeEdge(), removeSelfLoops(), replaceIncoming(), replaceOutgoing(), and NBEdgePriorityComputer::setPriorityJunctionPriorities().
|
private |
Vector of outgoing edges.
Definition at line 721 of file NBNode.h.
Referenced by addOutgoingEdge(), checkIsRemovable(), NBEdgePriorityComputer::computeEdgePriorities(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), geometryLike(), getConnectionTo(), getEdgesToJoin(), getEmptyDir(), getOutgoingEdges(), getPossiblySplittedOutgoing(), hasOutgoing(), invalidateOutgoingConnections(), isLeftMover(), isSimpleContinuation(), reinit(), removeDoubleEdges(), removeEdge(), removeSelfLoops(), replaceOutgoing(), and NBEdgePriorityComputer::setPriorityJunctionPriorities().
|
private |
the (outer) shape of the junction
Definition at line 742 of file NBNode.h.
Referenced by computeNodeShape(), getCenter(), getShape(), reshiftPosition(), and setCustomShape().
|
private |
The position the node lies at.
Definition at line 715 of file NBNode.h.
Referenced by computeNodeShape(), computeSmoothShape(), getCenter(), getEmptyDir(), getPosition(), reinit(), and reshiftPosition().
|
private |
the turning radius (for all corners) at this node in m.
Definition at line 752 of file NBNode.h.
Referenced by getRadius(), and setRadius().
|
private |
Definition at line 747 of file NBNode.h.
Referenced by computeLogic(), foes(), forbids(), mustBrake(), mustBrakeForCrossing(), needsCont(), numNormalConnections(), rightTurnConflict(), writeLogic(), and ~NBNode().
|
private |
Definition at line 749 of file NBNode.h.
Referenced by addTrafficLight(), checkIsRemovable(), computeLogic(), getControllingTLS(), invalidateTLS(), isJoinedTLSControlled(), isTLControlled(), needsCont(), removeTrafficLight(), removeTrafficLights(), and shiftTLConnectionLaneIndex().
|
private |
The type of the junction.
Definition at line 733 of file NBNode.h.
Referenced by addTrafficLight(), NBEdgePriorityComputer::computeEdgePriorities(), computeLogic(), NBNodeTypeComputer::computeNodeTypes(), getLinkState(), getType(), isDistrict(), needsCont(), reinit(), and setRoundabout().
|
private |
Vector of walking areas.
Definition at line 730 of file NBNode.h.
Referenced by buildWalkingAreas(), and getWalkingAreas().
|
static |
unspecified lane width
Definition at line 197 of file NBNode.h.
Referenced by NBNodeShapeComputer::computeNodeShapeDefault(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().