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... | |
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 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 | 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. 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 (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. 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... | |
NBEdge * | getConnectionTo (NBNode *n) const |
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 |
SUMOReal | getMaxEdgeWidth () 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 |
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 toLane) const |
Returns the information whether the described flow must let any other flow pass. More... | |
NBNode (const std::string &id, const Position &position) | |
Constructor. More... | |
NBNode (const std::string &id, const Position &position, SumoXMLNodeType type) | |
Constructor. More... | |
NBNode (const std::string &id, const Position &position, NBDistrict *district) | |
Constructor. More... | |
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. 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 | setID (const std::string &newID) |
resets the id More... | |
bool | writeLogic (OutputDevice &into) const |
~NBNode () | |
Destructor. More... | |
Atomar getter methods | |
const Position & | getPosition () const |
Returns the position of this node. 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... | |
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... | |
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... | |
Protected Attributes | |
std::string | myID |
The name of the object. More... | |
Private Member Functions | |
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 |
NBDistrict * | myDistrict |
The district the node is the centre of. 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... | |
NBRequest * | myRequest |
std::set < NBTrafficLightDefinition * > | myTrafficLights |
SumoXMLNodeType | myType |
The type of the junction. More... | |
Friends | |
class | GNEJunction |
class | NBEdgePriorityComputer |
class | NBNodeCont |
class | NBNodesEdgesSorter |
class | NBNodeShapeComputer |
class | NBNodeTypeComputer |
Represents a single node (junction) during network building.
NBNode::NBNode | ( | const std::string & | id, |
const Position & | position | ||
) |
Constructor.
[in] | id | The id of the node |
[in] | position | The position of the node |
Definition at line 194 of file NBNode.cpp.
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 201 of file NBNode.cpp.
NBNode::NBNode | ( | const std::string & | id, |
const Position & | position, | ||
NBDistrict * | district | ||
) |
Constructor.
[in] | id | The id of the node |
[in] | position | The position of the node |
[in] | district | The district this district node represents |
Definition at line 209 of file NBNode.cpp.
NBNode::~NBNode | ( | ) |
|
private |
invalidated copy constructor
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(), NBEdge::reinitNodes(), 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(), and NBEdge::reinitNodes().
void NBNode::addSortedLinkFoes | ( | const NBConnection & | mayDrive, |
const NBConnection & | mustStop | ||
) |
Definition at line 903 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 114 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 256 of file NBNode.cpp.
References myTrafficLights, myType, and NODETYPE_TRAFFIC_LIGHT.
Referenced by NBTrafficLightDefinition::addNode(), NBLoadedTLDef::addToSignalGroup(), and NBTrafficLightDefinition::NBTrafficLightDefinition().
void NBNode::buildInnerEdges | ( | ) |
Definition at line 1391 of file NBNode.cpp.
References myIncomingEdges.
bool NBNode::checkIsRemovable | ( | ) | const |
Definition at line 1243 of file NBNode.cpp.
References myIncomingEdges, myOutgoingEdges, myTrafficLights, and NBContHelper::nextCCW().
Referenced by getEdgesToJoin(), and NBNodeCont::removeUnwishedNodes().
PositionVector NBNode::computeInternalLaneShape | ( | NBEdge * | fromE, |
int | fromL, | ||
NBEdge * | toE, | ||
int | toL, | ||
int | numPoints = 5 |
||
) | const |
Compute the shape for an internal lane.
[in] | fromE | The starting edge |
[in] | fromL | The index of the starting lane |
[in] | toE | The destination edge |
[in] | toL | The index of the destination lane |
[in] | numPoints | The number of geometry points for the internal lane |
Definition at line 386 of file NBNode.cpp.
References Position::almostSame(), PositionVector::appendWithCrossingPoint(), Line::atan2Angle(), bezier(), Position::distanceTo(), Line::extrapolateFirstBy(), Line::extrapolateSecondBy(), PositionVector::getBegin(), PositionVector::getBegLine(), PositionVector::getEnd(), PositionVector::getEndLine(), Named::getID(), NBEdge::getLaneShape(), NBEdge::getLaneStruct(), NBEdge::getNumLanes(), Line::getPositionAtDistance(), PositionVector::getSubpart(), NBEdge::getTurnDestination(), Line::intersects(), Line::intersectsAt(), Line::length(), PositionVector::length(), MAX2(), MIN2(), NBEdge::Lane::offset, Line::p1(), Line::p2(), PI, POSITION_EPS, PositionVector::push_back(), Line::rotateAtP1(), NBEdge::Lane::shape, PositionVector::size(), Line::sub(), Position::sub(), SUMOReal, toString(), WRITE_WARNING, Position::x(), and Position::y().
Referenced by NBEdge::buildInnerEdges().
void NBNode::computeLanes2Lanes | ( | ) |
computes the connections of lanes to edges
Definition at line 602 of file NBNode.cpp.
References NBEdge::addLane2LaneConnections(), Bresenham::compute(), NBEdge::getAngleAtNode(), GeomHelper::getCCWAngleDiff(), GeomHelper::getCWAngleDiff(), getEdgesThatApproach(), NBEdge::getNumLanes(), NBEdge::getTurnDestination(), NBEdge::L2L_COMPUTED, NBEdge::L2L_VALIDATED, NBEdge::LANES2EDGES, myIncomingEdges, myOutgoingEdges, NBEdge::setConnection(), and SUMOReal.
void NBNode::computeLogic | ( | const NBEdgeCont & | ec, |
OptionsCont & | oc | ||
) |
computes the node's type, logic and traffic light
Definition at line 539 of file NBNode.cpp.
References NBRequest::buildBitfieldLogic(), OptionsCont::getBool(), Named::getID(), NBRequest::getSizes(), isDistrict(), OptionsCont::isInStringVector(), NBEdgeCont::isLeftHanded(), isNearDistrict(), myAllEdges, myBlockedConnections, myIncomingEdges, myOutgoingEdges, myRequest, myType, NODETYPE_DEAD_END, NODETYPE_DISTRICT, NODETYPE_NOJUNCTION, and WRITE_WARNING.
void NBNode::computeNodeShape | ( | bool | leftHand | ) |
Definition at line 588 of file NBNode.cpp.
References NBNodeShapeComputer::compute(), Named::getID(), myIncomingEdges, myOutgoingEdges, myPoly, and WRITE_WARNING.
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 1089 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 1079 of file NBNode.cpp.
References NBRequest::forbids(), and myRequest.
Referenced by NBEdge::buildInnerEdges(), and NBTrafficLightDefinition::forbids().
Definition at line 1343 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NBEdgeCont::guessRoundabouts(), 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 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.
[in] | incoming | The edge the stream starts at |
[in] | outgoing | The edge the stream ends at |
Definition at line 1177 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().
|
inline |
Returns all edges which participate in this node.
Definition at line 189 of file NBNode.h.
References myAllEdges.
Referenced by NBNodeCont::generateNodeClusters(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), and NBEdgeCont::guessRoundabouts().
|
private |
returns a list of edges which are connected to the given outgoing edge
Definition at line 707 of file NBNode.cpp.
References myAllEdges, and NBContHelper::nextCW().
Referenced by computeLanes2Lanes().
Definition at line 1300 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 972 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 Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), computeInternalLaneShape(), NBEdge::computeLaneShapes(), computeLogic(), computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), 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(), MSVehicle::moveChecked(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), 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(), MSDevice_Person::notifyLeave(), RORouteHandler::openRoute(), 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()(), MSEdge::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(), RORDLoader_SUMOBase::parseRoute(), NBLoadedTLDef::SignalGroup::patchTYellow(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSEmissionExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Returns this node's incoming edges.
Definition at line 173 of file NBNode.h.
References myIncomingEdges.
Referenced by NBEdge::buildInnerEdges(), NBRampsComputer::buildOffRamp(), NBNodeShapeComputer::compute(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::decLaneNo(), NIImporter_VISUM::getNamedEdgeContinuating(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), NBEdgeCont::guessRoundabouts(), NBNodeCont::guessTLs(), NBEdge::incLaneNo(), isNearDistrict(), NBNodeCont::joinJunctions(), 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(), and NWWriter_OpenDrive::writeNetwork().
LinkState NBNode::getLinkState | ( | const NBEdge * | incoming, |
NBEdge * | outgoing, | ||
int | fromLane, | ||
bool | mayDefinitelyPass, | ||
const std::string & | tlID | ||
) | const |
Definition at line 1223 of file NBNode.cpp.
References NBEdge::isInnerEdge(), LINKSTATE_EQUAL, LINKSTATE_MAJOR, LINKSTATE_MINOR, LINKSTATE_TL_OFF_BLINKING, LINKSTATE_TL_OFF_NOSIGNAL, mustBrake(), myType, and NODETYPE_RIGHT_BEFORE_LEFT.
Referenced by NWWriter_SUMO::writeConnection().
SUMOReal NBNode::getMaxEdgeWidth | ( | ) | const |
Definition at line 1330 of file NBNode.cpp.
References myAllEdges, and SUMOReal.
Definition at line 885 of file NBNode.cpp.
References NBEdge::getToNode(), and myIncomingEdges.
Referenced by NBEdge::buildInnerEdges(), and NBNodeTypeComputer::computeNodeTypes().
|
inline |
Returns this node's outgoing edges.
Definition at line 181 of file NBNode.h.
References myOutgoingEdges.
Referenced by NBRampsComputer::buildOnRamp(), NBNodeShapeComputer::compute(), NBEdge::computeEdge2Edges(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::decLaneNo(), NBEdge::getConnectedSorted(), NIImporter_VISUM::getEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NBRampsComputer::getOffRampEdges(), NBRampsComputer::getOnRampEdges(), 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 165 of file NBNode.h.
References myPosition.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLNodesHandler::addNode(), NIVissimEdge::buildNBEdge(), NBNodeShapeComputer::computeNodeShapeByCrosses(), NBHelpers::distance(), getEmptyDir(), NWWriter_DlrNavteq::getGraphLength(), NBEdge::hasDefaultGeometryEndpoints(), NBEdge::init(), NIVissimEdge::remapOneOfNodes(), NIImporter_DlrNavteq::EdgesHandler::report(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NBNodeCont::retrieve(), NBEdgeCont::splitAt(), NBEdge::splitGeometry(), NWWriter_SUMO::writeJunction(), NWWriter_XML::writeNodes(), and NWWriter_DlrNavteq::writeNodesUnsplitted().
NBEdge * NBNode::getPossiblySplittedIncoming | ( | const std::string & | edgeid | ) |
Definition at line 920 of file NBNode.cpp.
References Named::getID(), and myIncomingEdges.
Referenced by NIVissimDisturbance::getConnection().
NBEdge * NBNode::getPossiblySplittedOutgoing | ( | const std::string & | edgeid | ) |
Definition at line 933 of file NBNode.cpp.
References Named::getID(), and myOutgoingEdges.
Referenced by NIVissimDisturbance::getConnection().
|
inline |
Definition at line 434 of file NBNode.h.
References myBlockedConnections.
const PositionVector & NBNode::getShape | ( | ) | const |
Definition at line 1324 of file NBNode.cpp.
References myPoly.
Referenced by NBEdge::startShapeAt(), and NWWriter_SUMO::writeJunction().
|
inline |
Returns the type of this node.
Definition at line 198 of file NBNode.h.
References myType.
Referenced by NIXMLNodesHandler::addNode(), NBEdgeCont::generateStreetSigns(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NBRequest::setBlocking(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
Returns whether the given edge ends at this node.
[in] | e | The edge |
Definition at line 873 of file NBNode.cpp.
References myIncomingEdges.
Referenced by NIImporter_OpenDrive::addE2EConnectionsSecure(), NBNodeShapeComputer::computeContinuationNodeShape(), NBNodeShapeComputer::computeUniqueDirectionList(), NBNodeCont::generateNodeClusters(), NIImporter_OpenDrive::getIncomingDirectionalEdge(), 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 879 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().
void NBNode::invalidateIncomingConnections | ( | ) |
Definition at line 1000 of file NBNode.cpp.
References myIncomingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
void NBNode::invalidateOutgoingConnections | ( | ) |
Definition at line 1008 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
bool NBNode::isDistrict | ( | ) | const |
Definition at line 1385 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 279 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 1060 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::isNearDistrict | ( | ) | const |
Definition at line 1354 of file NBNode.cpp.
References NBEdge::getFromNode(), getIncomingEdges(), getOutgoingEdges(), NBEdge::getToNode(), and isDistrict().
Referenced by computeLogic(), and NBNodeCont::guessTLs().
|
private |
Definition at line 357 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 224 of file NBNode.h.
References myTrafficLights.
Referenced by NBEdge::appendTurnaround(), NBNodeCont::guessTLs(), isJoinedTLSControlled(), and NWWriter_XML::writeNodes().
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] | toLane | The lane the connection ends at |
Definition at line 1016 of file NBNode.cpp.
References NBEdge::getSpeed(), NBRequest::mustBrake(), myIncomingEdges, myRequest, and myTrafficLights.
Referenced by getLinkState(), NBTrafficLightDefinition::mustBrake(), and needsCont().
bool NBNode::needsCont | ( | NBEdge * | fromE, |
NBEdge * | toE, | ||
NBEdge * | otherFromE, | ||
NBEdge * | otherToE, | ||
const NBEdge::Connection & | c | ||
) | const |
Definition at line 510 of file NBNode.cpp.
References foes(), getDirection(), NBEdge::getJunctionPriority(), LINKDIR_LEFT, LINKDIR_TURN, mustBrake(), myType, NODETYPE_RIGHT_BEFORE_LEFT, NBEdge::Connection::tlID, and NBEdge::Connection::toLane.
Referenced by NBEdge::buildInnerEdges().
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 222 of file NBNode.cpp.
References myIncomingEdges, myOutgoingEdges, myPosition, myType, NODETYPE_TRAFFIC_LIGHT, and removeTrafficLights().
Referenced by NIXMLNodesHandler::addNode(), and NIImporter_DlrNavteq::TrafficlightsHandler::report().
|
private |
Definition at line 1096 of file NBNode.cpp.
References NBConnection::getFrom(), NBConnection::getTo(), myBlockedConnections, and NBTrafficLightLogicCont::remapRemoved().
Referenced by removeSelfLoops().
void NBNode::removeDoubleEdges | ( | ) |
Definition at line 834 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 946 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 294 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 263 of file NBNode.cpp.
References myTrafficLights, and NBTrafficLightDefinition::removeNode().
Referenced by removeTrafficLights().
void NBNode::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().
Replaces occurences of the first edge within the list of incoming by the second Connections are remapped, too.
Definition at line 766 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 780 of file NBNode.cpp.
References myDistrict, removeDoubleEdges(), NBDistrict::replaceIncoming(), and replaceIncoming().
|
private |
Definition at line 799 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 730 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 748 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 248 of file NBNode.cpp.
References Position::add(), PositionVector::add(), myPoly, and myPosition.
|
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
bool NBNode::writeLogic | ( | OutputDevice & | into | ) | 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().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Vector of incoming and outgoing edges.
Definition at line 487 of file NBNode.h.
Referenced by addIncomingEdge(), addOutgoingEdge(), NBNodeShapeComputer::compute(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdgePriorityComputer::computeEdgePriorities(), computeLogic(), NBNodeShapeComputer::computeNodeShapeByCrosses(), NBNodeShapeComputer::computeUniqueDirectionList(), getDirection(), getEdges(), getEdgesThatApproach(), getMaxEdgeWidth(), isLeftMover(), NBNodeShapeComputer::joinSameDirectionEdges(), removeDoubleEdges(), removeEdge(), replaceIncoming(), replaceOutgoing(), and NBNodesEdgesSorter::sortNodesEdges().
|
private |
The container for connection block dependencies
Definition at line 493 of file NBNode.h.
Referenced by addSortedLinkFoes(), computeLogic(), getProhibitions(), remapRemoved(), and replaceInConnectionProhibitions().
|
private |
The district the node is the centre of.
Definition at line 496 of file NBNode.h.
Referenced by replaceIncoming(), and replaceOutgoing().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by NLDetectorBuilder::addE3Entry(), NLDetectorBuilder::addE3Exit(), NBEdge::computeEdgeShape(), Named::getID(), NBEdge::getLaneID(), NBEdge::init(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), MSXMLRawOut::writeLane(), writeLogic(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
private |
Vector of incoming edges.
Definition at line 481 of file NBNode.h.
Referenced by addIncomingEdge(), buildInnerEdges(), checkIsRemovable(), NBEdgePriorityComputer::computeEdgePriorities(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), NBNodeTypeComputer::computeNodeTypes(), getEdgesToJoin(), getEmptyDir(), getIncomingEdges(), getOppositeIncoming(), getPossiblySplittedIncoming(), hasIncoming(), invalidateIncomingConnections(), isLeftMover(), isSimpleContinuation(), mustBrake(), reinit(), removeDoubleEdges(), removeEdge(), removeSelfLoops(), replaceIncoming(), replaceOutgoing(), and NBEdgePriorityComputer::setPriorityJunctionPriorities().
|
private |
Vector of outgoing edges.
Definition at line 484 of file NBNode.h.
Referenced by addOutgoingEdge(), checkIsRemovable(), NBEdgePriorityComputer::computeEdgePriorities(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), 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 499 of file NBNode.h.
Referenced by computeNodeShape(), getShape(), and reshiftPosition().
|
private |
The position the node lies at.
Definition at line 478 of file NBNode.h.
Referenced by getEmptyDir(), getPosition(), reinit(), and reshiftPosition().
|
private |
Definition at line 501 of file NBNode.h.
Referenced by computeLogic(), foes(), forbids(), mustBrake(), writeLogic(), and ~NBNode().
|
private |
Definition at line 503 of file NBNode.h.
Referenced by addTrafficLight(), checkIsRemovable(), getControllingTLS(), isJoinedTLSControlled(), isTLControlled(), mustBrake(), removeTrafficLight(), and removeTrafficLights().
|
private |
The type of the junction.
Definition at line 490 of file NBNode.h.
Referenced by addTrafficLight(), NBEdgePriorityComputer::computeEdgePriorities(), computeLogic(), NBNodeTypeComputer::computeNodeTypes(), getLinkState(), getType(), isDistrict(), needsCont(), and reinit().