SUMO - Simulation of Urban MObility

NBNetBuilder Class Reference

Instance responsible for building networks. More...

#include <NBNetBuilder.h>

Data Structures

class  by_id_sorter
 Sorts nodes by their ids. More...

Public Member Functions

void applyOptions (OptionsCont &oc)
 Initialises the storage by applying given options.
void compute (OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool removeUnwishedNodes=true)
 Performs the network building steps.
 NBNetBuilder ()
 Constructor.
 ~NBNetBuilder ()
 Destructor.
Retrieval of subcontainers
NBEdgeCont & getEdgeCont ()
 Returns the edge container.
NBNodeCont & getNodeCont ()
 Returns the node container.
NBTypeCont & getTypeCont ()
 Returns the type container.
NBTrafficLightLogicCont & getTLLogicCont ()
 Returns the traffic light logics container.
NBDistrictCont & getDistrictCont ()
 Returns the districts container.
const std::vector< std::set
< NBEdge * > > & 
getRoundabouts () const
 Returns the determined roundabouts.
const NBJoinedEdgesMap & getJoinedEdgesMap () const
 Returns the joined edges map.

Protected Attributes

NBDistrictCont myDistrictCont
 The used container for districts.
NBEdgeCont myEdgeCont
 The used container for edges.
NBJoinedEdgesMap myJoinedEdges
 Map of joined edges.
NBNodeCont myNodeCont
 The used container for nodes.
std::vector< std::set< NBEdge * > > myRoundabouts
 Edges marked as belonging to a roundabout (each set is a roundabout)
NBTrafficLightLogicCont myTLLCont
 The used container for traffic light logics.
NBTypeCont myTypeCont
 The used container for street types.

Private Member Functions

 NBNetBuilder (const NBNetBuilder &s)
 invalidated copy constructor
NBNetBuilder & operator= (const NBNetBuilder &s)
 invalidated assignment operator

Friends

class GNENet

Detailed Description

Instance responsible for building networks.

The class' - and the netbuild module's - functionality is embedded within the compute() method.

Definition at line 112 of file NBNetBuilder.h.


Constructor & Destructor Documentation

NBNetBuilder::NBNetBuilder ( )

Constructor.

Definition at line 62 of file NBNetBuilder.cpp.

NBNetBuilder::~NBNetBuilder ( )

Destructor.

Definition at line 66 of file NBNetBuilder.cpp.

NBNetBuilder::NBNetBuilder ( const NBNetBuilder &  s) [private]

invalidated copy constructor


Member Function Documentation

void NBNetBuilder::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.

Parameters:
[in]ocThe options container to read options from
Exceptions:
ProcessErrorIf something fails (message is included)

Definition at line 70 of file NBNetBuilder.cpp.

References NBTrafficLightLogicCont::applyOptions(), NBEdgeCont::applyOptions(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getString(), OptionsCont::isSet(), myEdgeCont, myTLLCont, myTypeCont, OptionsCont::set(), and NBTypeCont::setDefaults().

Referenced by main().

void NBNetBuilder::compute ( OptionsCont &  oc,
const std::set< std::string > &  explicitTurnarounds = std::set<std::string>(),
bool  removeUnwishedNodes = true 
)

Performs the network building steps.

Parameters:
[in]ocContainer that contains options for building
[in]explicitTurnaroundsList of edge ids for which turn-arounds should be added (used by NETEDIT)
[in]removeUnwishedNodesWhether to remove orphan nodes (and optionally convert some nodes to geometry)
Exceptions:
ProcessError(recheck)

Definition at line 100 of file NBNetBuilder.cpp.

References NBNodeCont::addJoinExclusion(), NBEdgeCont::appendTurnarounds(), NBDistrictCont::begin(), NBEdgeCont::begin(), NBNodeCont::begin(), NBEdgeCont::computeEdge2Edges(), NBEdgeCont::computeEdgeShapes(), GeoConvHelper::computeFinal(), NBEdgeCont::computeLanes2Edges(), NBNodeCont::computeLanes2Lanes(), NBTrafficLightLogicCont::computeLogics(), NBNodeCont::computeLogics(), NBNodeCont::computeNodeShapes(), NBNodeCont::computeNodeTypes(), NBNodeCont::computePriorities(), NBEdgeCont::computeTurningDirections(), NBDistrictCont::end(), NBEdgeCont::end(), NBNodeCont::end(), OptionsCont::exists(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), OptionsCont::getFloat(), GeoConvHelper::getOffsetBase(), GeoConvHelper::getOrigBoundary(), GeoConvHelper::getProcessing(), OptionsCont::getStringVector(), gSuppressMessages, NBNodeCont::guessRamps(), NBEdgeCont::guessRoundabouts(), NBNodeCont::guessTLs(), NBJoinedEdgesMap::init(), OptionsCont::isDefault(), OptionsCont::isSet(), NBNodeCont::joinJunctions(), NBNodeCont::joinLoadedClusters(), NBNodeCont::joinSimilarEdges(), NBNodeCont::joinTLS(), GeoConvHelper::moveConvertedBy(), myDistrictCont, myEdgeCont, myJoinedEdges, myNodeCont, myRoundabouts, myTLLCont, myTypeCont, NBNodeCont::printBuiltNodesStatistics(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, NBEdgeCont::recheckLanes(), NBEdgeCont::recomputeLaneShapes(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBRequest::reportWarnings(), NBNodeCont::retrieve(), NBNodeCont::setAsTLControlled(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodeCont::sortNodesEdges(), NBEdgeCont::sortOutgoingLanesConnections(), NBEdgeCont::splitGeometry(), SUMOReal, toString(), WRITE_MESSAGE, WRITE_WARNING, Boundary::xmin(), and Boundary::ymin().

Referenced by main().

NBDistrictCont& NBNetBuilder::getDistrictCont ( ) [inline]
const NBJoinedEdgesMap& NBNetBuilder::getJoinedEdgesMap ( ) const [inline]

Returns the joined edges map.

Returns:
The map of joined edges

Definition at line 201 of file NBNetBuilder.h.

References myJoinedEdges.

Referenced by NWFrame::writeNetwork().

const std::vector<std::set<NBEdge*> >& NBNetBuilder::getRoundabouts ( ) const [inline]

Returns the determined roundabouts.

Returns:
The list of roundabout edges

Definition at line 193 of file NBNetBuilder.h.

References myRoundabouts.

Referenced by NWWriter_SUMO::writeNetwork().

NBTrafficLightLogicCont& NBNetBuilder::getTLLogicCont ( ) [inline]

Returns the traffic light logics container.

Returns:
The traffic light logics container (reference)

Definition at line 177 of file NBNetBuilder.h.

References myTLLCont.

Referenced by NIImporter_OpenStreetMap::_loadNetwork(), NGNode::buildNBNode(), NIImporter_VISUM::load(), NIImporter_DlrNavteq::loadNetwork(), NILoader::loadXML(), NIImporter_Vissim::postLoadBuild(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().

NBTypeCont& NBNetBuilder::getTypeCont ( ) [inline]
NBNetBuilder& NBNetBuilder::operator= ( const NBNetBuilder &  s) [private]

invalidated assignment operator


Friends And Related Function Documentation

friend class GNENet [friend]

Definition at line 113 of file NBNetBuilder.h.


Field Documentation

The used container for districts.

Definition at line 237 of file NBNetBuilder.h.

Referenced by compute(), and getDistrictCont().

The used container for edges.

Definition at line 231 of file NBNetBuilder.h.

Referenced by applyOptions(), compute(), and getEdgeCont().

Map of joined edges.

Definition at line 243 of file NBNetBuilder.h.

Referenced by compute(), and getJoinedEdgesMap().

The used container for nodes.

Definition at line 225 of file NBNetBuilder.h.

Referenced by compute(), and getNodeCont().

std::vector<std::set<NBEdge*> > NBNetBuilder::myRoundabouts [protected]

Edges marked as belonging to a roundabout (each set is a roundabout)

Definition at line 240 of file NBNetBuilder.h.

Referenced by compute(), and getRoundabouts().

The used container for traffic light logics.

Definition at line 234 of file NBNetBuilder.h.

Referenced by applyOptions(), compute(), and getTLLogicCont().

The used container for street types.

Definition at line 228 of file NBNetBuilder.h.

Referenced by applyOptions(), compute(), and getTypeCont().


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