SUMO - Simulation of Urban MObility
|
Container for nodes during the netbuilding process. More...
#include <NBNodeCont.h>
Public Member Functions | |
void | analyzeCluster (std::set< NBNode * > cluster, std::string &id, Position &pos, bool &hasTLS) |
void | clear () |
void | computeLanes2Lanes () |
divides the incoming lanes on outgoing lanes | |
void | computeLogics (const NBEdgeCont &ec, OptionsCont &oc) |
build the list of outgoing edges and lanes | |
void | computeNodeShapes (bool leftHand) |
std::vector< std::string > | getAllNames () const |
get all node names | |
std::string | getFreeID () |
const std::vector< std::set < std::string > > & | getJoinedClusters () const |
gets all joined clusters (see doc for myClusters2Join) | |
void | guessRamps (OptionsCont &oc, NBEdgeCont &ec, NBDistrictCont &dc) |
NBNodeCont () | |
Constructor. | |
void | printBuiltNodesStatistics () const |
Prints statistics about built nodes. | |
void | registerJoinedCluster (const std::set< NBNode * > &cluster) |
gets all joined clusters (see doc for myClusters2Join) | |
void | rename (NBNode *node, const std::string &newID) |
Renames the node. Throws exception if newID already exists. | |
unsigned int | size () const |
Returns the number of known nodes. | |
~NBNodeCont () | |
Destructor. | |
Insertion/removal/retrieval of nodes | |
bool | insert (const std::string &id, const Position &position, NBDistrict *district) |
Inserts a node into the map. | |
bool | insert (const std::string &id, const Position &position) |
Inserts a node into the map. | |
Position | insert (const std::string &id) |
Inserts a node into the map. | |
bool | insert (NBNode *node) |
Inserts a node into the map. | |
bool | erase (NBNode *node) |
Removes the given node, deleting it. | |
bool | extract (NBNode *node, bool remember=false) |
Removes the given node but does not delete it. | |
NBNode * | retrieve (const std::string &id) const |
Returns the node with the given name. | |
NBNode * | retrieve (const Position &position, SUMOReal offset=0.) const |
Returns the node with the given coordinates. | |
std::map< std::string, NBNode * > ::const_iterator | begin () const |
Returns the pointer to the begin of the stored nodes. | |
std::map< std::string, NBNode * > ::const_iterator | end () const |
Returns the pointer to the end of the stored nodes. | |
Methods for for joining nodes | |
void | addJoinExclusion (const std::vector< std::string > &ids, bool check=false) |
void | addCluster2Join (std::set< std::string > cluster) |
add ids of nodes which shall be joined into a single node | |
unsigned int | joinLoadedClusters (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins loaded junction clusters (see NIXMLNodesHandler) | |
unsigned int | joinJunctions (SUMOReal maxdist, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins junctions that are very close together. | |
Adapting the input | |
void | removeSelfLoops (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc) |
Removes self-loop edges (edges where the source and the destination node are the same) | |
void | joinSimilarEdges (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins edges connecting the same nodes. | |
void | removeIsolatedRoads (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tc) |
Removes sequences of edges that are not connected with a junction. Simple roads without junctions sometimes remain when converting from OpenStreetMake, but they make no sense. Remaining empty nodes are also deleted. | |
unsigned int | removeUnwishedNodes (NBDistrictCont &dc, NBEdgeCont &ec, NBJoinedEdgesMap &je, NBTrafficLightLogicCont &tlc, bool removeGeometryNodes) |
Removes "unwished" nodes. | |
Methods for guessing/computing traffic lights | |
void | guessTLs (OptionsCont &oc, NBTrafficLightLogicCont &tlc) |
Guesses which junctions or junction clusters shall be controlled by tls. | |
void | joinTLS (NBTrafficLightLogicCont &tlc) |
Builds clusters of tls-controlled junctions and joins the control if possible. | |
void | setAsTLControlled (NBNode *node, NBTrafficLightLogicCont &tlc, std::string id="") |
Sets the given node as being controlled by a tls. |
Private Types | |
typedef std::map< std::string, NBNode * > | NodeCont |
Definition of the map of names to nodes. |
Private Member Functions | |
void | buildOffRamp (OptionsCont &oc, NBNode *cur, NBEdgeCont &ec, NBDistrictCont &dc, EdgeVector &incremented) |
bool | buildOnRamp (OptionsCont &oc, NBNode *cur, NBEdgeCont &ec, NBDistrictCont &dc, EdgeVector &incremented) |
void | checkHighwayRampOrder (NBEdge *&pot_highway, NBEdge *&pot_ramp) |
bool | mayNeedOffRamp (OptionsCont &oc, NBNode *cur) const |
bool | mayNeedOnRamp (OptionsCont &oc, NBNode *cur) const |
NBNodeCont (const NBNodeCont &s) | |
invalidated copy constructor | |
NBNodeCont & | operator= (const NBNodeCont &s) |
invalidated assignment operator | |
Helper methods for guessing/computing traffic lights | |
bool | shouldBeTLSControlled (const std::set< NBNode * > &c) const |
Returns whethe the given node cluster should be controlled by a tls. |
Private Attributes | |
std::vector< std::set < std::string > > | myClusters2Join |
std::set< NBNode * > | myExtractedNodes |
The extracted nodes which are kept for reference. | |
int | myInternalID |
The running internal id. | |
std::set< std::string > | myJoined |
ids found in loaded join clusters used for error checking | |
std::vector< std::set < std::string > > | myJoinedClusters |
std::set< std::string > | myJoinExclusions |
NodeCont | myNodes |
The map of names to nodes. |
Helper methods for for joining nodes | |
typedef std::vector< std::set < NBNode * > > | NodeClusters |
Definition of a node cluster container. | |
void | generateNodeClusters (SUMOReal maxDist, NodeClusters &into) const |
Builds node clusters. | |
void | joinNodeClusters (NodeClusters clusters, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Container for nodes during the netbuilding process.
Definition at line 63 of file NBNodeCont.h.
|
private |
Definition of a node cluster container.
Definition at line 343 of file NBNodeCont.h.
|
private |
Definition of the map of names to nodes.
Definition at line 380 of file NBNodeCont.h.
NBNodeCont::NBNodeCont | ( | ) |
Constructor.
Definition at line 67 of file NBNodeCont.cpp.
NBNodeCont::~NBNodeCont | ( | ) |
|
private |
invalidated copy constructor
void NBNodeCont::addCluster2Join | ( | std::set< std::string > | cluster | ) |
add ids of nodes which shall be joined into a single node
[in] | cluster | The cluster to add |
Definition at line 448 of file NBNodeCont.cpp.
References myClusters2Join, myJoined, myJoinExclusions, and WRITE_WARNING.
Referenced by NIXMLNodesHandler::addJoinCluster().
void NBNodeCont::addJoinExclusion | ( | const std::vector< std::string > & | ids, |
bool | check = false |
||
) |
Definition at line 432 of file NBNodeCont.cpp.
References myJoined, myJoinExclusions, retrieve(), and WRITE_WARNING.
Referenced by NIXMLNodesHandler::addJoinExclusion(), and NBNetBuilder::compute().
void NBNodeCont::analyzeCluster | ( | std::set< NBNode * > | cluster, |
std::string & | id, | ||
Position & | pos, | ||
bool & | hasTLS | ||
) |
Definition at line 615 of file NBNodeCont.cpp.
References Position::add(), and Position::mul().
Referenced by joinNodeClusters().
|
inline |
Returns the pointer to the begin of the stored nodes.
Definition at line 141 of file NBNodeCont.h.
References myNodes.
Referenced by NBNetBuilder::compute(), NBEdgePriorityComputer::computeEdgePriorities(), NBNodeTypeComputer::computeNodeTypes(), NBTurningDirectionsComputer::computeTurnDirections(), removeUnwishedNodes(), NBNodesEdgesSorter::sortNodesEdges(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeNodes().
|
private |
Definition at line 1037 of file NBNodeCont.cpp.
References NBEdge::addLane2LaneConnections(), OptionsCont::getFloat(), NBEdge::getGeometry(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLaneSpreadFunction(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBNode::getPosition(), NBEdge::getSpeed(), NBEdge::getToNode(), NBEdge::incLaneNo(), insert(), NBEdge::invalidateConnections(), NBEdge::L2L_VALIDATED, LANESPREAD_CENTER, PositionVector::length(), MIN2(), PositionVector::move2side(), PositionVector::pop_front(), POSITION_EPS, PositionVector::positionAtLengthPosition(), PositionVector::push_front(), NBEdgeCont::retrieve(), NBEdge::setGeometry(), NBEdgeCont::splitAt(), SUMO_const_halfLaneAndOffset, SUMO_const_laneWidthAndOffset, SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by guessRamps().
|
private |
Definition at line 917 of file NBNodeCont.cpp.
References NBEdge::addLane2LaneConnections(), OptionsCont::getFloat(), NBEdge::getFromNode(), NBEdge::getGeometry(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLaneSpreadFunction(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBNode::getPosition(), NBEdge::getSpeed(), NBEdge::getToNode(), NBEdge::incLaneNo(), insert(), NBEdge::invalidateConnections(), NBEdge::L2L_VALIDATED, LANESPREAD_CENTER, PositionVector::length(), MIN2(), PositionVector::move2side(), PositionVector::pop_back(), POSITION_EPS, PositionVector::positionAtLengthPosition(), PositionVector::push_back(), NBEdgeCont::retrieve(), NBEdge::setGeometry(), NBEdgeCont::splitAt(), SUMO_const_halfLaneAndOffset, SUMO_const_laneWidthAndOffset, SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by guessRamps().
Definition at line 1194 of file NBNodeCont.cpp.
References NBEdge::getNumLanes(), and NBEdge::getSpeed().
void NBNodeCont::clear | ( | ) |
deletes all nodes
Definition at line 840 of file NBNodeCont.cpp.
References myExtractedNodes, and myNodes.
Referenced by ~NBNodeCont().
void NBNodeCont::computeLanes2Lanes | ( | ) |
divides the incoming lanes on outgoing lanes
Definition at line 823 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute().
void NBNodeCont::computeLogics | ( | const NBEdgeCont & | ec, |
OptionsCont & | oc | ||
) |
build the list of outgoing edges and lanes
Definition at line 832 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute().
void NBNodeCont::computeNodeShapes | ( | bool | leftHand | ) |
Definition at line 862 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute().
|
inline |
Returns the pointer to the end of the stored nodes.
Definition at line 149 of file NBNodeCont.h.
References myNodes.
Referenced by NBNetBuilder::compute(), NBEdgePriorityComputer::computeEdgePriorities(), NBNodeTypeComputer::computeNodeTypes(), NBTurningDirectionsComputer::computeTurnDirections(), NBNodesEdgesSorter::sortNodesEdges(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeNodes().
Removes the given node, deleting it.
[in] | node | The node to delete and remove |
Definition at line 153 of file NBNodeCont.cpp.
References extract().
Referenced by NIVissimEdge::remapOneOfNodes(), removeIsolatedRoads(), and removeUnwishedNodes().
Removes the given node but does not delete it.
[in] | node | The node to delete and remove |
[in] | remember | Whether to keep the node for future reference |
Definition at line 164 of file NBNodeCont.cpp.
References Named::getID(), myExtractedNodes, myNodes, and NBNode::removeTrafficLights().
Referenced by NIXMLNodesHandler::deleteNode(), and erase().
|
private |
Builds node clusters.
A node cluster is made up from nodes which are near by (distance<maxDist) and connected.
[in] | maxDist | The maximum distance between two nodes for clustering |
in,filled] | into The container to store the clusters in |
Definition at line 389 of file NBNodeCont.cpp.
References Position::distanceTo(), NBNode::getEdges(), NBEdge::getFromNode(), NBNode::getPosition(), NBEdge::getToNode(), NBNode::hasIncoming(), and myNodes.
Referenced by guessTLs(), joinJunctions(), and joinTLS().
std::vector< std::string > NBNodeCont::getAllNames | ( | ) | const |
std::string NBNodeCont::getFreeID | ( | ) |
Definition at line 853 of file NBNodeCont.cpp.
References retrieve(), and size().
Referenced by NIXMLEdgesHandler::insertNodeChecking().
|
inline |
gets all joined clusters (see doc for myClusters2Join)
Definition at line 321 of file NBNodeCont.h.
References myJoinedClusters.
Referenced by NWWriter_XML::writeJoinedJunctions().
void NBNodeCont::guessRamps | ( | OptionsCont & | oc, |
NBEdgeCont & | ec, | ||
NBDistrictCont & | dc | ||
) |
Definition at line 1207 of file NBNodeCont.cpp.
References buildOffRamp(), buildOnRamp(), OptionsCont::getBool(), NBEdge::getFromNode(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), OptionsCont::getStringVector(), NBEdge::getToNode(), OptionsCont::isSet(), mayNeedOffRamp(), mayNeedOnRamp(), myNodes, NBEdgeCont::retrieve(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
void NBNodeCont::guessTLs | ( | OptionsCont & | oc, |
NBTrafficLightLogicCont & | tlc | ||
) |
Guesses which junctions or junction clusters shall be controlled by tls.
[in] | oc | The options that steer the guessing process |
filled] | tlc The traffic lights control into which new traffic light definitions shall be stored |
Definition at line 666 of file NBNodeCont.cpp.
References OptionsCont::exists(), generateNodeClusters(), OptionsCont::getBool(), NBNode::getControllingTLS(), NBNode::getIncomingEdges(), OptionsCont::getStringVector(), NBTrafficLightLogicCont::insert(), NBNode::isNearDistrict(), OptionsCont::isSet(), NBNode::isTLControlled(), myNodes, NBNode::removeTrafficLights(), retrieve(), setAsTLControlled(), shouldBeTLSControlled(), SUMOReal, toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
bool NBNodeCont::insert | ( | const std::string & | id, |
const Position & | position, | ||
NBDistrict * | district | ||
) |
Inserts a node into the map.
[in] | id | The node's id |
[in] | position | The node's position |
[in] | A | district assigned to the node |
Definition at line 78 of file NBNodeCont.cpp.
References myNodes.
Referenced by NIImporter_SUMO::addJunction(), NIXMLNodesHandler::addNode(), NIImporter_VISUM::buildDistrictNode(), NIVissimEdge::buildNBEdge(), NIVissimNodeCluster::buildNBNode(), buildOffRamp(), buildOnRamp(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimEdge::getFromNode(), NIImporter_OpenDrive::getOrBuildNode(), NIVissimEdge::getToNode(), NIXMLEdgesHandler::insertNodeChecking(), NIImporter_OpenStreetMap::insertNodeChecking(), joinNodeClusters(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIImporter_RobocupRescue::loadNodes(), NIXMLEdgesHandler::myEndElement(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Nodes(), NIVissimEdge::remapOneOfNodes(), NIVissimEdge::resolveSameNode(), NBEdge::splitGeometry(), and NGNet::toNB().
Inserts a node into the map.
[in] | id | The node's id |
[in] | position | The node's position |
Definition at line 91 of file NBNodeCont.cpp.
References myNodes.
Position NBNodeCont::insert | ( | const std::string & | id | ) |
Inserts a node into the map.
[in] | id | The node's id |
Definition at line 103 of file NBNodeCont.cpp.
References myNodes.
Inserts a node into the map.
[in] | node | The node to insert |
Definition at line 117 of file NBNodeCont.cpp.
References Named::getID(), and myNodes.
unsigned int NBNodeCont::joinJunctions | ( | SUMOReal | maxdist, |
NBDistrictCont & | dc, | ||
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins junctions that are very close together.
Definition at line 490 of file NBNodeCont.cpp.
References generateNodeClusters(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), joinNodeClusters(), and myJoinExclusions.
Referenced by NBNetBuilder::compute().
unsigned int NBNodeCont::joinLoadedClusters | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins loaded junction clusters (see NIXMLNodesHandler)
Definition at line 466 of file NBNodeCont.cpp.
References joinNodeClusters(), myClusters2Join, retrieve(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 535 of file NBNodeCont.cpp.
References NBEdge::addLane2LaneConnection(), analyzeCluster(), NBEdgeCont::erase(), NBEdge::getConnections(), NBEdge::getFromNode(), NBEdge::getGeometry(), NBEdge::getLaneSpreadFunction(), NBEdge::getNumLanes(), NBEdge::getOffset(), NBEdge::getPriority(), NBEdge::getSpeed(), NBEdge::getStreetName(), NBEdge::getToNode(), NBEdge::getTypeID(), NBEdge::getWidth(), insert(), NBTrafficLightLogicCont::insert(), NBEdge::L2L_USER, registerJoinedCluster(), NBEdge::reinit(), retrieve(), NBEdge::setGeometry(), and WRITE_WARNING.
Referenced by joinJunctions(), and joinLoadedClusters().
void NBNodeCont::joinSimilarEdges | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins edges connecting the same nodes.
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 192 of file NBNodeCont.cpp.
References NBEdge::getLoadedLength(), NBEdge::getSpeed(), NBEdge::getToNode(), NBEdge::isNearEnough2BeJoined2(), NBEdgeCont::joinSameNodeConnectingEdges(), myNodes, and SUMOReal.
Referenced by NBNetBuilder::compute().
void NBNodeCont::joinTLS | ( | NBTrafficLightLogicCont & | tlc | ) |
Builds clusters of tls-controlled junctions and joins the control if possible.
changed] | tlc The traffic lights control for adding/removing new/prior tls |
Definition at line 766 of file NBNodeCont.cpp.
References generateNodeClusters(), NBTrafficLightLogicCont::insert(), NBTrafficLightLogicCont::removeFully(), SUMOReal, toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 1148 of file NBNodeCont.cpp.
References OptionsCont::getFloat(), NBNode::getIncomingEdges(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBEdge::getSpeed(), NBEdge::isMacroscopicConnector(), and SUMOReal.
Referenced by guessRamps().
|
private |
Definition at line 870 of file NBNodeCont.cpp.
References OptionsCont::getFloat(), NBNode::getIncomingEdges(), NBEdge::getNumLanes(), NBNode::getOutgoingEdges(), NBEdge::getSpeed(), NBEdge::isMacroscopicConnector(), and SUMOReal.
Referenced by guessRamps().
|
private |
invalidated assignment operator
void NBNodeCont::printBuiltNodesStatistics | ( | ) | const |
Prints statistics about built nodes.
Goes through stored nodes, computes the numbers of unregulated, priority and right-before-left junctions and prints them.
Definition at line 1252 of file NBNodeCont.cpp.
References myNodes, NODETYPE_DEAD_END, NODETYPE_DISTRICT, NODETYPE_NOJUNCTION, NODETYPE_PRIORITY_JUNCTION, NODETYPE_RIGHT_BEFORE_LEFT, NODETYPE_TRAFFIC_LIGHT, NODETYPE_UNKNOWN, toString(), and WRITE_MESSAGE.
Referenced by NBNetBuilder::compute().
void NBNodeCont::registerJoinedCluster | ( | const std::set< NBNode * > & | cluster | ) |
gets all joined clusters (see doc for myClusters2Join)
Definition at line 605 of file NBNodeCont.cpp.
References myJoinedClusters.
Referenced by joinNodeClusters().
void NBNodeCont::removeIsolatedRoads | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tc | ||
) |
Removes sequences of edges that are not connected with a junction. Simple roads without junctions sometimes remain when converting from OpenStreetMake, but they make no sense. Remaining empty nodes are also deleted.
in,opt. | changed] dc The district container needed if edges shall be removed |
in,opt. | changed] ec The container with the edge to be tested |
in,opt. | changed] tc The traffic lights container to update |
Definition at line 242 of file NBNodeCont.cpp.
References erase(), NBEdgeCont::erase(), NBEdgeCont::getAllNames(), NBEdge::getFromNode(), NBNode::getIncomingEdges(), OptionsCont::getOptions(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), NBEdgeCont::retrieve(), UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
void NBNodeCont::removeSelfLoops | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tc | ||
) |
Removes self-loop edges (edges where the source and the destination node are the same)
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 180 of file NBNodeCont.cpp.
References myNodes, toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
unsigned int NBNodeCont::removeUnwishedNodes | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBJoinedEdgesMap & | je, | ||
NBTrafficLightLogicCont & | tlc, | ||
bool | removeGeometryNodes | ||
) |
Removes "unwished" nodes.
Removes nodes if a) no incoming/outgoing edges exist or b) if the node is a "geometry" node. In the second case, edges that participate at the node will be joined. Whether the node is a geometry node or not, is determined by a call to NBNode::checkIsRemovable. The node is removed from the list of tls-controlled nodes.
in,opt. | changed] dc The district container needed if a node shall be removed | |
in,opt. | changed] ec The edge container needed for joining edges | |
in,opt. | changed] je The map of joined edges (changes are stored here) | |
in,opt. | changed] tlc The traffic lights container to remove nodes from | |
[in] | removeGeometryNodes | Whether geometry nodes shall also be removed |
Definition at line 336 of file NBNodeCont.cpp.
References NBEdge::append(), NBJoinedEdgesMap::appended(), begin(), NBNode::checkIsRemovable(), erase(), NBEdgeCont::erase(), NBNode::getEdgesToJoin(), Named::getID(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), myNodes, NBNode::replaceIncoming(), and NBTrafficLightLogicCont::replaceRemoved().
Referenced by NBNetBuilder::compute().
void NBNodeCont::rename | ( | NBNode * | node, |
const std::string & | newID | ||
) |
Renames the node. Throws exception if newID already exists.
Definition at line 1302 of file NBNodeCont.cpp.
References Named::getID(), myNodes, and Named::setID().
NBNode * NBNodeCont::retrieve | ( | const std::string & | id | ) | const |
Returns the node with the given name.
[in] | id | The id of the node to retrieve |
Definition at line 129 of file NBNodeCont.cpp.
References myNodes.
Referenced by NIImporter_SUMO::_loadNetwork(), addJoinExclusion(), NIXMLNodesHandler::addNode(), NIVissimDisturbance::addToNode(), NIImporter_VISUM::buildDistrictNode(), NGEdge::buildNBEdge(), NBNetBuilder::compute(), NIXMLNodesHandler::deleteNode(), NIVissimNodeCluster::dict_addDisturbances(), NIVissimDistrictConnection::dict_BuildDistricts(), getFreeID(), NIImporter_OpenDrive::getIncomingDirectionalEdge(), NIImporter_OpenDrive::getOrBuildNode(), NIImporter_OpenDrive::getOutgoingDirectionalEdge(), guessTLs(), NIXMLEdgesHandler::insertNodeChecking(), NIImporter_OpenStreetMap::insertNodeChecking(), joinLoadedClusters(), joinNodeClusters(), NIImporter_ArcView::load(), NIImporter_RobocupRescue::loadEdges(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::parse_NodesToTrafficLights(), NIVissimEdge::resolveSameNode(), NIImporter_OpenDrive::setNodeSecure(), and NBEdge::splitGeometry().
Returns the node with the given coordinates.
[in] | position | The position at which the node to retrieve lies |
[in] | offset | An offset which can be applied in the case positions are blurred |
Definition at line 139 of file NBNodeCont.cpp.
References NBNode::getPosition(), myNodes, Position::x(), and Position::y().
void NBNodeCont::setAsTLControlled | ( | NBNode * | node, |
NBTrafficLightLogicCont & | tlc, | ||
std::string | id = "" |
||
) |
Sets the given node as being controlled by a tls.
[in] | node | The node that shall be controlled by a tls |
[in] | tlc | The traffic lights control into which the new traffic light definition shall be stored |
[in] | id | The id of the tls to add |
Definition at line 807 of file NBNodeCont.cpp.
References Named::getID(), NBTrafficLightLogicCont::insert(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and guessTLs().
Returns whethe the given node cluster should be controlled by a tls.
[in] | c | The node cluster |
Definition at line 638 of file NBNodeCont.cpp.
References SUMOReal.
Referenced by guessTLs().
|
inline |
Returns the number of known nodes.
Definition at line 280 of file NBNodeCont.h.
References myNodes.
Referenced by getFreeID(), NILoader::load(), and main().
|
private |
Definition at line 392 of file NBNodeCont.h.
Referenced by addCluster2Join(), and joinLoadedClusters().
|
private |
The extracted nodes which are kept for reference.
Definition at line 386 of file NBNodeCont.h.
|
private |
The running internal id.
Definition at line 377 of file NBNodeCont.h.
|
private |
ids found in loaded join clusters used for error checking
Definition at line 397 of file NBNodeCont.h.
Referenced by addCluster2Join(), and addJoinExclusion().
|
private |
Definition at line 394 of file NBNodeCont.h.
Referenced by getJoinedClusters(), and registerJoinedCluster().
|
private |
Definition at line 389 of file NBNodeCont.h.
Referenced by addCluster2Join(), addJoinExclusion(), and joinJunctions().
|
private |
The map of names to nodes.
Definition at line 383 of file NBNodeCont.h.
Referenced by begin(), clear(), computeLanes2Lanes(), computeLogics(), computeNodeShapes(), end(), extract(), generateNodeClusters(), getAllNames(), guessRamps(), guessTLs(), insert(), joinSimilarEdges(), printBuiltNodesStatistics(), removeSelfLoops(), removeUnwishedNodes(), rename(), retrieve(), and size().