|
SUMO - Simulation of Urban MObility
|
Storage for edges, including some functionality operating on multiple edges. More...
#include <NBEdgeCont.h>
Public Member Functions | |
| void | applyOptions (OptionsCont &oc) |
| Initialises the storage by applying given options. | |
| void | clear () throw () |
| Deletes all edges. | |
| void | guessRoundabouts (std::vector< std::set< NBEdge * > > &marked) throw () |
| Determines which edges belong to roundabouts and increases their priority. | |
| bool | isLeftHanded () const throw () |
| Returns whether the built edges are left-handed. | |
| NBEdgeCont (NBTypeCont &tc) throw () | |
| Constructor. | |
| bool | wasIgnored (std::string id) const throw () |
| Returns whether the edge with the id was ignored during parsing. | |
| bool | wasRemoved (std::string id) const throw () |
| Returns whether the edge with the id was deleted explicitly. | |
| ~NBEdgeCont () throw () | |
| Destructor. | |
edge access methods | |
| bool | insert (NBEdge *edge, bool ignorePrunning=false) throw () |
| Adds an edge to the dictionary. | |
| NBEdge * | retrieve (const std::string &id, bool retrieveExtracted=false) const throw () |
| Returns the edge that has the given id. | |
| NBEdge * | retrievePossiblySplitted (const std::string &id, const std::string &hint, bool incoming) const throw () |
| Tries to retrieve an edge, even if it is splitted. | |
| NBEdge * | retrievePossiblySplitted (const std::string &id, SUMOReal pos) const throw () |
| Tries to retrieve an edge, even if it is splitted. | |
| void | erase (NBDistrictCont &dc, NBEdge *edge) throw () |
| Removes the given edge from the container (deleting it) | |
| void | extract (NBDistrictCont &dc, NBEdge *edge, bool remember=false) |
| Removes the given edge from the container like erase but does not delete it. | |
| std::map< std::string, NBEdge * > ::const_iterator | begin () const |
| Returns the pointer to the begin of the stored edges. | |
| std::map< std::string, NBEdge * > ::const_iterator | end () const |
| Returns the pointer to the end of the stored edges. | |
explicit edge manipulation methods | |
| bool | splitAt (NBDistrictCont &dc, NBEdge *edge, NBNode *node) throw (ProcessError) |
| Splits the edge at the position nearest to the given node. | |
| bool | splitAt (NBDistrictCont &dc, NBEdge *edge, NBNode *node, const std::string &firstEdgeName, const std::string &secondEdgeName, unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge) throw (ProcessError) |
| Splits the edge at the position nearest to the given node using the given modifications. | |
| bool | splitAt (NBDistrictCont &dc, NBEdge *edge, SUMOReal edgepos, NBNode *node, const std::string &firstEdgeName, const std::string &secondEdgeName, unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge) throw (ProcessError) |
| Splits the edge at the position nearest to the given node using the given modifications. | |
container access methods | |
| unsigned int | size () const throw () |
| Returns the number of edges. | |
| std::vector< std::string > | getAllNames () const throw () |
| Returns all ids of known edges. | |
| unsigned int | getNoEdgeSplits () const throw () |
| Returns the number of edge splits. | |
Adapting the input | |
| void | removeUnwishedEdges (NBDistrictCont &dc) |
| Removes unwished edges (not in keep-edges) | |
| void | splitGeometry (NBNodeCont &nc) |
| Splits edges into multiple if they have a complex geometry. | |
processing methods | |
| void | computeTurningDirections () throw () |
| Computes the turn-around directions for all edges. | |
| void | sortOutgoingLanesConnections () throw () |
| Sorts all lanes of all edges within the container by their direction. | |
| void | computeEdge2Edges (bool noLeftMovers) throw () |
| Computes for each edge the approached edges. | |
| void | computeLanes2Edges () throw () |
| Computes for each edge which lanes approach the next edges. | |
| void | recheckLanes () throw () |
| Rechecks whether all lanes have a successor for each of the stored edges. | |
| void | appendTurnarounds (bool noTLSControlled) throw () |
| Appends turnarounds to all edges stored in the container. | |
| void | appendTurnarounds (const std::set< std::string > &ids, bool noTLSControlled) |
| Appends turnarounds to all edges stored in the container Calls "NBEdge::appendTurnaround" for edges with the given ids. | |
| void | computeEdgeShapes () throw () |
| Computes the shapes of all edges stored in the container. | |
| void | recomputeLaneShapes () throw () |
| Computes the shapes of all lanes of all edges stored in the container. | |
| void | clearControllingTLInformation () const |
| Clears information about controlling traffic lights for all connenections of all edges. | |
| void | joinSameNodeConnectingEdges (NBDistrictCont &dc, NBTrafficLightLogicCont &tlc, EdgeVector edges) throw () |
| Joins the given edges because they connect the same nodes. | |
| void | recheckLaneSpread () throw () |
| Rechecks whether the lane spread is proper. | |
Private Types | |
| typedef std::map< std::string, NBEdge * > | EdgeCont |
| The type of the dictionary where an edge may be found by its id. | |
Private Member Functions | |
| EdgeVector | getGeneratedFrom (const std::string &id) const throw () |
| Returns the edges which have been built by splitting the edge of the given id. | |
| NBEdgeCont (const NBEdgeCont &s) | |
| invalidated copy constructor | |
| NBEdgeCont & | operator= (const NBEdgeCont &s) |
| invalidated assignment operator | |
Private Attributes | |
| bool | myAmLeftHanded |
| Whether the network is left-handed. | |
| EdgeCont | myEdges |
| The instance of the dictionary (id->edge) | |
| unsigned int | myEdgesSplit |
| the number of splits of edges during the building | |
| EdgeCont | myExtractedEdges |
| The extracted nodes which are kept for reference. | |
| std::set< std::string > | myIgnoredEdges |
| The ids of ignored edges. | |
| NBTypeCont & | myTypeCont |
| The network builder; used to obtain type information. | |
Settings for accepting/dismissing edges | |
| SUMOReal | myEdgesMinSpeed |
| The minimum speed an edge may have in order to be kept (default: -1) | |
| bool | myRemoveEdgesAfterJoining |
| Whether edges shall be joined first, then removed. | |
| std::set< std::string > | myEdges2Keep |
| Set of ids of edges which shall explicitly be kept. | |
| std::set< std::string > | myEdges2Remove |
| Set of ids of edges which shall explicitly be removed. | |
| SUMOVehicleClasses | myVehicleClasses2Keep |
| Set of vehicle types which must be allowed on edges in order to keep them. | |
| SUMOVehicleClasses | myVehicleClasses2Remove |
| Set of vehicle types which must not be disallowed on edges in order to keep them. | |
| PositionVector | myPrunningBoundary |
| Boundary within which an edge must be located in order to be kept. | |
Storage for edges, including some functionality operating on multiple edges.
Definition at line 63 of file NBEdgeCont.h.
typedef std::map<std::string, NBEdge*> NBEdgeCont::EdgeCont [private] |
The type of the dictionary where an edge may be found by its id.
Definition at line 465 of file NBEdgeCont.h.
| NBEdgeCont::NBEdgeCont | ( | NBTypeCont & | tc | ) | throw () |
Constructor.
| [in] | tc | The net builded; used to obtain types |
Definition at line 64 of file NBEdgeCont.cpp.
| NBEdgeCont::~NBEdgeCont | ( | ) | throw () |
| NBEdgeCont::NBEdgeCont | ( | const NBEdgeCont & | s | ) | [private] |
invalidated copy constructor
| void NBEdgeCont::appendTurnarounds | ( | bool | noTLSControlled | ) | throw () |
Appends turnarounds to all edges stored in the container.
Calls "NBEdge::appendTurnaround" for all edges within the container.
| [in] | noTLSControlled | Whether the turnaround shall not be connected if the edge is controlled by a tls |
Definition at line 539 of file NBEdgeCont.cpp.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::appendTurnarounds | ( | const std::set< std::string > & | ids, |
| bool | noTLSControlled | ||
| ) |
Appends turnarounds to all edges stored in the container Calls "NBEdge::appendTurnaround" for edges with the given ids.
| [in] | ids | The list of ids for which to append a turnaround |
| [in] | noTLSControlled | Whether the turnaround shall not be connected if the edge is controlled by a tls |
Definition at line 547 of file NBEdgeCont.cpp.
References myEdges.
| void NBEdgeCont::applyOptions | ( | OptionsCont & | oc | ) |
Initialises the storage by applying given options.
Options, mainly steering the acceptance of edges, are parsed and the according internal variables are set.
| [in] | oc | The options container to read options from |
Definition at line 74 of file NBEdgeCont.cpp.
References OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getStringVector(), getVehicleClassID(), OptionsCont::isSet(), myAmLeftHanded, myEdges2Keep, myEdges2Remove, myEdgesMinSpeed, myPrunningBoundary, myRemoveEdgesAfterJoining, myVehicleClasses2Keep, myVehicleClasses2Remove, PositionVector::push_back(), and SUMOReal.
| std::map<std::string, NBEdge*>::const_iterator NBEdgeCont::begin | ( | ) | const [inline] |
Returns the pointer to the begin of the stored edges.
Definition at line 174 of file NBEdgeCont.h.
References myEdges.
Referenced by NBNetBuilder::compute(), guessRoundabouts(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), and NWWriter_XML::writeTrafficLights().
| void NBEdgeCont::clear | ( | ) | throw () |
Deletes all edges.
Definition at line 126 of file NBEdgeCont.cpp.
References myEdges, and myExtractedEdges.
Referenced by ~NBEdgeCont().
| void NBEdgeCont::clearControllingTLInformation | ( | ) | const |
Clears information about controlling traffic lights for all connenections of all edges.
Definition at line 499 of file NBEdgeCont.cpp.
References myEdges.
| void NBEdgeCont::computeEdge2Edges | ( | bool | noLeftMovers | ) | throw () |
Computes for each edge the approached edges.
Calls "NBEdge::computeEdge2Edges" for all edges within the container.
| [in] | noLeftMovers | Whether left-moving connections shall be omitted |
Definition at line 515 of file NBEdgeCont.cpp.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::computeEdgeShapes | ( | ) | throw () |
Computes the shapes of all edges stored in the container.
Calls "NBEdge::computeEdgeShape" for all edges within the container.
Recheck whether a visitor-pattern should be used herefor
Recheck usage
Definition at line 555 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::computeLanes2Edges | ( | ) | throw () |
Computes for each edge which lanes approach the next edges.
Calls "NBEdge::computeLanes2Edges" for all edges within the container.
Definition at line 523 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::computeTurningDirections | ( | ) | throw () |
Computes the turn-around directions for all edges.
Calls "NBEdge::computeTurningDirections" for all edges within the container.
Definition at line 491 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| std::map<std::string, NBEdge*>::const_iterator NBEdgeCont::end | ( | ) | const [inline] |
Returns the pointer to the end of the stored edges.
Definition at line 182 of file NBEdgeCont.h.
References myEdges.
Referenced by NBNetBuilder::compute(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), and NWWriter_XML::writeTrafficLights().
| void NBEdgeCont::erase | ( | NBDistrictCont & | dc, |
| NBEdge * | edge | ||
| ) | throw () |
Removes the given edge from the container (deleting it)
| [in] | dc | The district container, in order to remove the edge from sources/sinks |
| [in] | edge | The edge to remove |
Definition at line 324 of file NBEdgeCont.cpp.
Referenced by NIXMLEdgesHandler::addEdge(), NBNodeCont::remapEdge(), NBNode::removeDummyEdges(), NBNodeCont::removeIsolatedRoads(), removeUnwishedEdges(), and NBNodeCont::removeUnwishedNodes().
| void NBEdgeCont::extract | ( | NBDistrictCont & | dc, |
| NBEdge * | edge, | ||
| bool | remember = false |
||
| ) |
Removes the given edge from the container like erase but does not delete it.
| [in] | dc | The district container, in order to remove the edge from sources/sinks |
| [in] | edge | The edge to remove |
| [in] | remember | Whether to keep this edge for future reference |
Definition at line 331 of file NBEdgeCont.cpp.
References Named::getID(), myEdges, myExtractedEdges, NBEdge::myFrom, NBEdge::myTo, NBNode::removeEdge(), and NBDistrictCont::removeFromSinksAndSources().
Referenced by NIXMLEdgesHandler::deleteEdge().
| std::vector< std::string > NBEdgeCont::getAllNames | ( | ) | const throw () |
Returns all ids of known edges.
Definition at line 451 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBJoinedEdgesMap::init(), and NBNodeCont::removeIsolatedRoads().
| EdgeVector NBEdgeCont::getGeneratedFrom | ( | const std::string & | id | ) | const throw () [private] |
Returns the edges which have been built by splitting the edge of the given id.
| [in] | id | The id of the original edge |
Definition at line 670 of file NBEdgeCont.cpp.
| unsigned int NBEdgeCont::getNoEdgeSplits | ( | ) | const throw () [inline] |
Returns the number of edge splits.
Definition at line 273 of file NBEdgeCont.h.
References myEdgesSplit.
Referenced by NILoader::load().
| void NBEdgeCont::guessRoundabouts | ( | std::vector< std::set< NBEdge * > > & | marked | ) | throw () |
Determines which edges belong to roundabouts and increases their priority.
| [out] | marked | Edges which belong to a roundabout are stored here |
Definition at line 712 of file NBEdgeCont.cpp.
References begin(), NBNode::getConnectionTo(), NBNode::getEdges(), NBEdge::getFromNode(), NBNode::getIncomingEdges(), NBEdge::getToNode(), NBEdge::getTurnDestination(), NBEdge::LANES2LANES_USER, myEdges, and NBContHelper::nextCW().
Referenced by NBNetBuilder::compute().
Adds an edge to the dictionary.
First, it is determined whether the edge shall not be discarded due to any reasons (being outside a boundary, or not in the optional list of edges to import, etc.). If so, the edge is deleted and "true" is returned. "true" is also returned if the edge is accepted - no edge with the same name exists within this container. If another edge with the same name exists, false is returned.
| [in] | edge | The edge to add |
| [in] | ignorePrunning | Whether this edge must not be prunned |
Definition at line 141 of file NBEdgeCont.cpp.
References OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getOptions(), POSITION_EPS, and SUMOReal.
Referenced by NIImporter_SUMO::_loadNetwork(), NIVissimDistrictConnection::dict_BuildDistricts(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIImporter_RobocupRescue::loadEdges(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Edges(), NBNodeCont::remapEdge(), NBEdge::splitGeometry(), and NGNet::toNB().
| bool NBEdgeCont::isLeftHanded | ( | ) | const throw () [inline] |
Returns whether the built edges are left-handed.
Definition at line 433 of file NBEdgeCont.h.
References myAmLeftHanded.
Referenced by NBNode::computeLogic().
| void NBEdgeCont::joinSameNodeConnectingEdges | ( | NBDistrictCont & | dc, |
| NBTrafficLightLogicCont & | tlc, | ||
| EdgeVector | edges | ||
| ) | throw () |
Joins the given edges because they connect the same nodes.
| [in] | dc | The district container needed to remove edges |
| [in] | tlc | The tls container needed to remove edges |
| [in] | edges | The edges to join |
Definition at line 571 of file NBEdgeCont.cpp.
References NBEdge::addEdge2EdgeConnection(), Named::getID(), MAX2(), NBEdge::moveOutgoingConnectionsFrom(), NBNode::replaceIncoming(), NBNode::replaceOutgoing(), SUMOReal, NBEdge::UNSPECIFIED_OFFSET, and NBEdge::UNSPECIFIED_WIDTH.
Referenced by NBNodeCont::joinDoubleNodeConnections().
| NBEdgeCont& NBEdgeCont::operator= | ( | const NBEdgeCont & | s | ) | [private] |
invalidated assignment operator
| void NBEdgeCont::recheckLanes | ( | ) | throw () |
Rechecks whether all lanes have a successor for each of the stored edges.
Calls "NBEdge::recheckLanes" for all edges within the container.
Definition at line 531 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::recheckLaneSpread | ( | ) | throw () |
Rechecks whether the lane spread is proper.
Definition at line 649 of file NBEdgeCont.cpp.
References LANESPREAD_CENTER, LANESPREAD_RIGHT, and myEdges.
Referenced by NIImporter_DlrNavteq::loadNetwork().
| void NBEdgeCont::recomputeLaneShapes | ( | ) | throw () |
Computes the shapes of all lanes of all edges stored in the container.
Calls "NBEdge::computeLaneShapes" for all edges within the container.
Recheck whether a visitor-pattern should be used herefor
Recheck usage
Definition at line 563 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| void NBEdgeCont::removeUnwishedEdges | ( | NBDistrictCont & | dc | ) |
Removes unwished edges (not in keep-edges)
| in,opt. | changed] dc The district container needed to remove edges |
Definition at line 462 of file NBEdgeCont.cpp.
References erase(), NBEdge::getFromNode(), Named::getID(), NBEdge::getToNode(), myEdges, myEdges2Keep, and NBNode::removeEdge().
Referenced by NBNetBuilder::compute().
| NBEdge * NBEdgeCont::retrieve | ( | const std::string & | id, |
| bool | retrieveExtracted = false |
||
| ) | const throw () |
Returns the edge that has the given id.
If no edge that has the given id is known, 0 is returned.
| [in] | id | The id of the edge to retrieve |
| [in] | bool | Whether extracted edges shall be retrieved as well |
Definition at line 226 of file NBEdgeCont.cpp.
Referenced by NIImporter_SUMO::_loadNetwork(), NIImporter_OpenDrive::addE2EConnectionsSecure(), NIXMLEdgesHandler::addEdge(), NIVissimDisturbance::addToNode(), NIImporter_OpenDrive::addViaConnectionSecure(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBConnection::checkFrom(), NBConnection::checkTo(), NIXMLEdgesHandler::deleteEdge(), NIVissimDistrictConnection::dict_BuildDistricts(), NBNodeCont::guessRamps(), NBJoinedEdgesMap::init(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NBNodeCont::removeIsolatedRoads(), and NIXMLTrafficLightsHandler::retrieveEdge().
| NBEdge * NBEdgeCont::retrievePossiblySplitted | ( | const std::string & | id, |
| SUMOReal | pos | ||
| ) | const throw () |
Tries to retrieve an edge, even if it is splitted.
To describe which part of the edge shall be returned, a position hint is supplied.
| [in] | id | The id of the edge to retrieve |
| [in] | pos | An additional about the position of the basic edge's subpart |
Definition at line 279 of file NBEdgeCont.cpp.
References NBEdge::getLength(), MAX2(), and SUMOReal.
| NBEdge * NBEdgeCont::retrievePossiblySplitted | ( | const std::string & | id, |
| const std::string & | hint, | ||
| bool | incoming | ||
| ) | const throw () |
Tries to retrieve an edge, even if it is splitted.
To describe which part of the edge shall be returned, the id of a second edge, participating at the node and the information whether to return the outgoing or the incoming is needed.
| [in] | id | The id of the edge to retrieve |
| [in] | hint | An additional information which helps to retrieve the correct edge |
| [in] | incoming | Whether the edge to find is an incoming edge at the node "hint" participates |
Definition at line 243 of file NBEdgeCont.cpp.
References NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBEdge::myFrom, and NBEdge::myTo.
Referenced by NIVissimTL::NIVissimTLSignal::addTo(), NIVissimDisturbance::addToNode(), NIVissimConnection::buildEdgeConnections(), NBConnection::checkFrom(), NBConnection::checkTo(), and NIVissimDistrictConnection::dict_BuildDistricts().
| unsigned int NBEdgeCont::size | ( | ) | const throw () [inline] |
Returns the number of edges.
Definition at line 258 of file NBEdgeCont.h.
References myEdges.
Referenced by NILoader::load(), and main().
| void NBEdgeCont::sortOutgoingLanesConnections | ( | ) | throw () |
Sorts all lanes of all edges within the container by their direction.
Calls "NBEdge::sortOutgoingLanesConnections" for all edges within the container.
Definition at line 507 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| bool NBEdgeCont::splitAt | ( | NBDistrictCont & | dc, |
| NBEdge * | edge, | ||
| SUMOReal | edgepos, | ||
| NBNode * | node, | ||
| const std::string & | firstEdgeName, | ||
| const std::string & | secondEdgeName, | ||
| unsigned int | noLanesFirstEdge, | ||
| unsigned int | noLanesSecondEdge | ||
| ) | throw (ProcessError) |
Splits the edge at the position nearest to the given node using the given modifications.
| [in] | dc | The district container, in order to remove/add the edge from/to sources/sinks |
| [in] | edge | The edge to split |
| [in] | node | The node to split the edge at |
| [in] | firstEdgeName | The id the first part of the split edge shall have |
| [in] | secondEdgeName | The id the second part of the split edge shall have |
| [in] | noLanesFirstEdge | The number of lanes the second part of the split edge shall have |
| [in] | noLanesSecondEdge | The number of lanes the second part of the split edge shall have |
| ProcessError | If connections between the edges can not be built |
Definition at line 372 of file NBEdgeCont.cpp.
References NBEdge::addLane2LaneConnection(), NBEdge::copyConnectionsFrom(), Named::getID(), NBEdge::getNumLanes(), NBEdge::L2L_COMPUTED, and NBEdge::setLaneSpeed().
| bool NBEdgeCont::splitAt | ( | NBDistrictCont & | dc, |
| NBEdge * | edge, | ||
| NBNode * | node | ||
| ) | throw (ProcessError) |
Splits the edge at the position nearest to the given node.
Uses "splitAt(NBDistrictCont &, NBEdge *, NBNode *, const std::string &, const std::string &, unsigned int , unsigned int)" to perform the split; the edge names are built by appending "[0]" and "[1]", respectively. Both edges will have the same number of lanes.
| [in] | dc | The district container, in order to remove/add the edge from/to sources/sinks |
| [in] | edge | The edge to split |
| [in] | node | The node to split the edge at |
| ProcessError | If connections between the edges can not be built |
Definition at line 345 of file NBEdgeCont.cpp.
Referenced by NIVissimDisturbance::addToNode(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), and NIImporter_VISUM::parse_Lanes().
| bool NBEdgeCont::splitAt | ( | NBDistrictCont & | dc, |
| NBEdge * | edge, | ||
| NBNode * | node, | ||
| const std::string & | firstEdgeName, | ||
| const std::string & | secondEdgeName, | ||
| unsigned int | noLanesFirstEdge, | ||
| unsigned int | noLanesSecondEdge | ||
| ) | throw (ProcessError) |
Splits the edge at the position nearest to the given node using the given modifications.
Determines the position of the split by finding the nearest position on the edge to the given node. If this position is too near to the edges begin/end, false is returned.
Otherwise, "splitAt(NBDistrictCont &, NBEdge *, SUMOReal, NBNode *, const std::string &, const std::string &, unsigned int , unsigned int)" is used to perform the split.
| [in] | dc | The district container, in order to remove/add the edge from/to sources/sinks |
| [in] | edge | The edge to split |
| [in] | node | The node to split the edge at |
| [in] | firstEdgeName | The id the first part of the split edge shall have |
| [in] | secondEdgeName | The id the second part of the split edge shall have |
| [in] | noLanesFirstEdge | The number of lanes the second part of the split edge shall have |
| [in] | noLanesSecondEdge | The number of lanes the second part of the split edge shall have |
| ProcessError | If connections between the edges can not be built |
Definition at line 352 of file NBEdgeCont.cpp.
References GeomHelper::nearest_position_on_line_to_point(), and SUMOReal.
| void NBEdgeCont::splitGeometry | ( | NBNodeCont & | nc | ) |
Splits edges into multiple if they have a complex geometry.
Calls "NBEdge::splitGeometry" for all edges within the container which have more than three positions in their geometry.
| [in] | nc | The node container needed to build (geometry) nodes |
Definition at line 479 of file NBEdgeCont.cpp.
References myEdges.
Referenced by NBNetBuilder::compute().
| bool NBEdgeCont::wasIgnored | ( | std::string | id | ) | const throw () [inline] |
Returns whether the edge with the id was ignored during parsing.
Definition at line 441 of file NBEdgeCont.h.
References myIgnoredEdges.
| bool NBEdgeCont::wasRemoved | ( | std::string | id | ) | const throw () [inline] |
Returns whether the edge with the id was deleted explicitly.
Definition at line 448 of file NBEdgeCont.h.
References myExtractedEdges.
bool NBEdgeCont::myAmLeftHanded [private] |
Whether the network is left-handed.
Definition at line 480 of file NBEdgeCont.h.
Referenced by applyOptions(), and isLeftHanded().
EdgeCont NBEdgeCont::myEdges [private] |
The instance of the dictionary (id->edge)
Definition at line 468 of file NBEdgeCont.h.
Referenced by appendTurnarounds(), begin(), clear(), clearControllingTLInformation(), computeEdgeShapes(), computeLanes2Edges(), computeTurningDirections(), end(), extract(), getAllNames(), guessRoundabouts(), recheckLanes(), recheckLaneSpread(), recomputeLaneShapes(), removeUnwishedEdges(), size(), sortOutgoingLanesConnections(), and splitGeometry().
std::set<std::string> NBEdgeCont::myEdges2Keep [private] |
Set of ids of edges which shall explicitly be kept.
Definition at line 493 of file NBEdgeCont.h.
Referenced by applyOptions(), and removeUnwishedEdges().
std::set<std::string> NBEdgeCont::myEdges2Remove [private] |
Set of ids of edges which shall explicitly be removed.
Definition at line 496 of file NBEdgeCont.h.
Referenced by applyOptions().
SUMOReal NBEdgeCont::myEdgesMinSpeed [private] |
The minimum speed an edge may have in order to be kept (default: -1)
Definition at line 487 of file NBEdgeCont.h.
Referenced by applyOptions().
unsigned int NBEdgeCont::myEdgesSplit [private] |
the number of splits of edges during the building
Definition at line 477 of file NBEdgeCont.h.
Referenced by getNoEdgeSplits().
EdgeCont NBEdgeCont::myExtractedEdges [private] |
The extracted nodes which are kept for reference.
Definition at line 471 of file NBEdgeCont.h.
Referenced by clear(), extract(), and wasRemoved().
std::set<std::string> NBEdgeCont::myIgnoredEdges [private] |
PositionVector NBEdgeCont::myPrunningBoundary [private] |
Boundary within which an edge must be located in order to be kept.
Definition at line 505 of file NBEdgeCont.h.
Referenced by applyOptions().
bool NBEdgeCont::myRemoveEdgesAfterJoining [private] |
Whether edges shall be joined first, then removed.
Definition at line 490 of file NBEdgeCont.h.
Referenced by applyOptions().
NBTypeCont& NBEdgeCont::myTypeCont [private] |
The network builder; used to obtain type information.
Definition at line 511 of file NBEdgeCont.h.
Set of vehicle types which must be allowed on edges in order to keep them.
Definition at line 499 of file NBEdgeCont.h.
Referenced by applyOptions().
Set of vehicle types which must not be disallowed on edges in order to keep them.
Definition at line 502 of file NBEdgeCont.h.
Referenced by applyOptions().