SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
NBEdgeContgetEdgeCont ()
 Returns the edge container.
NBNodeContgetNodeCont ()
 Returns the node container.
NBTypeContgetTypeCont ()
 Returns the type container.
NBTrafficLightLogicContgetTLLogicCont ()
 Returns the traffic light logics container.
NBDistrictContgetDistrictCont ()
 Returns the districts container.
const std::vector< std::set
< NBEdge * > > & 
getRoundabouts () const
 Returns the determined roundabouts.
const NBJoinedEdgesMapgetJoinedEdgesMap () 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
NBNetBuilderoperator= (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 64 of file NBNetBuilder.cpp.

NBNetBuilder::~NBNetBuilder ( )

Destructor.

Definition at line 68 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 72 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 102 of file NBNetBuilder.cpp.

References NBNodeCont::addJoinExclusion(), NBEdgeCont::appendTurnarounds(), NBDistrictCont::begin(), NBNodeCont::begin(), NBEdgeCont::begin(), NBEdgeCont::computeEdge2Edges(), NBEdgePriorityComputer::computeEdgePriorities(), NBEdgeCont::computeEdgeShapes(), GeoConvHelper::computeFinal(), NBEdgeCont::computeLanes2Edges(), NBNodeCont::computeLanes2Lanes(), NBTrafficLightLogicCont::computeLogics(), NBNodeCont::computeLogics(), NBNodeCont::computeNodeShapes(), NBNodeTypeComputer::computeNodeTypes(), NBTurningDirectionsComputer::computeTurnDirections(), NBDistrictCont::end(), NBNodeCont::end(), NBEdgeCont::end(), OptionsCont::exists(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), OptionsCont::getFloat(), GeoConvHelper::getOffsetBase(), GeoConvHelper::getOrigBoundary(), GeoConvHelper::getProcessing(), OptionsCont::getStringVector(), 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, 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(), NBNodesEdgesSorter::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
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

NBDistrictCont NBNetBuilder::myDistrictCont
protected

The used container for districts.

Definition at line 237 of file NBNetBuilder.h.

Referenced by compute(), and getDistrictCont().

NBEdgeCont NBNetBuilder::myEdgeCont
protected

The used container for edges.

Definition at line 231 of file NBNetBuilder.h.

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

NBJoinedEdgesMap NBNetBuilder::myJoinedEdges
protected

Map of joined edges.

Definition at line 243 of file NBNetBuilder.h.

Referenced by compute(), and getJoinedEdgesMap().

NBNodeCont NBNetBuilder::myNodeCont
protected

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().

NBTrafficLightLogicCont NBNetBuilder::myTLLCont
protected

The used container for traffic light logics.

Definition at line 234 of file NBNetBuilder.h.

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

NBTypeCont NBNetBuilder::myTypeCont
protected

The used container for street types.

Definition at line 228 of file NBNetBuilder.h.

Referenced by applyOptions(), and getTypeCont().


The documentation for this class was generated from the following files: