 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
63 typedef std::set<NBNode*, ComparatorIdLess>
NodeSet;
116 std::map<std::string, NBNode*>::const_iterator
begin()
const {
121 std::map<std::string, NBNode*>::const_iterator
end()
const {
133 void addJoinExclusion(
const std::vector<std::string>& ids,
bool check =
false);
215 bool removeGeometryNodes);
322 int remapIDs(
bool numericaIDs,
bool reservedIDs,
const std::string& prefix);
std::vector< std::set< std::string > > myJoinedClusters
sets of node ids which were joined
int removeUnwishedNodes(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc, NBPTStopCont &sc, NBPTLineCont &lc, NBParkingCont &pc, bool removeGeometryNodes)
Removes "unwished" nodes.
std::set< std::string > myJoinExclusions
set of node ids which should not be joined
std::string getFreeID()
generates a new node ID
void computeNodeShapes(double mismatchThreshold=-1)
Compute the junction shape for this node.
Storage for edges, including some functionality operating on multiple edges.
void rename(NBNode *node, const std::string &newID)
Renames the node. Throws exception if newID already exists.
void setAsTLControlled(NBNode *node, NBTrafficLightLogicCont &tlc, TrafficLightType type, std::string id="")
Sets the given node as being controlled by a tls.
void computeLanes2Lanes()
divides the incoming lanes on outgoing lanes
NodeCont myNodes
The map of names to nodes.
A container for traffic light definitions and built programs.
Static storage of an output device and its base (abstract) implementation.
std::map< std::string, NBNode * >::const_iterator end() const
Returns the pointer to the end of the stored nodes.
void markAsSplit(const NBNode *node)
mark a node as being created form a split
void guessTLs(OptionsCont &oc, NBTrafficLightLogicCont &tlc)
Guesses which junctions or junction clusters shall be controlled by tls.
std::set< std::string > myJoined
ids found in loaded join clusters used for error checking
NBNodeCont & operator=(const NBNodeCont &s)
invalidated assignment operator
bool onlyCrossings(const NodeSet &c) const
check wheter the set of nodes only contains pedestrian crossings
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
std::vector< std::string > getAllNames() const
get all node names
std::pair< NBNode *, double > NodeAndDist
std::map< std::string, NBNode * >::const_iterator begin() const
Returns the pointer to the begin of the stored nodes.
void removeComponents(NBDistrictCont &dc, NBEdgeCont &ec, const int numKeep)
Checks the network for weak connectivity and removes all but the largest components....
void avoidOverlap()
fix overlap
void addCluster2Join(std::set< std::string > cluster, NBNode *node)
add ids of nodes which shall be joined into a single node
void pruneClusterFringe(NodeSet &cluster) const
remove geometry-like fringe nodes from cluster
int remapIDs(bool numericaIDs, bool reservedIDs, const std::string &prefix)
remap node IDs accoring to options –numerical-ids and –reserved-ids
A container for districts.
Container for nodes during the netbuilding process.
bool erase(NBNode *node)
Removes the given node, deleting it.
The representation of a single edge during network building.
void analyzeCluster(NodeSet cluster, std::string &id, Position &pos, bool &hasTLS, TrafficLightType &type, SumoXMLNodeType &nodeType)
void computeLogics(const NBEdgeCont &ec, OptionsCont &oc)
build the list of outgoing edges and lanes
int myInternalID
The running internal id.
void removeIsolatedRoads(NBDistrictCont &dc, NBEdgeCont &ec)
Removes sequences of edges that are not connected with a junction. Simple roads without junctions som...
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.
bool feasibleCluster(const NodeSet &cluster, const NBEdgeCont &ec, const NBPTStopCont &sc, std::string &reason) const
determine wether the cluster is not too complex for joining
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
void joinNodeClusters(NodeClusters clusters, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc)
joins the given node clusters
std::set< NBNode *, ComparatorIdLess > NodeSet
Definition of a node cluster container.
void printBuiltNodesStatistics() const
Prints statistics about built nodes.
std::vector< std::pair< std::set< std::string >, NBNode * > > myClusters2Join
loaded sets of node ids to join (cleared after use)
A point in 2D or 3D with translation and scaling methods.
void addJoinExclusion(const std::vector< std::string > &ids, bool check=false)
A storage for options typed value containers)
void joinTLS(NBTrafficLightLogicCont &tlc, double maxdist)
Builds clusters of tls-controlled junctions and joins the control if possible.
NBEdge * shortestEdge(const NodeSet &cluster, const NodeSet &startNodes, const std::vector< NBNode * > &exclude) const
find closest neighbor for building circle
std::set< const NBNode * > mySplit
nodes that were created when splitting an edge
const std::vector< std::set< std::string > > & getJoinedClusters() const
gets all joined clusters (see doc for myClusters2Join)
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
bool wasRemoved(std::string id) const
Returns whether the node with the id was deleted explicitly.
std::map< std::string, NBNode * > NodeCont
Definition of the map of names to nodes.
bool customTLID(const NodeSet &c) const
check wheter the set of nodes contains traffic lights with custom id
void clear()
deletes all nodes
bool shouldBeTLSControlled(const NodeSet &c, double laneSpeedThreshold) const
Returns whethe the given node cluster should be controlled by a tls.
NamedRTree myRTree
node positions for faster lookup
int size() const
Returns the number of nodes stored in this container.
void registerJoinedCluster(const NodeSet &cluster)
gets all joined clusters (see doc for myClusters2Join)
A RT-tree for efficient storing of SUMO's Named objects.
bool extract(NBNode *node, bool remember=false)
Removes the given node but does not delete it.
void joinNodeCluster(NodeSet clusters, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc, NBNode *predefined=nullptr)
int joinLoadedClusters(NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc)
Joins loaded junction clusters (see NIXMLNodesHandler)
void discardRailSignals()
void generateNodeClusters(double maxDist, NodeClusters &into) const
Builds node clusters.
int joinJunctions(double maxDist, NBDistrictCont &dc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc, NBPTStopCont &sc)
Joins junctions that are very close together.
NodeCont myExtractedNodes
The extracted nodes which are kept for reference.
Represents a single node (junction) during network building.
std::vector< NodeSet > NodeClusters
void discardTrafficLights(NBTrafficLightLogicCont &tlc, bool geometryLike, bool guessSignals)
A class representing a single district.
bool reduceToCircle(NodeSet &cluster, int circleSize, NodeSet startNodes, std::vector< NBNode * > cands=std::vector< NBNode * >()) const
try to find a joinable subset (recursively)
void computeLogics2(const NBEdgeCont &ec, OptionsCont &oc)
compute right-of-way logic for all lane-to-lane connections