SUMO - Simulation of Urban MObility
NBEdgeCont Class Reference

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 ()
 Deletes all edges.
void guessRoundabouts (std::vector< std::set< NBEdge * > > &marked)
 Determines which edges belong to roundabouts and increases their priority.
bool isLeftHanded () const
 Returns whether the built edges are left-handed.
 NBEdgeCont (NBTypeCont &tc)
 Constructor.
void rename (NBEdge *edge, const std::string &newID)
 Renames the edge. Throws exception if newID already exists.
bool wasIgnored (std::string id) const
 Returns whether the edge with the id was ignored during parsing.
bool wasRemoved (std::string id) const
 Returns whether the edge with the id was deleted explicitly.
 ~NBEdgeCont ()
 Destructor.
edge access methods
bool insert (NBEdge *edge, bool ignorePrunning=false)
 Adds an edge to the dictionary.
NBEdgeretrieve (const std::string &id, bool retrieveExtracted=false) const
 Returns the edge that has the given id.
NBEdgeretrievePossiblySplitted (const std::string &id, const std::string &hint, bool incoming) const
 Tries to retrieve an edge, even if it is splitted.
NBEdgeretrievePossiblySplitted (const std::string &id, SUMOReal pos) const
 Tries to retrieve an edge, even if it is splitted.
void erase (NBDistrictCont &dc, NBEdge *edge)
 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)
 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)
 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)
 Splits the edge at the position nearest to the given node using the given modifications.
container access methods
unsigned int size () const
 Returns the number of edges.
std::vector< std::string > getAllNames () const
 Returns all ids of known edges.
unsigned int getNoEdgeSplits () const
 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 sortOutgoingLanesConnections ()
 Sorts all lanes of all edges within the container by their direction.
void computeEdge2Edges (bool noLeftMovers)
 Computes for each edge the approached edges.
void computeLanes2Edges ()
 Computes for each edge which lanes approach the next edges.
void recheckLanes ()
 Rechecks whether all lanes have a successor for each of the stored edges.
void appendTurnarounds (bool noTLSControlled)
 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 ()
 Computes the shapes of all edges stored in the container.
void recomputeLaneShapes ()
 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)
 Joins the given edges because they connect the same nodes.
void recheckLaneSpread ()
 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
 Returns the edges which have been built by splitting the edge of the given id.
bool ignoreFilterMatch (NBEdge *edge)
 Returns true if this edge matches one of the removal criteria.
 NBEdgeCont (const NBEdgeCont &s)
 invalidated copy constructor
NBEdgeContoperator= (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.
NBTypeContmyTypeCont
 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.
SVCPermissions myVehicleClasses2Keep
 Set of vehicle types which must be allowed on edges in order to keep them.
SVCPermissions myVehicleClasses2Remove
 Set of vehicle types which need not be supported (edges which allow ONLY these are removed)
std::set< std::string > myTypes2Keep
 Set of edges types which shall be kept.
std::set< std::string > myTypes2Remove
 Set of edges types which shall be removed.
PositionVector myPrunningBoundary
 Boundary within which an edge must be located in order to be kept.

Detailed Description

Storage for edges, including some functionality operating on multiple edges.

Definition at line 66 of file NBEdgeCont.h.


Member Typedef Documentation

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 466 of file NBEdgeCont.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
[in]tcThe net builded; used to obtain types

Definition at line 69 of file NBEdgeCont.cpp.

Destructor.

Definition at line 77 of file NBEdgeCont.cpp.

References clear().

NBEdgeCont::NBEdgeCont ( const NBEdgeCont s) [private]

invalidated copy constructor


Member Function Documentation

void NBEdgeCont::appendTurnarounds ( bool  noTLSControlled)

Appends turnarounds to all edges stored in the container.

Calls "NBEdge::appendTurnaround" for all edges within the container.

Parameters:
[in]noTLSControlledWhether the turnaround shall not be connected if the edge is controlled by a tls
Todo:
Recheck whether a visitor-pattern should be used herefor
See also:
NBEdge::appendTurnaround

Definition at line 551 of file NBEdgeCont.cpp.

References myEdges.

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.

Parameters:
[in]idsThe list of ids for which to append a turnaround
[in]noTLSControlledWhether the turnaround shall not be connected if the edge is controlled by a tls
See also:
NBEdge::appendTurnaround

Definition at line 559 of file NBEdgeCont.cpp.

References myEdges.

Initialises the storage by applying given options.

Options, mainly steering the acceptance of edges, are parsed and the according internal variables are set.

Parameters:
[in]ocThe options container to read options from
Todo:
Recheck exceptions

Definition at line 83 of file NBEdgeCont.cpp.

References OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getStringVector(), getVehicleClassID(), OptionsCont::isSet(), myAmLeftHanded, myEdges2Keep, myEdges2Remove, myEdgesMinSpeed, myPrunningBoundary, myRemoveEdgesAfterJoining, myTypes2Keep, myTypes2Remove, myVehicleClasses2Keep, myVehicleClasses2Remove, PositionVector::push_back(), and SUMOReal.

Referenced by NBNetBuilder::applyOptions().

std::map<std::string, NBEdge*>::const_iterator NBEdgeCont::begin ( ) const [inline]

Returns the pointer to the begin of the stored edges.

Returns:
The iterator to the beginning of stored edges

Definition at line 177 of file NBEdgeCont.h.

References myEdges.

Referenced by NBNetBuilder::compute(), guessRoundabouts(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeTrafficLights().

Deletes all edges.

Definition at line 146 of file NBEdgeCont.cpp.

References myEdges, and myExtractedEdges.

Referenced by ~NBEdgeCont().

Clears information about controlling traffic lights for all connenections of all edges.

Definition at line 511 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBTrafficLightLogicCont::setTLControllingInformation().

void NBEdgeCont::computeEdge2Edges ( bool  noLeftMovers)

Computes for each edge the approached edges.

Calls "NBEdge::computeEdge2Edges" for all edges within the container.

Parameters:
[in]noLeftMoversWhether left-moving connections shall be omitted
Todo:
Recheck whether a visitor-pattern should be used herefor
See also:
NBEdge::computeEdge2Edges

Definition at line 527 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

Computes the shapes of all edges stored in the container.

Calls "NBEdge::computeEdgeShape" for all edges within the container.

Todo:

Recheck whether a visitor-pattern should be used herefor

Recheck usage

See also:
NBEdge::computeEdgeShape

Definition at line 567 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

Computes for each edge which lanes approach the next edges.

Calls "NBEdge::computeLanes2Edges" for all edges within the container.

Todo:
Recheck whether a visitor-pattern should be used herefor
See also:
NBEdge::computeLanes2Edges

Definition at line 535 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.

Returns:
The iterator to the end of stored edges

Definition at line 185 of file NBEdgeCont.h.

References myEdges.

Referenced by NBNetBuilder::compute(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeTrafficLights().

void NBEdgeCont::erase ( NBDistrictCont dc,
NBEdge edge 
)

Removes the given edge from the container (deleting it)

Parameters:
[in]dcThe district container, in order to remove the edge from sources/sinks
[in]edgeThe edge to remove
Todo:
Recheck whether the district cont is needed - if districts are processed using an external tool

Definition at line 334 of file NBEdgeCont.cpp.

References extract().

Referenced by NIXMLEdgesHandler::addEdge(), NBNodeCont::joinNodeClusters(), joinSameNodeConnectingEdges(), NBNodeCont::removeIsolatedRoads(), NBNode::removeSelfLoops(), removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), and splitAt().

void NBEdgeCont::extract ( NBDistrictCont dc,
NBEdge edge,
bool  remember = false 
)

Removes the given edge from the container like erase but does not delete it.

Parameters:
[in]dcThe district container, in order to remove the edge from sources/sinks
[in]edgeThe edge to remove
[in]rememberWhether to keep this edge for future reference
Todo:
Recheck whether the district cont is needed - if districts are processed using an external tool

Definition at line 341 of file NBEdgeCont.cpp.

References Named::getID(), myEdges, myExtractedEdges, NBEdge::myFrom, NBEdge::myTo, NBNode::removeEdge(), and NBDistrictCont::removeFromSinksAndSources().

Referenced by NIXMLEdgesHandler::deleteEdge(), and erase().

std::vector< std::string > NBEdgeCont::getAllNames ( ) const

Returns all ids of known edges.

Returns:
All ids of known edges
Todo:
Recheck usage, probably, filling a given vector would be better...

Definition at line 471 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBJoinedEdgesMap::init(), and NBNodeCont::removeIsolatedRoads().

EdgeVector NBEdgeCont::getGeneratedFrom ( const std::string &  id) const [private]

Returns the edges which have been built by splitting the edge of the given id.

Parameters:
[in]idThe id of the original edge
Returns:
List of all edges which have been built by splitting the original edge
Todo:
Recheck usage

Definition at line 682 of file NBEdgeCont.cpp.

References myEdges.

Referenced by retrievePossiblySplitted().

unsigned int NBEdgeCont::getNoEdgeSplits ( ) const [inline]

Returns the number of edge splits.

Returns:
How often an edge was split

Definition at line 276 of file NBEdgeCont.h.

References myEdgesSplit.

Referenced by NILoader::load().

void NBEdgeCont::guessRoundabouts ( std::vector< std::set< NBEdge * > > &  marked)

Determines which edges belong to roundabouts and increases their priority.

Parameters:
[out]markedEdges which belong to a roundabout are stored here

Definition at line 724 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().

bool NBEdgeCont::insert ( NBEdge edge,
bool  ignorePrunning = false 
)

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.

Parameters:
[in]edgeThe edge to add
[in]ignorePrunningWhether this edge must not be prunned
Returns:
Whether the edge was valid (no edge with the same id is already known)

Definition at line 161 of file NBEdgeCont.cpp.

References NBEdge::dismissVehicleClassInformation(), OptionsCont::exists(), OptionsCont::getBool(), NBEdge::getFromNode(), Named::getID(), OptionsCont::getOptions(), NBEdge::getToNode(), ignoreFilterMatch(), myAmLeftHanded, myEdges, myIgnoredEdges, NBNode::removeEdge(), and NBEdge::setLeftHanded().

Referenced by NIImporter_SUMO::_loadNetwork(), NIVissimEdge::buildNBEdge(), NIVissimDistrictConnection::dict_BuildDistricts(), NIImporter_OpenStreetMap::insertEdge(), joinSameNodeConnectingEdges(), NIImporter_ArcView::load(), NIImporter_RobocupRescue::loadEdges(), NIImporter_OpenDrive::loadNetwork(), NIXMLEdgesHandler::myEndElement(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Edges(), splitAt(), NBEdge::splitGeometry(), and NGNet::toNB().

bool NBEdgeCont::isLeftHanded ( ) const [inline]

Returns whether the built edges are left-handed.

Returns:
Whether this edge container is left-handed

Definition at line 426 of file NBEdgeCont.h.

References myAmLeftHanded.

Referenced by NBNode::computeLogic().

Joins the given edges because they connect the same nodes.

Parameters:
[in]dcThe district container needed to remove edges
[in]tlcThe tls container needed to remove edges
[in]edgesThe edges to join
Todo:
Recheck and describe usage

Definition at line 583 of file NBEdgeCont.cpp.

References NBEdge::addEdge2EdgeConnection(), erase(), Named::getID(), insert(), MAX2(), NBEdge::moveOutgoingConnectionsFrom(), NBNode::replaceIncoming(), NBNode::replaceOutgoing(), NBTrafficLightLogicCont::replaceRemoved(), SUMOReal, NBEdge::UNSPECIFIED_OFFSET, and NBEdge::UNSPECIFIED_WIDTH.

Referenced by NBNodeCont::joinSimilarEdges().

NBEdgeCont& NBEdgeCont::operator= ( const NBEdgeCont s) [private]

invalidated assignment operator

Rechecks whether all lanes have a successor for each of the stored edges.

Calls "NBEdge::recheckLanes" for all edges within the container.

Todo:
Recheck whether a visitor-pattern should be used herefor
See also:
NBEdge::recheckLanes

Definition at line 543 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

Rechecks whether the lane spread is proper.

Todo:
Recheck usage; check whether this is really needed and whether it works at all

Definition at line 661 of file NBEdgeCont.cpp.

References LANESPREAD_CENTER, LANESPREAD_RIGHT, and myEdges.

Referenced by NIImporter_DlrNavteq::loadNetwork().

Computes the shapes of all lanes of all edges stored in the container.

Calls "NBEdge::computeLaneShapes" for all edges within the container.

Todo:

Recheck whether a visitor-pattern should be used herefor

Recheck usage

See also:
NBEdge::computeLaneShapes

Definition at line 575 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

Removes unwished edges (not in keep-edges)

Parameters:
in,opt.changed] dc The district container needed to remove edges
Todo:
Recheck usage; check whether keep-edges.postload is really useful

Definition at line 482 of file NBEdgeCont.cpp.

References erase(), NBEdge::getFromNode(), Named::getID(), NBEdge::getToNode(), myEdges, myEdges2Keep, and NBNode::removeEdge().

Referenced by NBNetBuilder::compute().

void NBEdgeCont::rename ( NBEdge edge,
const std::string &  newID 
)

Renames the edge. Throws exception if newID already exists.

Definition at line 353 of file NBEdgeCont.cpp.

References Named::getID(), myEdges, and Named::setID().

NBEdge * NBEdgeCont::retrieve ( const std::string &  id,
bool  retrieveExtracted = false 
) const
NBEdge * NBEdgeCont::retrievePossiblySplitted ( const std::string &  id,
const std::string &  hint,
bool  incoming 
) const

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.

Parameters:
[in]idThe id of the edge to retrieve
[in]hintAn additional information which helps to retrieve the correct edge
[in]incomingWhether the edge to find is an incoming edge at the node "hint" participates
Returns:
The searched edge
Todo:
Recheck usage

Definition at line 253 of file NBEdgeCont.cpp.

References getGeneratedFrom(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBEdge::myFrom, NBEdge::myTo, and retrieve().

Referenced by NIVissimTL::NIVissimTLSignal::addTo(), NIVissimDisturbance::addToNode(), NIVissimConnection::buildEdgeConnections(), NBConnection::checkFrom(), NBConnection::checkTo(), and NIVissimDistrictConnection::dict_BuildDistricts().

NBEdge * NBEdgeCont::retrievePossiblySplitted ( const std::string &  id,
SUMOReal  pos 
) const

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.

Parameters:
[in]idThe id of the edge to retrieve
[in]posAn additional about the position of the basic edge's subpart
Returns:
The searched edge
Todo:
Recheck usage

Definition at line 289 of file NBEdgeCont.cpp.

References NBEdge::getLength(), MAX2(), myEdges, retrieve(), and SUMOReal.

unsigned int NBEdgeCont::size ( ) const [inline]

Returns the number of edges.

Returns:
The number of edges stored in this container

Definition at line 261 of file NBEdgeCont.h.

References myEdges.

Referenced by NILoader::load(), and main().

Sorts all lanes of all edges within the container by their direction.

Calls "NBEdge::sortOutgoingLanesConnections" for all edges within the container.

Todo:
Recheck whether a visitor-pattern should be used herefor
See also:
NBEdge::sortOutgoingLanesConnections

Definition at line 519 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

bool NBEdgeCont::splitAt ( NBDistrictCont dc,
NBEdge edge,
NBNode node 
)

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.

Parameters:
[in]dcThe district container, in order to remove/add the edge from/to sources/sinks
[in]edgeThe edge to split
[in]nodeThe node to split the edge at
Returns:
Whether the edge could be split
Exceptions:
ProcessErrorIf connections between the edges can not be built
See also:
NBEdge::splitAt(NBDistrictCont &, NBEdge *, NBNode *, const std::string &, const std::string &, unsigned int , unsigned int)

Definition at line 365 of file NBEdgeCont.cpp.

References Named::getID(), and NBEdge::myLanes.

Referenced by NIVissimDisturbance::addToNode(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NIXMLEdgesHandler::myEndElement(), NIImporter_VISUM::parse_Lanes(), and splitAt().

bool NBEdgeCont::splitAt ( NBDistrictCont dc,
NBEdge edge,
NBNode node,
const std::string &  firstEdgeName,
const std::string &  secondEdgeName,
unsigned int  noLanesFirstEdge,
unsigned int  noLanesSecondEdge 
)

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.

Parameters:
[in]dcThe district container, in order to remove/add the edge from/to sources/sinks
[in]edgeThe edge to split
[in]nodeThe node to split the edge at
[in]firstEdgeNameThe id the first part of the split edge shall have
[in]secondEdgeNameThe id the second part of the split edge shall have
[in]noLanesFirstEdgeThe number of lanes the second part of the split edge shall have
[in]noLanesSecondEdgeThe number of lanes the second part of the split edge shall have
Returns:
Whether the edge could be split
Exceptions:
ProcessErrorIf connections between the edges can not be built
See also:
NBEdge::splitAt(NBDistrictCont &, NBEdge *, SUMOReal, NBNode *, const std::string &, const std::string &, unsigned int , unsigned int)

Definition at line 372 of file NBEdgeCont.cpp.

References NBEdge::getGeometry(), NBNode::getPosition(), PositionVector::length(), NBEdge::myFrom, NBEdge::myTo, GeomHelper::nearest_position_on_line_to_point2D(), PositionVector::nearest_position_on_line_to_point2D(), splitAt(), and SUMOReal.

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 
)

Splits the edge at the position nearest to the given node using the given modifications.

Parameters:
[in]dcThe district container, in order to remove/add the edge from/to sources/sinks
[in]edgeThe edge to split
[in]nodeThe node to split the edge at
[in]firstEdgeNameThe id the first part of the split edge shall have
[in]secondEdgeNameThe id the second part of the split edge shall have
[in]noLanesFirstEdgeThe number of lanes the second part of the split edge shall have
[in]noLanesSecondEdgeThe number of lanes the second part of the split edge shall have
Returns:
Whether the edge could be split
Exceptions:
ProcessErrorIf connections between the edges can not be built

Definition at line 392 of file NBEdgeCont.cpp.

References NBEdge::addLane2LaneConnection(), NBEdge::copyConnectionsFrom(), erase(), NBEdge::getGeometry(), Named::getID(), NBEdge::getLaneSpeed(), NBEdge::getNumLanes(), NBNode::getPosition(), NBEdge::getPriority(), NBEdge::getStreetName(), insert(), NBEdge::L2L_COMPUTED, myEdges2Keep, myEdges2Remove, myEdgesSplit, NBEdge::myFrom, NBEdge::myLaneSpreadFunction, NBEdge::myOffset, myRemoveEdgesAfterJoining, NBEdge::mySpeed, NBEdge::myTo, NBEdge::myType, NBEdge::myWidth, NBNode::removeDoubleEdges(), NBNode::replaceIncoming(), NBNode::replaceOutgoing(), NBEdge::setSpeed(), and PositionVector::splitAt().

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.

Parameters:
[in]ncThe node container needed to build (geometry) nodes
See also:
NBEdge::splitGeometry

Definition at line 499 of file NBEdgeCont.cpp.

References myEdges.

Referenced by NBNetBuilder::compute().

bool NBEdgeCont::wasIgnored ( std::string  id) const [inline]

Returns whether the edge with the id was ignored during parsing.

Returns:
Whether the edge with the id was ignored during parsing

Definition at line 434 of file NBEdgeCont.h.

References myIgnoredEdges.

Referenced by NIXMLConnectionsHandler::myStartElement().

bool NBEdgeCont::wasRemoved ( std::string  id) const [inline]

Returns whether the edge with the id was deleted explicitly.

Definition at line 441 of file NBEdgeCont.h.

References myExtractedEdges.

Referenced by NIXMLConnectionsHandler::myStartElement().


Field Documentation

Whether the network is left-handed.

Definition at line 481 of file NBEdgeCont.h.

Referenced by applyOptions(), insert(), and isLeftHanded().

std::set<std::string> NBEdgeCont::myEdges2Keep [private]

Set of ids of edges which shall explicitly be kept.

Definition at line 494 of file NBEdgeCont.h.

Referenced by applyOptions(), ignoreFilterMatch(), removeUnwishedEdges(), and splitAt().

std::set<std::string> NBEdgeCont::myEdges2Remove [private]

Set of ids of edges which shall explicitly be removed.

Definition at line 497 of file NBEdgeCont.h.

Referenced by applyOptions(), ignoreFilterMatch(), and splitAt().

The minimum speed an edge may have in order to be kept (default: -1)

Definition at line 488 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().

unsigned int NBEdgeCont::myEdgesSplit [private]

the number of splits of edges during the building

Definition at line 478 of file NBEdgeCont.h.

Referenced by getNoEdgeSplits(), and splitAt().

The extracted nodes which are kept for reference.

Definition at line 472 of file NBEdgeCont.h.

Referenced by clear(), extract(), retrieve(), and wasRemoved().

std::set<std::string> NBEdgeCont::myIgnoredEdges [private]

The ids of ignored edges.

Definition at line 475 of file NBEdgeCont.h.

Referenced by insert(), and wasIgnored().

Boundary within which an edge must be located in order to be kept.

Definition at line 512 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().

Whether edges shall be joined first, then removed.

Definition at line 491 of file NBEdgeCont.h.

Referenced by applyOptions(), ignoreFilterMatch(), and splitAt().

The network builder; used to obtain type information.

Definition at line 518 of file NBEdgeCont.h.

Referenced by ignoreFilterMatch().

std::set<std::string> NBEdgeCont::myTypes2Keep [private]

Set of edges types which shall be kept.

Definition at line 506 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().

std::set<std::string> NBEdgeCont::myTypes2Remove [private]

Set of edges types which shall be removed.

Definition at line 509 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().

Set of vehicle types which must be allowed on edges in order to keep them.

Definition at line 500 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().

Set of vehicle types which need not be supported (edges which allow ONLY these are removed)

Definition at line 503 of file NBEdgeCont.h.

Referenced by applyOptions(), and ignoreFilterMatch().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines