SUMO - Simulation of Urban MObility
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...
class  nodes_by_id_sorter
 Used for sorting the cells by the begin time they describe. More...

Public Member Functions

void addIncomingEdge (NBEdge *edge)
 adds an incoming edge
void addOutgoingEdge (NBEdge *edge)
 adds an outgoing edge
void addSortedLinkFoes (const NBConnection &mayDrive, const NBConnection &mustStop)
void buildInnerEdges ()
bool checkIsRemovable () const
PositionVector computeInternalLaneShape (NBEdge *fromE, int fromL, NBEdge *toE, int toL, int numPoints=5) const
 Compute the shape for an internal lane.
void computeLanes2Lanes ()
 computes the connections of lanes to edges
void computeLogic (const NBEdgeCont &ec, OptionsCont &oc)
 computes the node's type, logic and traffic light
void computeNodeShape (bool leftHand)
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.
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.
NBEdgegetConnectionTo (NBNode *n) const
LinkDirection getDirection (const NBEdge *const incoming, const NBEdge *const outgoing) const
 Returns the representation of the described stream's direction.
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.
const std::string & getID () const
 Returns the id.
SUMOReal getMaxEdgeWidth () const
NBEdgegetOppositeIncoming (NBEdge *e) const
NBEdgegetPossiblySplittedIncoming (const std::string &edgeid)
NBEdgegetPossiblySplittedOutgoing (const std::string &edgeid)
const NBConnectionProhibitsgetProhibitions ()
const PositionVectorgetShape () const
bool hasIncoming (const NBEdge *const e) const
 Returns whether the given edge ends at this node.
bool hasOutgoing (const NBEdge *const e) const
 Returns whether the given edge starts at this node.
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.
bool isNearDistrict () const
bool mustBrake (const NBEdge *const from, const NBEdge *const to, int toLane) const
 Returns the information whether the described flow must let any other flow pass.
 NBNode (const std::string &id, const Position &position)
 Constructor.
 NBNode (const std::string &id, const Position &position, SumoXMLNodeType type)
 Constructor.
 NBNode (const std::string &id, const Position &position, NBDistrict *district)
 Constructor.
bool needsCont (NBEdge *fromE, NBEdge *toE, NBEdge *otherFromE, NBEdge *otherToE, const NBEdge::Connection &c) const
void reinit (const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
 Resets initial values.
void removeDoubleEdges ()
void removeEdge (NBEdge *edge, bool removeFromConnections=true)
 Removes edge from this node and optionally removes connections as well.
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.
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.
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.
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.
void setID (const std::string &newID)
 resets the id
std::string stateCode (const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass) const
bool writeLogic (OutputDevice &into) const
 ~NBNode ()
 Destructor.
Atomar getter methods
const PositiongetPosition () const
 Returns the position of this node.
const EdgeVectorgetIncomingEdges () const
 Returns this node's incoming edges.
const EdgeVectorgetOutgoingEdges () const
 Returns this node's outgoing edges.
const EdgeVectorgetEdges () const
 Returns all edges which participate in this node.
SumoXMLNodeType getType () const
 Returns the type of this node.
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.
void removeTrafficLight (NBTrafficLightDefinition *tlDef)
 Removes the given traffic light from this node.
void removeTrafficLights ()
 Removes all references to traffic lights that control this tls.
bool isTLControlled () const
 Returns whether this node is controlled by any tls.
bool isJoinedTLSControlled () const
 Returns whether this node is controlled by a tls that spans over more than one node.
const std::set
< NBTrafficLightDefinition * > & 
getControllingTLS () const
 Returns the traffic lights that were assigned to this node.
Prunning the input
unsigned int removeSelfLoops (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc)
 Removes edges which are both incoming and outgoing into this node.
Applying offset
void reshiftPosition (SUMOReal xoff, SUMOReal yoff)
 Applies an offset to the node.

Protected Attributes

std::string myID
 The name of the object.

Private Member Functions

EdgeVectorgetEdgesThatApproach (NBEdge *currentOutgoing)
bool isSimpleContinuation () const
 NBNode (const NBNode &s)
 invalidated copy constructor
NBNodeoperator= (const NBNode &s)
 invalidated assignment operator
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

Private Attributes

EdgeVector myAllEdges
 Vector of incoming and outgoing edges.
NBConnectionProhibits myBlockedConnections
NBDistrictmyDistrict
 The district the node is the centre of.
EdgeVector myIncomingEdges
 Vector of incoming edges.
EdgeVector myOutgoingEdges
 Vector of outgoing edges.
PositionVector myPoly
 the (outer) shape of the junction
Position myPosition
 The position the node lies at.
NBRequestmyRequest
std::set
< NBTrafficLightDefinition * > 
myTrafficLights
SumoXMLNodeType myType
 The type of the junction.

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 74 of file NBNode.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
[in]idThe id of the node
[in]positionThe position of the node

Definition at line 194 of file NBNode.cpp.

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

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

Constructor.

Parameters:
[in]idThe id of the node
[in]positionThe position of the node
[in]districtThe district this district node represents

Definition at line 209 of file NBNode.cpp.

Destructor.

Definition at line 216 of file NBNode.cpp.

References myRequest.

NBNode::NBNode ( const NBNode s) [private]

invalidated copy constructor


Member Function Documentation

void NBNode::addIncomingEdge ( NBEdge edge)

adds an incoming edge

Definition at line 337 of file NBNode.cpp.

References myAllEdges, and myIncomingEdges.

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

void NBNode::addOutgoingEdge ( NBEdge edge)

adds an outgoing edge

Definition at line 347 of file NBNode.cpp.

References myAllEdges, and myOutgoingEdges.

Referenced by NBEdge::init().

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

References myTrafficLights, myType, and NODETYPE_TRAFFIC_LIGHT.

Referenced by NBTrafficLightDefinition::addNode(), NBLoadedTLDef::addToSignalGroup(), and NBTrafficLightDefinition::NBTrafficLightDefinition().

Definition at line 1357 of file NBNode.cpp.

References myIncomingEdges.

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

References NBRequest::forbids(), and myRequest.

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

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 238 of file NBNode.h.

References myTrafficLights.

Referenced by NIXMLNodesHandler::addNode(), NBNodeCont::guessTLs(), and NWWriter_XML::writeNodes().

LinkDirection NBNode::getDirection ( const NBEdge *const  incoming,
const NBEdge *const  outgoing 
) 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
Returns:
The direction of the stream

Definition at line 1147 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(), needsCont(), 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 189 of file NBNode.h.

References myAllEdges.

Referenced by NBNodeCont::generateNodeClusters(), and NBEdgeCont::guessRoundabouts().

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

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

Definition at line 680 of file NBNode.cpp.

References myAllEdges, and NBContHelper::nextCW().

Referenced by computeLanes2Lanes().

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

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

Definition at line 942 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 [inline, inherited]

Returns the id.

Returns:
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 61 of file Named.h.

References Named::myID.

Referenced by MSDetectorControl::add(), ShapeContainer::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), computeInternalLaneShape(), NBEdge::computeLaneShapes(), computeLogic(), computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), getPossiblySplittedIncoming(), getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_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(), NBLoadedTLDef::SignalGroup::patchTYellow(), RORouteDef_Complete::preComputeCurrentRoute(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), NWWriter_SUMO::prohibitionConnection(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), MSInductLoop::writeTypedXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

Definition at line 1296 of file NBNode.cpp.

References myAllEdges, and SUMOReal.

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

Definition at line 890 of file NBNode.cpp.

References Named::getID(), and myIncomingEdges.

Referenced by NIVissimDisturbance::getConnection().

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

Definition at line 903 of file NBNode.cpp.

References Named::getID(), and myOutgoingEdges.

Referenced by NIVissimDisturbance::getConnection().

Definition at line 433 of file NBNode.h.

References myBlockedConnections.

const PositionVector & NBNode::getShape ( ) const

Definition at line 1290 of file NBNode.cpp.

References myPoly.

Referenced by NBEdge::startShapeAt(), and NWWriter_SUMO::writeJunction().

SumoXMLNodeType NBNode::getType ( ) const [inline]

Returns the type of this node.

Returns:
The type of this node
See also:
SumoXMLNodeType

Definition at line 198 of file NBNode.h.

References myType.

Referenced by NIXMLNodesHandler::addNode(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NBRequest::setBlocking(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().

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

References myOutgoingEdges.

Referenced by NIImporter_OpenDrive::addE2EConnectionsSecure(), NBNodeShapeComputer::computeContinuationNodeShape(), NIImporter_OpenDrive::getOutgoingDirectionalEdge(), isLeftMover(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), and NIImporter_VISUM::parse_TurnsToSignalGroups().

Definition at line 1351 of file NBNode.cpp.

References myType, and NODETYPE_DISTRICT.

Referenced by computeLogic(), and isNearDistrict().

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 279 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 1030 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(), and NBTrafficLightDefinition::isLeftMover().

bool NBNode::isTLControlled ( ) const [inline]

Returns whether this node is controlled by any tls.

Returns:
Whether a traffic light was assigned to this node

Definition at line 224 of file NBNode.h.

References myTrafficLights.

Referenced by NBEdge::appendTurnaround(), NBNodeCont::guessTLs(), isJoinedTLSControlled(), and NWWriter_XML::writeNodes().

bool NBNode::mustBrake ( const NBEdge *const  from,
const NBEdge *const  to,
int  toLane 
) const

Returns the information whether the described flow must let any other flow pass.

Parameters:
[in]fromThe connection's start edge
[in]toThe connection's end edge
[in]toLaneThe lane the connection ends at
Returns:
Whether the described connection must brake (has higher priorised foes)

Definition at line 986 of file NBNode.cpp.

References NBEdge::getSpeed(), NBRequest::mustBrake(), myIncomingEdges, myRequest, and myTrafficLights.

Referenced by NBTrafficLightDefinition::mustBrake(), needsCont(), and stateCode().

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

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

Referenced by NIXMLNodesHandler::addNode(), and NIImporter_DlrNavteq::TrafficlightsHandler::report().

void NBNode::remapRemoved ( NBTrafficLightLogicCont tc,
NBEdge removed,
const EdgeVector incoming,
const EdgeVector outgoing 
) [private]
void NBNode::removeEdge ( NBEdge edge,
bool  removeFromConnections = true 
)

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

Definition at line 916 of file NBNode.cpp.

References myAllEdges, myIncomingEdges, and myOutgoingEdges.

Referenced by NBEdgeCont::extract(), NBEdgeCont::insert(), NBEdge::reinit(), NBEdgeCont::removeUnwishedEdges(), and NBEdge::splitGeometry().

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

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

Removes the given traffic light from this node.

Definition at line 263 of file NBNode.cpp.

References myTrafficLights, and NBTrafficLightDefinition::removeNode().

Referenced by removeTrafficLights().

Removes all references to traffic lights that control this tls.

Definition at line 270 of file NBNode.cpp.

References myTrafficLights, and removeTrafficLight().

Referenced by NIXMLNodesHandler::addNode(), NBNodeCont::extract(), NBNodeCont::guessTLs(), 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 739 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 753 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 703 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 721 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 248 of file NBNode.cpp.

References Position::add(), PositionVector::add(), myPoly, and myPosition.

void Named::setID ( const std::string &  newID) [inline, inherited]

resets the id

Definition at line 67 of file Named.h.

References Named::myID.

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

sets the priorites in case of a priority junction

std::string NBNode::stateCode ( const NBEdge incoming,
NBEdge outgoing,
int  fromLane,
bool  mayDefinitelyPass 
) const

writes the XML-representation of the logic as a bitset-logic XML representation

Definition at line 578 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 76 of file NBNode.h.

friend class NBEdgePriorityComputer [friend]

Definition at line 79 of file NBNode.h.

friend class NBNodeCont [friend]

Definition at line 75 of file NBNode.h.

friend class NBNodesEdgesSorter [friend]

Definition at line 77 of file NBNode.h.

friend class NBNodeShapeComputer [friend]

Definition at line 396 of file NBNode.h.

friend class NBNodeTypeComputer [friend]

Definition at line 78 of file NBNode.h.


Field Documentation

The container for connection block dependencies

Definition at line 492 of file NBNode.h.

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

The district the node is the centre of.

Definition at line 495 of file NBNode.h.

Referenced by replaceIncoming(), and replaceOutgoing().

the (outer) shape of the junction

Definition at line 498 of file NBNode.h.

Referenced by computeNodeShape(), getShape(), and reshiftPosition().

The position the node lies at.

Definition at line 477 of file NBNode.h.

Referenced by getEmptyDir(), getPosition(), reinit(), and reshiftPosition().

Definition at line 500 of file NBNode.h.

Referenced by computeLogic(), foes(), forbids(), mustBrake(), writeLogic(), and ~NBNode().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines