![]() |
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, TrafficLightType &type) |
void | clear () |
void | computeLanes2Lanes () |
divides the incoming lanes on outgoing lanes More... | |
void | computeLogics (const NBEdgeCont &ec, OptionsCont &oc) |
build the list of outgoing edges and lanes More... | |
void | computeNodeShapes (SUMOReal mismatchThreshold=-1) |
Compute the junction shape for this node. More... | |
void | discardTrafficLights (NBTrafficLightLogicCont &tlc, bool geometryLike, bool guessSignals) |
std::vector< std::string > | getAllNames () const |
get all node names More... | |
std::string | getFreeID () |
const std::vector< std::set< std::string > > & | getJoinedClusters () const |
gets all joined clusters (see doc for myClusters2Join) More... | |
void | markAsSplit (const NBNode *node) |
mark a node as being created form a split More... | |
NBNodeCont () | |
Constructor. More... | |
void | printBuiltNodesStatistics () const |
Prints statistics about built nodes. More... | |
void | registerJoinedCluster (const std::set< NBNode * > &cluster) |
gets all joined clusters (see doc for myClusters2Join) More... | |
void | rename (NBNode *node, const std::string &newID) |
Renames the node. Throws exception if newID already exists. More... | |
unsigned int | size () const |
Returns the number of known nodes. More... | |
~NBNodeCont () | |
Destructor. More... | |
Insertion/removal/retrieval of nodes | |
bool | insert (const std::string &id, const Position &position, NBDistrict *district=0) |
Inserts a node into the map. More... | |
bool | insert (NBNode *node) |
Inserts a node into the map. More... | |
bool | erase (NBNode *node) |
Removes the given node, deleting it. More... | |
bool | extract (NBNode *node, bool remember=false) |
Removes the given node but does not delete it. More... | |
NBNode * | retrieve (const std::string &id) const |
Returns the node with the given name. More... | |
NBNode * | retrieve (const Position &position, const SUMOReal offset=0.) const |
Returns the node with the given coordinates. More... | |
std::map< std::string, NBNode * >::const_iterator | begin () const |
Returns the pointer to the begin of the stored nodes. More... | |
std::map< std::string, NBNode * >::const_iterator | end () const |
Returns the pointer to the end of the stored nodes. More... | |
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 More... | |
unsigned int | joinLoadedClusters (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins loaded junction clusters (see NIXMLNodesHandler) More... | |
unsigned int | joinJunctions (SUMOReal maxDist, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins junctions that are very close together. More... | |
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) More... | |
void | joinSimilarEdges (NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Joins edges connecting the same nodes. More... | |
void | avoidOverlap () |
fix overlap More... | |
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. More... | |
unsigned int | removeUnwishedNodes (NBDistrictCont &dc, NBEdgeCont &ec, NBJoinedEdgesMap &je, NBTrafficLightLogicCont &tlc, bool removeGeometryNodes) |
Removes "unwished" nodes. More... | |
Methods for guessing/computing traffic lights | |
void | guessTLs (OptionsCont &oc, NBTrafficLightLogicCont &tlc) |
Guesses which junctions or junction clusters shall be controlled by tls. More... | |
void | joinTLS (NBTrafficLightLogicCont &tlc, SUMOReal maxdist) |
Builds clusters of tls-controlled junctions and joins the control if possible. More... | |
void | setAsTLControlled (NBNode *node, NBTrafficLightLogicCont &tlc, TrafficLightType type, std::string id="") |
Sets the given node as being controlled by a tls. More... | |
Private Types | |
typedef std::map< std::string, NBNode * > | NodeCont |
Definition of the map of names to nodes. More... | |
Private Member Functions | |
NBNodeCont (const NBNodeCont &s) | |
invalidated copy constructor More... | |
NBNodeCont & | operator= (const NBNodeCont &s) |
invalidated assignment operator More... | |
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. More... | |
Private Attributes | |
std::vector< std::set< std::string > > | myClusters2Join |
std::set< NBNode * > | myExtractedNodes |
The extracted nodes which are kept for reference. More... | |
int | myInternalID |
The running internal id. More... | |
std::set< std::string > | myJoined |
ids found in loaded join clusters used for error checking More... | |
std::vector< std::set< std::string > > | myJoinedClusters |
std::set< std::string > | myJoinExclusions |
NodeCont | myNodes |
The map of names to nodes. More... | |
NamedRTree | myRTree |
node positions for faster lookup More... | |
std::set< const NBNode * > | mySplit |
nodes that were created when splitting an edge More... | |
Helper methods for for joining nodes | |
typedef std::vector< std::set< NBNode * > > | NodeClusters |
Definition of a node cluster container. More... | |
typedef std::pair< NBNode *, SUMOReal > | NodeAndDist |
void | generateNodeClusters (SUMOReal maxDist, NodeClusters &into) const |
Builds node clusters. More... | |
void | joinNodeClusters (NodeClusters clusters, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc) |
Container for nodes during the netbuilding process.
Definition at line 64 of file NBNodeCont.h.
|
private |
Definition at line 336 of file NBNodeCont.h.
|
private |
Definition of a node cluster container.
Definition at line 335 of file NBNodeCont.h.
|
private |
Definition of the map of names to nodes.
Definition at line 373 of file NBNodeCont.h.
NBNodeCont::NBNodeCont | ( | ) |
Constructor.
Definition at line 68 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 466 of file NBNodeCont.cpp.
References myClusters2Join, myJoined, myJoinExclusions, and WRITE_WARNING.
Referenced by NIXMLNodesHandler::addJoinCluster(), and end().
void NBNodeCont::addJoinExclusion | ( | const std::vector< std::string > & | ids, |
bool | check = false |
||
) |
Definition at line 450 of file NBNodeCont.cpp.
References myJoined, myJoinExclusions, retrieve(), and WRITE_WARNING.
Referenced by NIXMLNodesHandler::addJoinExclusion(), NBNetBuilder::compute(), and end().
void NBNodeCont::analyzeCluster | ( | std::set< NBNode * > | cluster, |
std::string & | id, | ||
Position & | pos, | ||
bool & | hasTLS, | ||
TrafficLightType & | type | ||
) |
Definition at line 776 of file NBNodeCont.cpp.
References Position::add(), StringBijection< T >::get(), OptionsCont::getOptions(), Position::mul(), toString(), SUMOXMLDefinitions::TrafficLightTypes, and WRITE_WARNING.
Referenced by joinNodeClusters(), GNENet::joinSelectedJunctions(), joinTLS(), and size().
void NBNodeCont::avoidOverlap | ( | ) |
fix overlap
Definition at line 390 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute(), and end().
|
inline |
Returns the pointer to the begin of the stored nodes.
Definition at line 127 of file NBNodeCont.h.
References myNodes.
Referenced by NBNetBuilder::compute(), NBEdgePriorityComputer::computeEdgePriorities(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirections(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), removeUnwishedNodes(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodesEdgesSorter::sortNodesEdges(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_DlrNavteq::writeTrafficSignals().
void NBNodeCont::clear | ( | ) |
deletes all nodes
Definition at line 1081 of file NBNodeCont.cpp.
References myExtractedNodes, and myNodes.
Referenced by size(), and ~NBNodeCont().
void NBNodeCont::computeLanes2Lanes | ( | ) |
divides the incoming lanes on outgoing lanes
Definition at line 1064 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute(), and end().
void NBNodeCont::computeLogics | ( | const NBEdgeCont & | ec, |
OptionsCont & | oc | ||
) |
build the list of outgoing edges and lanes
Definition at line 1073 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute(), and end().
void NBNodeCont::computeNodeShapes | ( | SUMOReal | mismatchThreshold = -1 | ) |
Compute the junction shape for this node.
[in] | mismatchThreshold | The threshold for warning about shapes which are away from myPosition |
Definition at line 1103 of file NBNodeCont.cpp.
References myNodes.
Referenced by NBNetBuilder::compute(), and size().
void NBNodeCont::discardTrafficLights | ( | NBTrafficLightLogicCont & | tlc, |
bool | geometryLike, | ||
bool | guessSignals | ||
) |
Definition at line 1196 of file NBNodeCont.cpp.
References NBTrafficLightLogicCont::extract(), NBNode::geometryLike(), NBNode::getControllingTLS(), NBNode::getOutgoingEdges(), NBNode::getPosition(), NBNode::isTLControlled(), myNodes, NODETYPE_UNKNOWN, NBNode::reinit(), and NBNode::removeTrafficLight().
Referenced by getJoinedClusters(), and NILoader::load().
|
inline |
Returns the pointer to the end of the stored nodes.
Definition at line 135 of file NBNodeCont.h.
References addCluster2Join(), addJoinExclusion(), avoidOverlap(), computeLanes2Lanes(), computeLogics(), guessTLs(), joinJunctions(), joinLoadedClusters(), joinSimilarEdges(), joinTLS(), myNodes, removeIsolatedRoads(), removeSelfLoops(), removeUnwishedNodes(), rename(), setAsTLControlled(), and SUMOReal.
Referenced by NBNetBuilder::compute(), NBEdgePriorityComputer::computeEdgePriorities(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirections(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodesEdgesSorter::sortNodesEdges(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_DlrNavteq::writeTrafficSignals().
bool NBNodeCont::erase | ( | NBNode * | node | ) |
Removes the given node, deleting it.
[in] | node | The node to delete and remove |
Definition at line 139 of file NBNodeCont.cpp.
References extract().
Referenced by joinNodeClusters(), NIVissimEdge::remapOneOfNodes(), and removeIsolatedRoads().
bool NBNodeCont::extract | ( | NBNode * | node, |
bool | remember = false |
||
) |
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 150 of file NBNodeCont.cpp.
References Named::getID(), NBNode::getPosition(), myExtractedNodes, myNodes, myRTree, NamedRTree::Remove(), NBNode::removeTrafficLights(), Position::x(), and Position::y().
Referenced by NIXMLNodesHandler::deleteNode(), GNENet::deleteSingleJunction(), erase(), and removeUnwishedNodes().
|
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 |
Definition at line 398 of file NBNodeCont.cpp.
References NBNode::geometryLike(), NBNode::getEdges(), NBEdge::getFromNode(), NBEdge::getLoadedLength(), NBEdge::getPermissions(), NBEdge::getToNode(), NBNode::hasIncoming(), myNodes, SUMOReal, and SVC_PEDESTRIAN.
Referenced by guessTLs(), joinJunctions(), and joinTLS().
std::vector< std::string > NBNodeCont::getAllNames | ( | ) | const |
get all node names
Definition at line 1175 of file NBNodeCont.cpp.
References myNodes.
Referenced by GNENet::GNENet(), and size().
std::string NBNodeCont::getFreeID | ( | ) |
Definition at line 1094 of file NBNodeCont.cpp.
References retrieve(), and size().
Referenced by size().
|
inline |
gets all joined clusters (see doc for myClusters2Join)
Definition at line 315 of file NBNodeCont.h.
References discardTrafficLights(), and myJoinedClusters.
Referenced by NWWriter_XML::writeJoinedJunctions().
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 |
Definition at line 839 of file NBNodeCont.cpp.
References OptionsCont::exists(), generateNodeClusters(), NBNode::geometryLike(), StringBijection< T >::get(), OptionsCont::getBool(), NBNode::getControllingTLS(), OptionsCont::getFloat(), NBEdge::getFromNode(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLength(), OptionsCont::getOptions(), NBNode::getOutgoingEdges(), NBEdge::getSignalOffset(), OptionsCont::getStringVector(), NBEdge::getToNode(), NBTrafficLightLogicCont::insert(), NBNode::isNearDistrict(), OptionsCont::isSet(), NBNode::isTLControlled(), myNodes, NODETYPE_PRIORITY, NBTrafficLightLogicCont::removeFully(), NBNode::removeTrafficLights(), retrieve(), setAsTLControlled(), shouldBeTLSControlled(), SUMOReal, TLTYPE_STATIC, toString(), SUMOXMLDefinitions::TrafficLightTypes, NBEdge::UNSPECIFIED_SIGNAL_OFFSET, and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
bool NBNodeCont::insert | ( | const std::string & | id, |
const Position & | position, | ||
NBDistrict * | district = 0 |
||
) |
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 80 of file NBNodeCont.cpp.
References NamedRTree::Insert(), myNodes, myRTree, Position::x(), and Position::y().
Referenced by NIImporter_SUMO::addJunction(), NIImporter_VISUM::buildDistrictNode(), NIVissimEdge::buildNBEdge(), NIVissimNodeCluster::buildNBNode(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimEdge::getFromNode(), NIImporter_OpenDrive::getOrBuildNode(), NIVissimEdge::getToNode(), GNENet::insertJunction(), NIImporter_OpenStreetMap::insertNodeChecking(), joinNodeClusters(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIImporter_RobocupRescue::loadNodes(), NIXMLEdgesHandler::myEndElement(), NIImporter_ITSUMO::Handler::myEndElement(), NIImporter_MATSim::NodesHandler::myStartElement(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Nodes(), NIXMLNodesHandler::processNodeType(), NIVissimEdge::remapOneOfNodes(), NIImporter_DlrNavteq::NodesHandler::report(), NIVissimEdge::resolveSameNode(), NBEdge::splitGeometry(), and NGNet::toNB().
bool NBNodeCont::insert | ( | NBNode * | node | ) |
Inserts a node into the map.
[in] | node | The node to insert |
Definition at line 95 of file NBNodeCont.cpp.
References Named::getID(), NBNode::getPosition(), NamedRTree::Insert(), myNodes, myRTree, Position::x(), and Position::y().
unsigned int NBNodeCont::joinJunctions | ( | SUMOReal | maxDist, |
NBDistrictCont & | dc, | ||
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins junctions that are very close together.
Definition at line 508 of file NBNodeCont.cpp.
References generateNodeClusters(), NBEdge::getAngleAtNode(), NBNode::getConnectionTo(), NBEdge::getFromNode(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLoadedLength(), NBNode::getOutgoingEdges(), NBEdge::getPermissions(), NBEdge::getToNode(), joinNodeClusters(), joinToStringSorting(), max, MIN2(), myJoinExclusions, SUMOReal, SVC_PEDESTRIAN, toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
unsigned int NBNodeCont::joinLoadedClusters | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins loaded junction clusters (see NIXMLNodesHandler)
Definition at line 484 of file NBNodeCont.cpp.
References joinNodeClusters(), myClusters2Join, retrieve(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
|
private |
Definition at line 693 of file NBNodeCont.cpp.
References NBEdge::addLane2LaneConnection(), analyzeCluster(), erase(), NBEdgeCont::extract(), NBEdge::getConnections(), NBEdge::getFromNode(), NBEdge::getToNode(), insert(), NBTrafficLightLogicCont::insert(), NBEdge::L2L_USER, registerJoinedCluster(), NBEdge::reinitNodes(), retrieve(), and WRITE_WARNING.
Referenced by joinJunctions(), and joinLoadedClusters().
void NBNodeCont::joinSimilarEdges | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tlc | ||
) |
Joins edges connecting the same nodes.
Definition at line 180 of file NBNodeCont.cpp.
References NBEdge::getLoadedLength(), NBEdge::getPermissions(), NBEdge::getSpeed(), NBEdge::isNearEnough2BeJoined2(), NBEdgeCont::joinSameNodeConnectingEdges(), myNodes, and SUMOReal.
Referenced by NBNetBuilder::compute(), and end().
void NBNodeCont::joinTLS | ( | NBTrafficLightLogicCont & | tlc, |
SUMOReal | maxdist | ||
) |
Builds clusters of tls-controlled junctions and joins the control if possible.
Definition at line 1001 of file NBNodeCont.cpp.
References analyzeCluster(), generateNodeClusters(), NBTrafficLightLogicCont::insert(), NBTrafficLightLogicCont::removeFully(), toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
|
inline |
mark a node as being created form a split
Definition at line 326 of file NBNodeCont.h.
References mySplit.
Referenced by NIXMLEdgesHandler::myEndElement().
|
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 1111 of file NBNodeCont.cpp.
References myNodes, NODETYPE_ALLWAY_STOP, NODETYPE_DEAD_END, NODETYPE_DISTRICT, NODETYPE_NOJUNCTION, NODETYPE_PRIORITY, NODETYPE_PRIORITY_STOP, NODETYPE_RAIL_SIGNAL, NODETYPE_RIGHT_BEFORE_LEFT, NODETYPE_TRAFFIC_LIGHT, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, NODETYPE_TRAFFIC_LIGHT_RIGHT_ON_RED, NODETYPE_UNKNOWN, NODETYPE_ZIPPER, toString(), and WRITE_MESSAGE.
Referenced by NBNetBuilder::compute(), and size().
void NBNodeCont::registerJoinedCluster | ( | const std::set< NBNode * > & | cluster | ) |
gets all joined clusters (see doc for myClusters2Join)
Definition at line 766 of file NBNodeCont.cpp.
References myJoinedClusters.
Referenced by joinNodeClusters(), GNENet::joinSelectedJunctions(), and size().
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.
Definition at line 225 of file NBNodeCont.cpp.
References erase(), NBEdgeCont::erase(), NBEdgeCont::getAllNames(), NBEdge::getFromNode(), Named::getID(), NBNode::getIncomingEdges(), OptionsCont::getOptions(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), NBEdgeCont::retrieve(), UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
void NBNodeCont::removeSelfLoops | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBTrafficLightLogicCont & | tc | ||
) |
Removes self-loop edges (edges where the source and the destination node are the same)
Definition at line 168 of file NBNodeCont.cpp.
References myNodes, toString(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
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.
Definition at line 319 of file NBNodeCont.cpp.
References NBEdge::append(), NBJoinedEdgesMap::appended(), begin(), NBNode::checkIsRemovable(), extract(), NBEdgeCont::extract(), NBNode::getEdges(), NBNode::getEdgesToJoin(), Named::getID(), NBNode::getIncomingEdges(), OptionsCont::getOptions(), NBNode::getOutgoingEdges(), OptionsCont::getString(), OptionsCont::getStringVector(), NBEdge::getToNode(), OptionsCont::isSet(), NBHelpers::loadEdgesFromFile(), myNodes, mySplit, NBNode::replaceIncoming(), and NBTrafficLightLogicCont::replaceRemoved().
Referenced by NBNetBuilder::compute(), and end().
void NBNodeCont::rename | ( | NBNode * | node, |
const std::string & | newID | ||
) |
Renames the node. Throws exception if newID already exists.
Definition at line 1185 of file NBNodeCont.cpp.
References Named::getID(), myNodes, and Named::setID().
Referenced by end(), and GNENet::renameJunction().
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 109 of file NBNodeCont.cpp.
References myNodes.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLConnectionsHandler::addCrossing(), NIXMLConnectionsHandler::addCustomShape(), addJoinExclusion(), NIXMLNodesHandler::addNode(), NIVissimDisturbance::addToNode(), NIImporter_VISUM::buildDistrictNode(), NGEdge::buildNBEdge(), NBNetBuilder::compute(), NIXMLNodesHandler::deleteNode(), NIVissimNodeCluster::dict_addDisturbances(), NIVissimDistrictConnection::dict_BuildDistricts(), getFreeID(), NIImporter_VISUM::getNamedNode(), NIImporter_OpenDrive::getOrBuildNode(), GNENet::GNENet(), guessTLs(), NIImporter_OpenStreetMap::insertNodeChecking(), joinLoadedClusters(), joinNodeClusters(), NIImporter_ArcView::load(), NIImporter_RobocupRescue::loadEdges(), NIImporter_OpenDrive::loadNetwork(), NIImporter_ITSUMO::Handler::myEndElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), NIImporter_VISUM::parse_NodesToTrafficLights(), NIImporter_DlrNavteq::EdgesHandler::report(), NIVissimEdge::resolveSameNode(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), NBEdge::splitGeometry(), and NWWriter_DlrNavteq::writeNodesUnsplitted().
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 119 of file NBNodeCont.cpp.
References NBNode::getPosition(), myNodes, myRTree, POSITION_EPS, NamedRTree::Search(), SUMOReal, Position::x(), and Position::y().
void NBNodeCont::setAsTLControlled | ( | NBNode * | node, |
NBTrafficLightLogicCont & | tlc, | ||
TrafficLightType | type, | ||
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] | type | The type of the new tls |
[in] | id | The id of the tls to add |
Definition at line 1047 of file NBNodeCont.cpp.
References Named::getID(), NBTrafficLightLogicCont::insert(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), end(), and guessTLs().
|
private |
Returns whethe the given node cluster should be controlled by a tls.
[in] | c | The node cluster |
Definition at line 811 of file NBNodeCont.cpp.
References SUMOReal.
Referenced by guessTLs().
|
inline |
Returns the number of known nodes.
Definition at line 273 of file NBNodeCont.h.
References analyzeCluster(), clear(), computeNodeShapes(), getAllNames(), getFreeID(), myNodes, printBuiltNodesStatistics(), registerJoinedCluster(), and SUMOReal.
Referenced by getFreeID(), NILoader::load(), main(), NIImporter_DlrNavteq::NodesHandler::report(), and NWWriter_OpenDrive::writeNetwork().
|
private |
Definition at line 385 of file NBNodeCont.h.
Referenced by addCluster2Join(), and joinLoadedClusters().
|
private |
The extracted nodes which are kept for reference.
Definition at line 379 of file NBNodeCont.h.
|
private |
The running internal id.
Definition at line 370 of file NBNodeCont.h.
|
private |
ids found in loaded join clusters used for error checking
Definition at line 390 of file NBNodeCont.h.
Referenced by addCluster2Join(), and addJoinExclusion().
|
private |
Definition at line 387 of file NBNodeCont.h.
Referenced by getJoinedClusters(), and registerJoinedCluster().
|
private |
Definition at line 382 of file NBNodeCont.h.
Referenced by addCluster2Join(), addJoinExclusion(), and joinJunctions().
|
private |
The map of names to nodes.
Definition at line 376 of file NBNodeCont.h.
Referenced by avoidOverlap(), begin(), clear(), computeLanes2Lanes(), computeLogics(), computeNodeShapes(), discardTrafficLights(), end(), extract(), generateNodeClusters(), getAllNames(), guessTLs(), insert(), joinSimilarEdges(), printBuiltNodesStatistics(), removeSelfLoops(), removeUnwishedNodes(), rename(), retrieve(), and size().
|
private |
node positions for faster lookup
Definition at line 396 of file NBNodeCont.h.
Referenced by extract(), insert(), and retrieve().
|
private |
nodes that were created when splitting an edge
Definition at line 393 of file NBNodeCont.h.
Referenced by markAsSplit(), and removeUnwishedNodes().