SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NBNode Class Reference

Represents a single node (junction) during network building. More...

#include <NBNode.h>

Inheritance diagram for NBNode:
Named

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, bool fromSumoNet=false)
 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 buildCrossingsAndWalkingAreas ()
 
void buildInnerEdges ()
 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 ()
 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 (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...
 
void discardAllCrossings ()
 
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, bool leftHand=false) 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 numCrossingsFromSumoNet () const
 
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...
 
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 setKeepClear (bool keepClear)
 set the keepClear flag 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...
 
bool getKeepClear () const
 Returns the keepClear flag. 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...
 
void mirrorX ()
 mirror coordinates along the x-axis 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 bool rightTurnConflict (const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane, bool lefthand=false)
 return whether the given laneToLane connection is a right turn which must yield to a bicycle crossings 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...
 
int myCrossingsLoadedFromSumoNet
 number of crossings loaded from a sumo net More...
 
CustomShapeMap myCustomLaneShapes
 
bool myDiscardAllCrossings
 whether to discard all pedestrian crossings More...
 
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...
 
bool myKeepClear
 whether the junction area must be kept clear 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
 

Detailed Description

Represents a single node (junction) during network building.

Definition at line 75 of file NBNode.h.

Member Typedef Documentation

typedef std::map<std::string, PositionVector> NBNode::CustomShapeMap

Definition at line 83 of file NBNode.h.

Constructor & Destructor Documentation

NBNode::NBNode ( const std::string &  id,
const Position &  position,
SumoXMLNodeType  type 
)

Constructor.

Parameters
[in]idThe id of the node
[in]positionThe position of the node
[in]typeThe type of the node

Definition at line 231 of file NBNode.cpp.

NBNode::NBNode ( const std::string &  id,
const Position &  position,
NBDistrict *  district = 0 
)

Constructor.

Parameters
[in]idThe id of the node
[in]positionThe position of the node
[in]districtThe district this district node represents, 0 means no district node

Definition at line 246 of file NBNode.cpp.

NBNode::~NBNode ( )

Destructor.

Definition at line 260 of file NBNode.cpp.

References myRequest.

NBNode::NBNode ( const NBNode &  s)
private

invalidated copy constructor

Member Function Documentation

void NBNode::addCrossing ( EdgeVector  edges,
SUMOReal  width,
bool  priority,
bool  fromSumoNet = false 
)

add a pedestrian crossing to this node

Definition at line 2305 of file NBNode.cpp.

References myCrossings, and myCrossingsLoadedFromSumoNet.

Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLConnectionsHandler::addCrossing(), and checkCrossing().

void NBNode::addIncomingEdge ( NBEdge *  edge)

adds an incoming edge

Definition at line 418 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 428 of file NBNode.cpp.

References myAllEdges, and myOutgoingEdges.

Referenced by NBEdge::init(), and NBEdge::reinitNodes().

void Named::addTo ( const StoringVisitor &  cont) const
inlineinherited

Adds this object to the given container.

Parameters
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.

Parameters
[in]tldThe traffic light that controls this node

Definition at line 307 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 2413 of file NBNode.cpp.

References NBEdge::getTurnDestination(), myIncomingEdges, and NBEdge::shiftPositionAtNode().

void NBNode::buildCrossingsAndWalkingAreas ( )
void NBNode::buildInnerEdges ( )

build internal lanes, pedestrian crossings and walking areas

Definition at line 1817 of file NBNode.cpp.

References myCustomLaneShapes, and myIncomingEdges.

bool NBNode::checkIsRemovable ( ) const
PositionVector NBNode::computeInternalLaneShape ( NBEdge *  fromE,
const NBEdge::Connection &  con,
int  numPoints = 5 
) const

Compute the shape for an internal lane.

Parameters
[in]fromEThe starting edge
[in]conThe connection for this internal lane
[in]numPointsThe number of geometry points for the internal lane
Returns
The shape of the internal lane

Definition at line 576 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::computeNodeShape ( SUMOReal  mismatchThreshold)

Compute the junction shape for this node.

Parameters
[in]mismatchThresholdThe threshold for warning about shapes which are away from myPosition

Definition at line 721 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.

Parameters
[in]begShapeThe geometry at the start
[in]endShapeThe geometry at the end
[in]numPointsThe number of geometry points for the internal lane
[in]isTurnaroundWhether this shall be the shape for a turnaround
[in]extrapolateBegExtrapolation distance at the beginning
[in]extrapolateEndExtrapolation distance at the end
Returns
The shape of the internal lane

Definition at line 467 of file NBNode.cpp.

References Line::atan2Angle(), bezier(), Position::distanceTo(), Line::extrapolateFirstBy(), Line::extrapolateSecondBy(), PositionVector::getBegLine(), PositionVector::getEndLine(), 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, Position::x(), Position::y(), and Position::z().

Referenced by buildWalkingAreas(), computeInternalLaneShape(), and NBNodeShapeComputer::getSmoothCorner().

bool NBNode::crossingBetween ( const NBEdge *  e1,
const NBEdge *  e2 
) const

return true if the given edges are connected by a crossing

Definition at line 2239 of file NBNode.cpp.

References myCrossings.

Referenced by buildWalkingAreas().

void NBNode::discardAllCrossings ( )
inline

Definition at line 637 of file NBNode.h.

References myDiscardAllCrossings.

Referenced by NIXMLConnectionsHandler::addCrossing().

EdgeVector NBNode::edgesBetween ( const NBEdge *  e1,
const NBEdge *  e2 
) const

return all edges that lie clockwise between the given edges

Definition at line 2256 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.

Parameters
[in]from1The starting edge of the first stream
[in]to1The ending edge of the first stream
[in]from2The starting edge of the second stream
[in]to2The ending edge of the second stream
Returns
Whether both stream are foes (cross)

Definition at line 1277 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.

Parameters
[in]possProhibitedFromThe maybe prohibited connection's begin
[in]possProhibitedToThe maybe prohibited connection's end
[in]possProhibitorFromThe maybe prohibiting connection's begin
[in]possProhibitorToThe maybe prohibiting connection's end
[in]regardNonSignalisedLowerPriorityWhether the right of way rules without traffic lights shall be regarded
Returns
Whether the second flow prohibits the first one

Definition at line 1267 of file NBNode.cpp.

References NBRequest::forbids(), and myRequest.

Referenced by NBEdge::buildInnerEdges(), and NBTrafficLightDefinition::forbids().

bool NBNode::forbidsPedestriansAfter ( std::vector< std::pair< NBEdge *, bool > >  normalizedLanes,
int  startIndex 
)
private

return whether there is a non-sidewalk lane after the given index;

Definition at line 1790 of file NBNode.cpp.

Referenced by guessCrossings().

bool NBNode::geometryLike ( ) const

whether this is structurally similar to a geometry node

Definition at line 2272 of file NBNode.cpp.

References NBEdge::getAngleAtNode(), MAX2(), myIncomingEdges, myOutgoingEdges, NBHelpers::relAngle(), and SUMOReal.

Referenced by NBNodeCont::discardTrafficLights(), NBNodeCont::generateNodeClusters(), and NBNodeCont::guessTLs().

Position NBNode::getCenter ( ) const

Returns a position that is guaranteed to lie within the node shape.

Definition at line 2352 of file NBNode.cpp.

References PositionVector::around(), PositionVector::closePolygon(), PositionVector::distance(), PositionVector::getPolygonCenter(), myPoly, myPosition, and POSITION_EPS.

Referenced by NWWriter_SUMO::writeEdge().

const std::set<NBTrafficLightDefinition*>& NBNode::getControllingTLS ( ) const
inline

Returns the traffic lights that were assigned to this node.

Returns
The set of tls that control this node

Definition at line 325 of file NBNode.h.

References myTrafficLights.

Referenced by NBNodeCont::discardTrafficLights(), NBNodeCont::guessTLs(), NIImporter_OpenDrive::loadNetwork(), NIXMLNodesHandler::processNodeType(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeNodes().

const NBNode::Crossing & NBNode::getCrossing ( const std::string &  id) const

return the crossing with the given id

Definition at line 2328 of file NBNode.cpp.

References myCrossings.

Referenced by NWWriter_SUMO::writeNetwork().

const std::vector<Crossing>& NBNode::getCrossings ( ) const
inline
const CustomShapeMap& NBNode::getCustomLaneShapes ( ) const
inline

sets a custom shape for an internal lane

Definition at line 511 of file NBNode.h.

References myCustomLaneShapes.

Referenced by NWWriter_SUMO::writeLane().

LinkDirection NBNode::getDirection ( const NBEdge *const  incoming,
const NBEdge *const  outgoing,
bool  leftHand = false 
) const

Returns the representation of the described stream's direction.

Parameters
[in]incomingThe edge the stream starts at
[in]outgoingThe edge the stream ends at
[in]leftHandWhether a lefthand network is being built. Should only be set at writing time
Returns
The direction of the stream

Definition at line 1365 of file NBNode.cpp.

References abs, NBEdge::getAngleAtNode(), NBEdge::isTurningDirectionAt(), LINKDIR_LEFT, LINKDIR_NODIR, LINKDIR_PARTLEFT, LINKDIR_PARTRIGHT, LINKDIR_RIGHT, LINKDIR_STRAIGHT, LINKDIR_TURN, LINKDIR_TURN_LEFTHAND, 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(), rightTurnConflict(), and NWWriter_SUMO::writeConnection().

const EdgeVector& NBNode::getEdges ( ) const
inline

Returns all edges which participate in this node.

Returns
Edges that start or end at this node

Definition at line 263 of file NBNode.h.

References myAllEdges.

Referenced by NBNodeTypeComputer::computeNodeTypes(), NBNodeCont::generateNodeClusters(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), and NBEdgeCont::guessRoundabouts().

EdgeVector NBNode::getEdgesSortedByAngleAtNodeCenter ( ) const
private

returns the list of all edges sorted clockwise by getAngleAtNodeToCenter

Definition at line 2370 of file NBNode.cpp.

References gDebugFlag1, myAllEdges, and toString().

Referenced by buildWalkingAreas(), and guessCrossings().

EdgeVector * NBNode::getEdgesThatApproach ( NBEdge *  currentOutgoing)
private

returns a list of edges which are connected to the given outgoing edge

Definition at line 872 of file NBNode.cpp.

References myAllEdges, and NBContHelper::nextCW().

Referenced by computeLanes2Lanes().

std::vector< std::pair< NBEdge *, NBEdge * > > NBNode::getEdgesToJoin ( ) const
Position NBNode::getEmptyDir ( ) const

Returns something like the most unused direction Should only be used to add source or sink nodes.

Definition at line 1137 of file NBNode.cpp.

References Position::add(), getPosition(), Position::mul(), myIncomingEdges, myOutgoingEdges, myPosition, Position::norm2d(), Position::sub(), SUMOReal, Position::x(), and Position::y().

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored 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(), MSNet::addChrgStn(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciBusOrContainerStop(), 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(), buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), 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(), 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(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getChrgStnID(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), 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(), MSChrgStn::MSChrgStn(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSDevice_Battery::MSDevice_Battery(), 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()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_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(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), 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(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), MSDevice_Battery::setActBatKap(), MSDevice_Battery::setAirDragCoefficient(), NBNodeCont::setAsTLControlled(), MSChrgStn::setChrgPower(), MSDevice_Battery::setConstantPowerIntake(), NBEdge::setControllingTLInformation(), MSChrgStn::setEfficency(), MSDevice_Battery::setFrontSurfaceArea(), MSDevice_Battery::setInternalMomentOfInertia(), MSDevice_Battery::setMass(), MSDevice_Battery::setMaxBatKap(), NIXMLEdgesHandler::setNodes(), MSDevice_Battery::setPowerMax(), MSDevice_Battery::setPropulsionEfficiency(), MSDevice_Battery::setRadialDragCoefficient(), MSDevice_Battery::setRecuperationEfficiency(), MSLink::setRequestInformation(), MSDevice_Battery::setRollDragCoefficient(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_JE2013::wantsChange(), MSBatteryExport::write(), 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(), writeInterval(), 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().

bool NBNode::getKeepClear ( ) const
inline

Returns the keepClear flag.

Definition at line 285 of file NBNode.h.

References myKeepClear.

Referenced by NWWriter_SUMO::writeConnection(), and NWWriter_XML::writeNodes().

LinkState NBNode::getLinkState ( const NBEdge *  incoming,
NBEdge *  outgoing,
int  fromLane,
bool  mayDefinitelyPass,
const std::string &  tlID 
) const
std::string NBNode::getNodeIDFromInternalLane ( const std::string  id)
static

returns the node id for internal lanes, crossings and walkingareas

Definition at line 2393 of file NBNode.cpp.

References WRITE_ERROR.

Referenced by NIXMLConnectionsHandler::addCustomShape(), and NIImporter_SUMO::addLane().

NBEdge * NBNode::getOppositeIncoming ( NBEdge *  e) const

Definition at line 1050 of file NBNode.cpp.

References NBEdge::getToNode(), and myIncomingEdges.

Referenced by NBNodeTypeComputer::computeNodeTypes().

NBEdge * NBNode::getPossiblySplittedIncoming ( const std::string &  edgeid)

Definition at line 1085 of file NBNode.cpp.

References Named::getID(), and myIncomingEdges.

Referenced by NIVissimDisturbance::getConnection().

NBEdge * NBNode::getPossiblySplittedOutgoing ( const std::string &  edgeid)

Definition at line 1098 of file NBNode.cpp.

References Named::getID(), and myOutgoingEdges.

Referenced by NIVissimDisturbance::getConnection().

const NBConnectionProhibits& NBNode::getProhibitions ( )
inline

Definition at line 620 of file NBNode.h.

References myBlockedConnections.

SUMOReal NBNode::getRadius ( ) const
inline

Returns the turning radius of this node.

Returns
The turning radius of this node

Definition at line 279 of file NBNode.h.

References myRadius.

Referenced by NBNodeShapeComputer::computeNodeShapeDefault(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().

const PositionVector & NBNode::getShape ( ) const
const std::vector<WalkingArea>& NBNode::getWalkingAreas ( ) const
inline

return this junctions pedestrian walking areas

Definition at line 651 of file NBNode.h.

References myWalkingAreas.

Referenced by NWWriter_SUMO::writeInternalEdges(), and NWWriter_SUMO::writeNetwork().

int NBNode::guessCrossings ( )
bool NBNode::hasCustomShape ( ) const
inline

return whether the shape was set by the user

Definition at line 526 of file NBNode.h.

References myHaveCustomPoly.

Referenced by NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().

bool NBNode::hasIncoming ( const NBEdge *const  e) const

Returns whether the given edge ends at this node.

Parameters
[in]eThe edge
Returns
Whether the given edge is one of this node's incoming edges

Definition at line 1038 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().

bool NBNode::hasOutgoing ( const NBEdge *const  e) const

Returns whether the given edge starts at this node.

Parameters
[in]eThe edge
Returns
Whether the given edge is one of this node's outgoing edges

Definition at line 1044 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 1165 of file NBNode.cpp.

References myIncomingEdges.

Referenced by NIVissimDistrictConnection::dict_BuildDistricts().

void NBNode::invalidateOutgoingConnections ( )

Definition at line 1173 of file NBNode.cpp.

References myOutgoingEdges.

Referenced by NIVissimDistrictConnection::dict_BuildDistricts().

bool NBNode::isDistrict ( ) const

Definition at line 1591 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.

Returns
Whether a "joined" traffic light was assigned to this node

Definition at line 332 of file NBNode.cpp.

References isTLControlled(), and myTrafficLights.

bool NBNode::isLeftMover ( const NBEdge *const  from,
const NBEdge *const  to 
) const

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.

Parameters
[in]fromThe incoming edge (the begin of the connection)
[in]fromThe outgoing edge (the end of the connection)
Returns
Whether the described connection is a left-mover

Definition at line 1248 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
bool NBNode::isSimpleContinuation ( ) const
private
void NBNode::mirrorX ( )

mirror coordinates along the x-axis

Definition at line 299 of file NBNode.cpp.

References PositionVector::mirrorX(), Position::mul(), myPoly, and myPosition.

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.

Parameters
[in]fromThe connection's start edge
[in]toThe connection's end edge
[in]fromLaneThe lane the connection start at
[in]includePedCrossingsWhether braking due to a pedestrian crossing counts
Returns
Whether the described connection must brake (has higher priorised foes)

Definition at line 1181 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.

Parameters
[in]fromThe connection's start edge
[in]toThe connection's end edge
[in]crossingThe pedestrian crossing to check
Returns
Whether the described connection must brake (has higher priorised foes)

Definition at line 1195 of file NBNode.cpp.

References NBRequest::mustBrakeForCrossing().

Referenced by NBOwnTLDef::patchStateForCrossings().

bool NBNode::needsCont ( const NBEdge *  fromE,
const NBEdge *  otherFromE,
const NBEdge::Connection &  c,
const NBEdge::Connection &  otherC 
) const
int NBNode::numCrossingsFromSumoNet ( ) const
inline

Definition at line 641 of file NBNode.h.

References myCrossingsLoadedFromSumoNet.

int NBNode::numNormalConnections ( ) const

return the number of lane-to-lane connections at this junction (excluding crossings)

Definition at line 2347 of file NBNode.cpp.

References NBRequest::getSizes(), and myRequest.

Referenced by computeLogic().

NBNode& NBNode::operator= ( const NBNode &  s)
private

invalidated assignment operator

void NBNode::reinit ( const Position &  position,
SumoXMLNodeType  type,
bool  updateEdgeGeometries = false 
)

Resets initial values.

Parameters
[in]positionThe position of the node
[in]typeThe type of the node
[in]updateEdgeGeometriesWhether the geometires of all connected edges shall be updated

Definition at line 266 of file NBNode.cpp.

References myIncomingEdges, myOutgoingEdges, myPosition, myType, NODETYPE_TRAFFIC_LIGHT, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, and removeTrafficLights().

Referenced by NBNodeCont::discardTrafficLights(), NIXMLNodesHandler::processNodeType(), and NIImporter_DlrNavteq::TrafficlightsHandler::report().

void NBNode::remapRemoved ( NBTrafficLightLogicCont &  tc,
NBEdge *  removed,
const EdgeVector &  incoming,
const EdgeVector &  outgoing 
)
private
void NBNode::removeCrossing ( const EdgeVector &  edges)

remove a pedestrian crossing from this node (identified by its edges)

Definition at line 2314 of file NBNode.cpp.

References myCrossings.

Referenced by NIXMLConnectionsHandler::addCrossing().

void NBNode::removeDoubleEdges ( )

Definition at line 999 of file NBNode.cpp.

References myAllEdges, myIncomingEdges, and myOutgoingEdges.

Referenced by replaceIncoming(), replaceOutgoing(), and NBEdgeCont::splitAt().

void NBNode::removeEdge ( NBEdge *  edge,
bool  removeFromConnections = true 
)

Removes edge from this node and optionally removes connections as well.

Definition at line 1111 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

Parameters
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
Returns
The number of removed edges

Definition at line 375 of file NBNode.cpp.

References NBEdgeCont::erase(), Named::getID(), NBEdge::isConnectedTo(), myIncomingEdges, myOutgoingEdges, NBEdge::remapConnections(), remapRemoved(), and WRITE_WARNING.

void NBNode::removeTrafficLight ( NBTrafficLightDefinition *  tlDef)
void NBNode::removeTrafficLights ( )

Removes all references to traffic lights that control this tls.

Definition at line 323 of file NBNode.cpp.

References myTrafficLights, and removeTrafficLight().

Referenced by computeLogic(), NBNodeCont::extract(), NBNodeCont::guessTLs(), NIXMLNodesHandler::processNodeType(), and reinit().

void NBNode::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.

Definition at line 931 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 945 of file NBNode.cpp.

References myDistrict, removeDoubleEdges(), NBDistrict::replaceIncoming(), and replaceIncoming().

void NBNode::replaceInConnectionProhibitions ( NBEdge *  which,
NBEdge *  by,
unsigned int  whichLaneOff,
unsigned int  byLaneOff 
)
private
void NBNode::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.

Definition at line 895 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 913 of file NBNode.cpp.

References myDistrict, removeDoubleEdges(), NBDistrict::replaceOutgoing(), and replaceOutgoing().

void NBNode::reshiftPosition ( SUMOReal  xoff,
SUMOReal  yoff 
)

Applies an offset to the node.

Parameters
[in]xoffThe x-offset to apply
[in]yoffThe y-offset to apply

Definition at line 292 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,
bool  lefthand = false 
)
static
void NBNode::setCrossingTLIndices ( unsigned int  startIndex)

set tl indices of this nodes crossing starting at the given index

Definition at line 2339 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 1539 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 1532 of file NBNode.cpp.

References myHaveCustomPoly, and myPoly.

Referenced by NIImporter_SUMO::addJunction(), and NIXMLNodesHandler::processNodeType().

void Named::setID ( const std::string &  newID)
inlineinherited

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void NBNode::setKeepClear ( bool  keepClear)
inline

set the keepClear flag

Definition at line 521 of file NBNode.h.

References myKeepClear.

Referenced by NIXMLNodesHandler::processNodeType().

void NBNode::setPriorityJunctionPriorities ( )
private

sets the priorites in case of a priority junction

void NBNode::setRadius ( SUMOReal  radius)
inline

set the turning radius

Definition at line 516 of file NBNode.h.

References myRadius.

Referenced by NIImporter_SUMO::addJunction(), and NIXMLNodesHandler::processNodeType().

void NBNode::setRoundabout ( )

update the type of this node as a roundabout

Definition at line 2297 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 367 of file NBNode.cpp.

References myTrafficLights.

Referenced by NBEdge::addRestrictedLane().

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 711 of file NBNode.cpp.

References Named::myID, myRequest, and NBRequest::writeLogic().

Referenced by NWWriter_SUMO::writeJunction().

Friends And Related Function Documentation

friend class GNEJunction
friend

Definition at line 77 of file NBNode.h.

friend class NBEdgePriorityComputer
friend

Definition at line 80 of file NBNode.h.

friend class NBNodeCont
friend

Definition at line 76 of file NBNode.h.

friend class NBNodesEdgesSorter
friend

Definition at line 78 of file NBNode.h.

friend class NBNodeShapeComputer
friend

Definition at line 536 of file NBNode.h.

friend class NBNodeTypeComputer
friend

Definition at line 79 of file NBNode.h.

Field Documentation

const int NBNode::BACKWARD
static

Definition at line 185 of file NBNode.h.

Referenced by buildCrossings(), and NBEdge::getFirstNonPedestrianLaneIndex().

const SUMOReal NBNode::DEFAULT_CROSSING_WIDTH
static

default width of pedetrian crossings

Definition at line 187 of file NBNode.h.

Referenced by NIXMLConnectionsHandler::addCrossing(), checkCrossing(), and NWWriter_XML::writeEdgesAndConnections().

const SUMOReal NBNode::DEFAULT_RADIUS = 1.5
static

the default turning radius at intersections in m

Definition at line 190 of file NBNode.h.

Referenced by NBNodeShapeComputer::computeNodeShapeDefault().

const int NBNode::FORWARD
static

edge directions (for pedestrian related stuff)

Definition at line 184 of file NBNode.h.

Referenced by buildCrossings(), computeLanes2Lanes(), and NBEdge::getFirstNonPedestrianLaneIndex().

const int NBNode::MAX_CONNECTIONS
static

maximum number of connections allowed

Definition at line 197 of file NBNode.h.

Referenced by computeLogic().

NBConnectionProhibits NBNode::myBlockedConnections
private

The container for connection block dependencies

Definition at line 758 of file NBNode.h.

Referenced by addSortedLinkFoes(), computeLogic(), getProhibitions(), remapRemoved(), and replaceInConnectionProhibitions().

int NBNode::myCrossingsLoadedFromSumoNet
private

number of crossings loaded from a sumo net

Definition at line 785 of file NBNode.h.

Referenced by addCrossing(), and numCrossingsFromSumoNet().

CustomShapeMap NBNode::myCustomLaneShapes
private
bool NBNode::myDiscardAllCrossings
private

whether to discard all pedestrian crossings

Definition at line 782 of file NBNode.h.

Referenced by buildCrossings(), discardAllCrossings(), and guessCrossings().

NBDistrict* NBNode::myDistrict
private

The district the node is the centre of.

Definition at line 761 of file NBNode.h.

Referenced by replaceIncoming(), and replaceOutgoing().

bool NBNode::myHaveCustomPoly
private

whether this nodes shape was set by the user

Definition at line 767 of file NBNode.h.

Referenced by computeNodeShape(), hasCustomShape(), and setCustomShape().

bool NBNode::myKeepClear
private

whether the junction area must be kept clear

Definition at line 777 of file NBNode.h.

Referenced by getKeepClear(), and setKeepClear().

PositionVector NBNode::myPoly
private

the (outer) shape of the junction

Definition at line 764 of file NBNode.h.

Referenced by computeNodeShape(), getCenter(), getShape(), mirrorX(), reshiftPosition(), and setCustomShape().

Position NBNode::myPosition
private

The position the node lies at.

Definition at line 737 of file NBNode.h.

Referenced by computeNodeShape(), computeSmoothShape(), getCenter(), getEmptyDir(), getPosition(), mirrorX(), reinit(), and reshiftPosition().

SUMOReal NBNode::myRadius
private

the turning radius (for all corners) at this node in m.

Definition at line 774 of file NBNode.h.

Referenced by getRadius(), and setRadius().

NBRequest* NBNode::myRequest
private
std::vector<WalkingArea> NBNode::myWalkingAreas
private

Vector of walking areas.

Definition at line 752 of file NBNode.h.

Referenced by buildWalkingAreas(), and getWalkingAreas().

const SUMOReal NBNode::UNSPECIFIED_RADIUS = -1
static

unspecified lane width

Definition at line 193 of file NBNode.h.

Referenced by NBNodeShapeComputer::computeNodeShapeDefault(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().


The documentation for this class was generated from the following files: