|
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 | |
| 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) |
| void | computePriorities () |
| void | computeType (const NBTypeCont &tc) |
| bool | foes (const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const throw () |
| 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 throw () |
| Returns the information whether "prohibited" flow must let "prohibitor" flow pass. | |
| NBEdge * | getConnectionTo (NBNode *n) const |
| LinkDirection | getDirection (const NBEdge *const incoming, const NBEdge *const outgoing) const throw () |
| 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 |
| 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 throw () |
| Returns whether the given edge ends at this node. | |
| bool | hasOutgoing (const NBEdge *const e) const throw () |
| 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 throw () |
| 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 throw () |
| Returns the information whether the described flow must let any other flow pass. | |
| NBNode (const std::string &id, const Position &position, SumoXMLNodeType type) throw () | |
| Constructor. | |
| NBNode (const std::string &id, const Position &position, NBDistrict *district) throw () | |
| Constructor. | |
| NBNode (const std::string &id, const Position &position) throw () | |
| 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 (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 | 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 | 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 | 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 | setID (const std::string &newID) |
| resets the id | |
| void | sortNodesEdges (bool leftHand) |
| std::string | stateCode (const NBEdge *incoming, NBEdge *outgoing, int fromLane, bool mayDefinitelyPass) const throw () |
| bool | writeLogic (OutputDevice &into) const |
| ~NBNode () throw () | |
| Destructor. | |
Atomar getter methods | |
| const Position & | getPosition () const throw () |
| Returns the position of this node. | |
| const EdgeVector & | getIncomingEdges () const throw () |
| Returns this node's incoming edges. | |
| const EdgeVector & | getOutgoingEdges () const throw () |
| Returns this node's outgoing edges. | |
| const EdgeVector & | getEdges () const throw () |
| Returns all edges which participate in this node. | |
| SumoXMLNodeType | getType () const throw () |
| Returns the type of this node. | |
Methods for dealing with assigned traffic lights | |
| void | addTrafficLight (NBTrafficLightDefinition *tlDef) throw () |
| Adds a traffic light to the list of traffic lights that control this node. | |
| void | removeTrafficLight (NBTrafficLightDefinition *tlDef) throw () |
| Removes the given traffic light from this node. | |
| void | removeTrafficLights () throw () |
| Removes all references to traffic lights that control this tls. | |
| bool | isTLControlled () const throw () |
| Returns whether this node is controlled by any tls. | |
| bool | isJoinedTLSControlled () const throw () |
| Returns whether this node is controlled by a tls that spans over more than one node. | |
| const std::set < NBTrafficLightDefinition * > & | getControllingTLS () const throw () |
| Returns the traffic lights that were assigned to this node. | |
Prunning the input | |
| unsigned int | removeDummyEdges (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 | |
| NBEdge * | extractAndMarkFirst (EdgeVector &s) |
| EdgeVector * | getEdgesThatApproach (NBEdge *currentOutgoing) |
| bool | isSimpleContinuation () const |
| NBNode (const NBNode &s) | |
| invalidated copy constructor | |
| NBNode & | operator= (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 | |
| bool | swapWhenReversed (bool leftHand, const EdgeVector::iterator &i1, const EdgeVector::iterator &i2) |
Private Attributes | |
| EdgeVector | myAllEdges |
| Vector of incoming and outgoing edges. | |
| NBConnectionProhibits | myBlockedConnections |
| NBDistrict * | myDistrict |
| 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. | |
| NBRequest * | myRequest |
| std::set < NBTrafficLightDefinition * > | myTrafficLights |
| SumoXMLNodeType | myType |
| The type of the junction. | |
Friends | |
| class | GNEJunction |
| class | NBNodeCont |
| class | NBNodeShapeComputer |
Represents a single node (junction) during network building.
| NBNode::NBNode | ( | const std::string & | id, |
| const Position & | position | ||
| ) | throw () |
Constructor.
| [in] | id | The id of the node |
| [in] | position | The position of the node |
Definition at line 190 of file NBNode.cpp.
| NBNode::NBNode | ( | const std::string & | id, |
| const Position & | position, | ||
| SumoXMLNodeType | type | ||
| ) | throw () |
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 197 of file NBNode.cpp.
| NBNode::NBNode | ( | const std::string & | id, |
| const Position & | position, | ||
| NBDistrict * | district | ||
| ) | throw () |
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 205 of file NBNode.cpp.
| NBNode::~NBNode | ( | ) | throw () |
| NBNode::NBNode | ( | const NBNode & | s | ) | [private] |
invalidated copy constructor
| void NBNode::addIncomingEdge | ( | NBEdge * | edge | ) |
adds an incoming edge
Definition at line 333 of file NBNode.cpp.
References myAllEdges, and myIncomingEdges.
Referenced by NBEdge::splitGeometry().
| void NBNode::addOutgoingEdge | ( | NBEdge * | edge | ) |
adds an outgoing edge
Definition at line 343 of file NBNode.cpp.
References myAllEdges, and myOutgoingEdges.
| void NBNode::addSortedLinkFoes | ( | const NBConnection & | mayDrive, |
| const NBConnection & | mustStop | ||
| ) |
Definition at line 1096 of file NBNode.cpp.
References NBConnection::getFrom(), NBConnection::getTo(), myBlockedConnections, and WRITE_WARNING.
Referenced by NIImporter_SUMO::_loadNetwork(), NIVissimDisturbance::addToNode(), and NIXMLConnectionsHandler::myStartElement().
| void NBNode::addTrafficLight | ( | NBTrafficLightDefinition * | tlDef | ) | throw () |
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 252 of file NBNode.cpp.
References myTrafficLights, myType, and NODETYPE_TRAFFIC_LIGHT.
Referenced by NBTrafficLightDefinition::addNode(), and NBLoadedTLDef::addToSignalGroup().
| void NBNode::buildInnerEdges | ( | ) |
Definition at line 1580 of file NBNode.cpp.
References myIncomingEdges.
| bool NBNode::checkIsRemovable | ( | ) | const |
Definition at line 1432 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 590 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(), PositionVector::length(), Line::length(), MAX2(), MIN2(), NBEdge::Lane::offset, Line::p1(), Line::p2(), PI, POSITION_EPS, PositionVector::push_back(), Line::rotateAtP1(), NBEdge::Lane::shape, PositionVector::size(), Position::sub(), Line::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 825 of file NBNode.cpp.
References NBEdge::addLane2LaneConnections(), Bresenham::compute(), NBEdge::getAngle(), 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 743 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 811 of file NBNode.cpp.
References NBNodeShapeComputer::compute(), Named::getID(), myIncomingEdges, myOutgoingEdges, myPoly, and WRITE_WARNING.
| void NBNode::computePriorities | ( | ) |
computes the priorities of participating edges within this junction
Definition at line 373 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, myOutgoingEdges, myType, NODETYPE_RIGHT_BEFORE_LEFT, and setPriorityJunctionPriorities().
| void NBNode::computeType | ( | const NBTypeCont & | tc | ) |
computes the junction type
Definition at line 395 of file NBNode.cpp.
References NBTypeCont::getJunctionType(), getOppositeIncoming(), isSimpleContinuation(), myIncomingEdges, myType, NODETYPE_NOJUNCTION, NODETYPE_PRIORITY_JUNCTION, NODETYPE_RIGHT_BEFORE_LEFT, and NODETYPE_UNKNOWN.
| NBEdge * NBNode::extractAndMarkFirst | ( | EdgeVector & | s | ) | [private] |
removes the first edge from the list, marks it as higher priorised and returns it
Definition at line 578 of file NBNode.cpp.
References NBEdge::setJunctionPriority().
Referenced by setPriorityJunctionPriorities().
| bool NBNode::foes | ( | const NBEdge *const | from1, |
| const NBEdge *const | to1, | ||
| const NBEdge *const | from2, | ||
| const NBEdge *const | to2 | ||
| ) | const throw () |
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 1282 of file NBNode.cpp.
References NBRequest::foes(), and myRequest.
Referenced by 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 throw () |
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 1272 of file NBNode.cpp.
References NBRequest::forbids(), and myRequest.
Referenced by NBTrafficLightDefinition::forbids().
Definition at line 1532 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NBEdgeCont::guessRoundabouts(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Turns(), and NGNet::toNB().
| const std::set<NBTrafficLightDefinition*>& NBNode::getControllingTLS | ( | ) | const throw () [inline] |
Returns the traffic lights that were assigned to this node.
Definition at line 231 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 throw () |
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 1370 of file NBNode.cpp.
References abs, 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(), NBEdge::MainDirections::MainDirections(), needsCont(), and NWWriter_SUMO::writeConnection().
| const EdgeVector& NBNode::getEdges | ( | ) | const throw () [inline] |
Returns all edges which participate in this node.
Definition at line 182 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 903 of file NBNode.cpp.
References myAllEdges, and NBContHelper::nextCW().
Referenced by computeLanes2Lanes().
Definition at line 1489 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 1165 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.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 59 of file Named.h.
References Named::myID.
Referenced by RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NLHandler::addConnection(), NBLoadedSUMOTLDef::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), NIImporter_SUMO::addPhase(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), RORouteDef_Complete::buildCurrentRoute(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), computeInternalLaneShape(), NBEdge::computeLaneShapes(), computeLogic(), computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSVTypeProbe::execute(), Command_SaveTLSSwitches::execute(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), getPossiblySplittedIncoming(), getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSUnboundActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NIImporter_SUMO::initTrafficLightLogic(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), Named::ComparatorIdLess::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(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), NWWriter_SUMO::prohibitionConnection(), NBNodeCont::remapEdge(), NBLoadedSUMOTLDef::removeConnection(), removeDummyEdges(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBConnection::replaceFrom(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NBOwnTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), 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(), and MSRouteProbe::writeXMLOutput().
| const EdgeVector& NBNode::getIncomingEdges | ( | ) | const throw () [inline] |
Returns this node's incoming edges.
Definition at line 166 of file NBNode.h.
References myIncomingEdges.
Referenced by NBEdge::buildInnerEdges(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBNodeShapeComputer::compute(), NBEdge::decLaneNo(), NIImporter_VISUM::getNamedEdgeContinuating(), NBNodeCont::guessRamps(), NBEdgeCont::guessRoundabouts(), NBNodeCont::guessTLs(), NBEdge::incLaneNo(), isNearDistrict(), NBNodeCont::joinJunctions(), NBNodeCont::mayNeedOffRamp(), NBNodeCont::mayNeedOnRamp(), NBNodeCont::merge(), NBContHelper::node_with_incoming_finder::operator()(), NIImporter_VISUM::parse_Lanes(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeUnwishedNodes(), NBEdgeCont::retrievePossiblySplitted(), NGNet::toNB(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), NWWriter_SUMO::writeJunction(), and NWWriter_OpenDrive::writeNetwork().
| SUMOReal NBNode::getMaxEdgeWidth | ( | ) | const |
Definition at line 1519 of file NBNode.cpp.
References myAllEdges, and SUMOReal.
Definition at line 1081 of file NBNode.cpp.
References NBEdge::getToNode(), and myIncomingEdges.
Referenced by NBEdge::buildInnerEdges(), and computeType().
| const EdgeVector& NBNode::getOutgoingEdges | ( | ) | const throw () [inline] |
Returns this node's outgoing edges.
Definition at line 174 of file NBNode.h.
References myOutgoingEdges.
Referenced by NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBNodeShapeComputer::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeTurningDirections(), NBEdge::decLaneNo(), NBEdge::getConnectedSorted(), NIImporter_VISUM::getNamedEdgeContinuating(), NBNodeCont::guessRamps(), isNearDistrict(), NBNodeCont::joinJunctions(), NBEdge::markAsInLane2LaneState(), NBNodeCont::mayNeedOffRamp(), NBNodeCont::mayNeedOnRamp(), NBNodeCont::merge(), NIXMLEdgesHandler::myEndElement(), NBContHelper::node_with_outgoing_finder::operator()(), NIImporter_VISUM::parse_Lanes(), NIXMLConnectionsHandler::parseLaneBound(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeUnwishedNodes(), and NBEdgeCont::retrievePossiblySplitted().
| const Position& NBNode::getPosition | ( | ) | const throw () [inline] |
Returns the position of this node.
Definition at line 158 of file NBNode.h.
References myPosition.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLNodesHandler::addNode(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBNodeShapeComputer::computeNodeShapeByCrosses(), NBHelpers::distance(), NBNodeCont::generateNodeClusters(), getEmptyDir(), NBEdge::hasDefaultGeometryEndpoints(), NIVissimEdge::remapOneOfNodes(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::EdgesHandler::report(), NBNodeCont::retrieve(), NBEdge::splitGeometry(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().
| NBEdge * NBNode::getPossiblySplittedIncoming | ( | const std::string & | edgeid | ) |
Definition at line 1113 of file NBNode.cpp.
References Named::getID(), and myIncomingEdges.
Referenced by NIVissimDisturbance::getConnection().
| NBEdge * NBNode::getPossiblySplittedOutgoing | ( | const std::string & | edgeid | ) |
Definition at line 1126 of file NBNode.cpp.
References Named::getID(), and myOutgoingEdges.
Referenced by NIVissimDisturbance::getConnection().
| const NBConnectionProhibits& NBNode::getProhibitions | ( | ) | [inline] |
Definition at line 436 of file NBNode.h.
References myBlockedConnections.
| const PositionVector & NBNode::getShape | ( | ) | const |
Definition at line 1513 of file NBNode.cpp.
References myPoly.
Referenced by NBEdge::computeEdgeShape(), and NWWriter_SUMO::writeJunction().
| SumoXMLNodeType NBNode::getType | ( | ) | const throw () [inline] |
Returns the type of this node.
Definition at line 191 of file NBNode.h.
References myType.
Referenced by NIXMLNodesHandler::addNode(), 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 1069 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 1075 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 1193 of file NBNode.cpp.
References myIncomingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
| void NBNode::invalidateOutgoingConnections | ( | ) |
Definition at line 1201 of file NBNode.cpp.
References myOutgoingEdges.
Referenced by NIVissimDistrictConnection::dict_BuildDistricts().
| bool NBNode::isDistrict | ( | ) | const |
Definition at line 1574 of file NBNode.cpp.
References myType, and NODETYPE_DISTRICT.
Referenced by computeLogic(), and isNearDistrict().
| bool NBNode::isJoinedTLSControlled | ( | ) | const throw () |
Returns whether this node is controlled by a tls that spans over more than one node.
Definition at line 275 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 1253 of file NBNode.cpp.
References GeomHelper::getCCWAngleDiff(), GeomHelper::getCWAngleDiff(), hasOutgoing(), myAllEdges, myIncomingEdges, myOutgoingEdges, NBContHelper::nextCW(), and SUMOReal.
Referenced by NBEdge::computeEdge2Edges(), and NBTrafficLightDefinition::isLeftMover().
| bool NBNode::isNearDistrict | ( | ) | const |
Definition at line 1543 of file NBNode.cpp.
References NBEdge::getFromNode(), getIncomingEdges(), getOutgoingEdges(), NBEdge::getToNode(), and isDistrict().
Referenced by computeLogic(), and NBNodeCont::guessTLs().
| bool NBNode::isSimpleContinuation | ( | ) | const [private] |
Definition at line 436 of file NBNode.cpp.
References NBEdge::getNumLanes(), myIncomingEdges, myOutgoingEdges, and NBContHelper::nextCW().
Referenced by NBNodeShapeComputer::compute(), and computeType().
| bool NBNode::isTLControlled | ( | ) | const throw () [inline] |
Returns whether this node is controlled by any tls.
Definition at line 217 of file NBNode.h.
References myTrafficLights.
Referenced by NBNodeCont::guessTLs(), isJoinedTLSControlled(), and NWWriter_XML::writeNodes().
| bool NBNode::mustBrake | ( | const NBEdge *const | from, |
| const NBEdge *const | to, | ||
| int | toLane | ||
| ) | const throw () |
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 1209 of file NBNode.cpp.
References NBRequest::mustBrake(), myIncomingEdges, myRequest, and myTrafficLights.
Referenced by NBTrafficLightDefinition::mustBrake(), and stateCode().
| bool NBNode::needsCont | ( | NBEdge * | fromE, |
| NBEdge * | toE, | ||
| NBEdge * | otherFromE, | ||
| NBEdge * | otherToE, | ||
| const NBEdge::Connection & | c | ||
| ) | const |
Definition at line 714 of file NBNode.cpp.
References foes(), getDirection(), NBEdge::getJunctionPriority(), LINKDIR_LEFT, LINKDIR_TURN, myType, NODETYPE_RIGHT_BEFORE_LEFT, and NBEdge::Connection::tlID.
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 218 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] |
Definition at line 1289 of file NBNode.cpp.
References NBConnection::getFrom(), NBConnection::getTo(), myBlockedConnections, and NBTrafficLightLogicCont::remapRemoved().
Referenced by removeDummyEdges().
| void NBNode::removeDoubleEdges | ( | ) |
Definition at line 1030 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and myOutgoingEdges.
Referenced by replaceIncoming(), and replaceOutgoing().
| unsigned int NBNode::removeDummyEdges | ( | 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 290 of file NBNode.cpp.
References NBEdgeCont::erase(), Named::getID(), NBEdge::isConnectedTo(), myIncomingEdges, myOutgoingEdges, NBEdge::remapConnections(), remapRemoved(), and WRITE_WARNING.
Removes edge from this node and optionally removes connections as well.
Definition at line 1139 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and myOutgoingEdges.
Referenced by NBEdgeCont::extract(), NBEdgeCont::removeUnwishedEdges(), and NBEdge::splitGeometry().
| void NBNode::removeTrafficLight | ( | NBTrafficLightDefinition * | tlDef | ) | throw () |
Removes the given traffic light from this node.
Definition at line 259 of file NBNode.cpp.
References myTrafficLights.
Referenced by removeTrafficLights().
| void NBNode::removeTrafficLights | ( | ) | throw () |
Removes all references to traffic lights that control this tls.
Definition at line 266 of file NBNode.cpp.
References myTrafficLights, and removeTrafficLight().
Referenced by NIXMLNodesHandler::addNode(), NBNodeCont::guessTLs(), and reinit().
| 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 976 of file NBNode.cpp.
References myDistrict, removeDoubleEdges(), NBDistrict::replaceIncoming(), and replaceIncoming().
Replaces occurences of the first edge within the list of incoming by the second Connections are remapped, too.
Definition at line 962 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, and replaceInConnectionProhibitions().
Referenced by NBEdgeCont::joinSameNodeConnectingEdges(), NBNodeCont::removeUnwishedNodes(), and replaceIncoming().
| void NBNode::replaceInConnectionProhibitions | ( | NBEdge * | which, |
| NBEdge * | by, | ||
| unsigned int | whichLaneOff, | ||
| unsigned int | byLaneOff | ||
| ) | [private] |
Definition at line 995 of file NBNode.cpp.
References myBlockedConnections, NBConnection::replaceFrom(), and NBConnection::replaceTo().
Referenced by replaceIncoming(), and replaceOutgoing().
| 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 944 of file NBNode.cpp.
References myDistrict, removeDoubleEdges(), NBDistrict::replaceOutgoing(), and replaceOutgoing().
Replaces occurences of the first edge within the list of outgoing by the second Connections are remapped, too.
Definition at line 926 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, myOutgoingEdges, replaceInConnectionProhibitions(), and NBEdge::replaceInConnections().
Referenced by NBEdgeCont::joinSameNodeConnectingEdges(), and replaceOutgoing().
| void NBNode::reshiftPosition | ( | SUMOReal | xoff, |
| SUMOReal | yoff | ||
| ) |
Applies an offset to the node.
| [in] | xoff | The x-offset to apply |
| [in] | yoff | The y-offset to apply |
Definition at line 244 of file NBNode.cpp.
References myPoly, myPosition, PositionVector::reshiftRotate(), and Position::reshiftRotate().
| void Named::setID | ( | const std::string & | newID | ) | [inline, inherited] |
| void NBNode::setPriorityJunctionPriorities | ( | ) | [private] |
sets the priorites in case of a priority junction
Definition at line 480 of file NBNode.cpp.
References extractAndMarkFirst(), NBEdge::getAngle(), GeomHelper::getMinAngleDiff(), myIncomingEdges, myOutgoingEdges, samePriority(), NBEdge::setJunctionPriority(), and SUMOReal.
Referenced by computePriorities().
| void NBNode::sortNodesEdges | ( | bool | leftHand | ) |
initialises the list of all edges and sorts all edges
Definition at line 792 of file NBNode.cpp.
References myAllEdges, myIncomingEdges, myOutgoingEdges, and swapWhenReversed().
| std::string NBNode::stateCode | ( | const NBEdge * | incoming, |
| NBEdge * | outgoing, | ||
| int | fromLane, | ||
| bool | mayDefinitelyPass | ||
| ) | const throw () |
Definition at line 1416 of file NBNode.cpp.
References LINKSTATE_EQUAL, LINKSTATE_MAJOR, LINKSTATE_MINOR, LINKSTATE_TL_OFF_NOSIGNAL, mustBrake(), myType, NODETYPE_RIGHT_BEFORE_LEFT, and toString().
Referenced by NWWriter_SUMO::writeConnection().
| bool NBNode::swapWhenReversed | ( | bool | leftHand, |
| const EdgeVector::iterator & | i1, | ||
| const EdgeVector::iterator & | i2 | ||
| ) | [private] |
used while fine sorting the incoming and outgoing edges, this method performs the swapping of two edges in the myAllEdges-list when the outgoing is in clockwise direction to the incoming
Definition at line 353 of file NBNode.cpp.
References NBEdge::getToNode(), and NBEdge::isTurningDirectionAt().
Referenced by sortNodesEdges().
| bool NBNode::writeLogic | ( | OutputDevice & | into | ) | const |
writes the XML-representation of the logic as a bitset-logic XML representation
Definition at line 782 of file NBNode.cpp.
References Named::myID, myRequest, and NBRequest::writeLogic().
Referenced by NWWriter_SUMO::writeJunction().
friend class NBNodeCont [friend] |
friend class NBNodeShapeComputer [friend] |
EdgeVector NBNode::myAllEdges [private] |
Vector of incoming and outgoing edges.
Definition at line 500 of file NBNode.h.
Referenced by addIncomingEdge(), addOutgoingEdge(), NBNodeShapeComputer::compute(), NBNodeShapeComputer::computeContinuationNodeShape(), computeLogic(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computePriorities(), NBNodeShapeComputer::computeUniqueDirectionList(), getDirection(), getEdges(), getEdgesThatApproach(), getMaxEdgeWidth(), isLeftMover(), NBNodeShapeComputer::joinSameDirectionEdges(), removeDoubleEdges(), removeEdge(), replaceIncoming(), replaceOutgoing(), and sortNodesEdges().
The container for connection block dependencies
Definition at line 506 of file NBNode.h.
Referenced by addSortedLinkFoes(), computeLogic(), getProhibitions(), remapRemoved(), and replaceInConnectionProhibitions().
NBDistrict* NBNode::myDistrict [private] |
The district the node is the centre of.
Definition at line 509 of file NBNode.h.
Referenced by replaceIncoming(), and replaceOutgoing().
std::string Named::myID [protected, inherited] |
The name of the object.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 81 of file Named.h.
Referenced by RORouteDef_OrigDest::buildCurrentRoute(), RORouteDef_Complete::buildCurrentRoute(), RORouteDef_Alternatives::buildCurrentRoute(), NBEdge::computeEdgeShape(), Named::getID(), NBEdge::getLaneID(), MSRoute::release(), Named::setID(), NBEdge::splitGeometry(), writeLogic(), and MSMeanData::writeXMLOutput().
EdgeVector NBNode::myIncomingEdges [private] |
Vector of incoming edges.
Definition at line 494 of file NBNode.h.
Referenced by addIncomingEdge(), buildInnerEdges(), checkIsRemovable(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), computePriorities(), computeType(), getEdgesToJoin(), getEmptyDir(), getIncomingEdges(), getOppositeIncoming(), getPossiblySplittedIncoming(), hasIncoming(), invalidateIncomingConnections(), isLeftMover(), isSimpleContinuation(), mustBrake(), reinit(), removeDoubleEdges(), removeDummyEdges(), removeEdge(), replaceIncoming(), replaceOutgoing(), setPriorityJunctionPriorities(), and sortNodesEdges().
EdgeVector NBNode::myOutgoingEdges [private] |
Vector of outgoing edges.
Definition at line 497 of file NBNode.h.
Referenced by addOutgoingEdge(), checkIsRemovable(), computeLanes2Lanes(), computeLogic(), computeNodeShape(), computePriorities(), getConnectionTo(), getEdgesToJoin(), getEmptyDir(), getOutgoingEdges(), getPossiblySplittedOutgoing(), hasOutgoing(), invalidateOutgoingConnections(), isLeftMover(), isSimpleContinuation(), reinit(), removeDoubleEdges(), removeDummyEdges(), removeEdge(), replaceOutgoing(), setPriorityJunctionPriorities(), and sortNodesEdges().
PositionVector NBNode::myPoly [private] |
the (outer) shape of the junction
Definition at line 512 of file NBNode.h.
Referenced by computeNodeShape(), getShape(), and reshiftPosition().
Position NBNode::myPosition [private] |
The position the node lies at.
Definition at line 491 of file NBNode.h.
Referenced by getEmptyDir(), getPosition(), reinit(), and reshiftPosition().
NBRequest* NBNode::myRequest [private] |
Definition at line 514 of file NBNode.h.
Referenced by computeLogic(), foes(), forbids(), mustBrake(), writeLogic(), and ~NBNode().
std::set<NBTrafficLightDefinition*> NBNode::myTrafficLights [private] |
Definition at line 516 of file NBNode.h.
Referenced by addTrafficLight(), checkIsRemovable(), getControllingTLS(), isJoinedTLSControlled(), isTLControlled(), mustBrake(), removeTrafficLight(), and removeTrafficLights().
SumoXMLNodeType NBNode::myType [private] |
The type of the junction.
Definition at line 503 of file NBNode.h.
Referenced by addTrafficLight(), computeLogic(), computePriorities(), computeType(), getType(), isDistrict(), needsCont(), reinit(), and stateCode().