Eclipse SUMO - Simulation of Urban MObility
NBPTStopCont Class Reference

#include <NBPTStopCont.h>

Public Member Functions

void addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into)
 add edges that must be kept More...
 
void alignIdSigns ()
 
void assignLanes (NBEdgeCont &cont)
 
std::map< std::string, NBPTStop * >::const_iterator begin () const
 Returns the pointer to the begin of the stored pt stops. More...
 
int cleanupDeleted (NBEdgeCont &cont)
 remove stops on non existing (removed) edges More...
 
std::map< std::string, NBPTStop * >::const_iterator end () const
 Returns the pointer to the end of the stored pt stops. More...
 
void findAccessEdgesForRailStops (NBEdgeCont &cont, double maxRadius, int maxCount, double accessFactor)
 
NBPTStopfindStop (const std::string &origEdgeID, Position pos, double threshold=1) const
 
int generateBidiStops (NBEdgeCont &cont)
 duplicate stops for superposed rail edges and return the number of generated stops More...
 
NBPTStopget (std::string id)
 Retrieve a previously inserted pt stop. More...
 
const std::map< std::string, NBPTStop * > & getStops () const
 
bool insert (NBPTStop *ptStop)
 Inserts a node into the map. More...
 
void localizePTStops (NBEdgeCont &cont)
 
void postprocess (std::set< std::string > &usedStops)
 
int size () const
 Returns the number of pt stops stored in this container. More...
 
 ~NBPTStopCont ()
 

Static Public Member Functions

static NBEdgegetReverseEdge (NBEdge *edge)
 

Private Types

typedef std::map< std::string, NBPTStop * > PTStopsCont
 Definition of the map of names to pt stops. More...
 

Private Member Functions

NBPTStopassignAndCreatNewPTStopAsNeeded (NBPTStop *pStop, NBEdgeCont &cont)
 
void assignPTStopToEdgeOfClosestPlatform (NBPTStop *pStop, NBEdgeCont &cont)
 
double computeCrossProductEdgePosition (const NBEdge *edge, const Position &closestPlatform) const
 
const NBPTPlatformgetClosestPlatformToPTStopPosition (NBPTStop *pStop)
 
NBPTStopgetReverseStop (NBPTStop *pStop, NBEdgeCont &cont)
 

Static Private Member Functions

static std::string getReverseID (const std::string &id)
 

Private Attributes

PTStopsCont myPTStops
 The map of names to pt stops. More...
 

Detailed Description

Definition at line 30 of file NBPTStopCont.h.

Member Typedef Documentation

◆ PTStopsCont

typedef std::map<std::string, NBPTStop*> NBPTStopCont::PTStopsCont
private

Definition of the map of names to pt stops.

Definition at line 93 of file NBPTStopCont.h.

Constructor & Destructor Documentation

◆ ~NBPTStopCont()

NBPTStopCont::~NBPTStopCont ( )

Definition at line 33 of file NBPTStopCont.cpp.

References myPTStops.

Member Function Documentation

◆ addEdges2Keep()

void NBPTStopCont::addEdges2Keep ( const OptionsCont oc,
std::set< std::string > &  into 
)

add edges that must be kept

Definition at line 319 of file NBPTStopCont.cpp.

References OptionsCont::isSet(), and myPTStops.

Referenced by NBRampsComputer::computeRamps(), and NBNodeCont::removeUnwishedNodes().

Here is the caller graph for this function:

◆ alignIdSigns()

void NBPTStopCont::alignIdSigns ( )

Definition at line 345 of file NBPTStopCont.cpp.

References getReverseID(), and myPTStops.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ assignAndCreatNewPTStopAsNeeded()

NBPTStop * NBPTStopCont::assignAndCreatNewPTStopAsNeeded ( NBPTStop pStop,
NBEdgeCont cont 
)
private

Definition at line 181 of file NBPTStopCont.cpp.

References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTPlatform::getLength(), NBPTStop::getPlatformCands(), getReverseEdge(), getReverseStop(), NBPTStop::setEdgeId(), and NBPTStop::setMyPTStopLength().

Referenced by localizePTStops().

Here is the caller graph for this function:

◆ assignLanes()

void NBPTStopCont::assignLanes ( NBEdgeCont cont)

Definition at line 98 of file NBPTStopCont.cpp.

References NBPTStop::findLaneAndComputeBusStopExtent(), NBEdgeCont::getGeneratedFrom(), myPTStops, and WRITE_WARNING.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ assignPTStopToEdgeOfClosestPlatform()

void NBPTStopCont::assignPTStopToEdgeOfClosestPlatform ( NBPTStop pStop,
NBEdgeCont cont 
)
private

Definition at line 216 of file NBPTStopCont.cpp.

References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), getClosestPlatformToPTStopPosition(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTPlatform::getLength(), NBPTPlatform::getPos(), getReverseEdge(), NBPTStop::setEdgeId(), and NBPTStop::setMyPTStopLength().

Referenced by localizePTStops().

Here is the caller graph for this function:

◆ begin()

std::map<std::string, NBPTStop*>::const_iterator NBPTStopCont::begin ( ) const
inline

Returns the pointer to the begin of the stored pt stops.

Returns
The iterator to the beginning of stored pt stops

Definition at line 53 of file NBPTStopCont.h.

References myPTStops.

Referenced by NBNodeCont::feasibleCluster(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().

Here is the caller graph for this function:

◆ cleanupDeleted()

int NBPTStopCont::cleanupDeleted ( NBEdgeCont cont)

remove stops on non existing (removed) edges

Parameters
cont

Definition at line 303 of file NBPTStopCont.cpp.

References NBEdgeCont::getByID(), myPTStops, and WRITE_WARNING.

Referenced by NBNetBuilder::compute(), and NIImporter_OpenStreetMap::load().

Here is the caller graph for this function:

◆ computeCrossProductEdgePosition()

double NBPTStopCont::computeCrossProductEdgePosition ( const NBEdge edge,
const Position closestPlatform 
) const
private

Definition at line 239 of file NBPTStopCont.cpp.

References NBEdge::getGeometry(), PositionVector::indexOfClosest(), PositionVector::nearest_offset_to_point2D(), PositionVector::offsetAtIndex2D(), WRITE_WARNING, Position::x(), and Position::y().

Referenced by assignAndCreatNewPTStopAsNeeded(), and assignPTStopToEdgeOfClosestPlatform().

Here is the caller graph for this function:

◆ end()

std::map<std::string, NBPTStop*>::const_iterator NBPTStopCont::end ( ) const
inline

Returns the pointer to the end of the stored pt stops.

Returns
The iterator to the end of stored pt stops

Definition at line 60 of file NBPTStopCont.h.

References myPTStops.

Referenced by NBNodeCont::feasibleCluster(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().

Here is the caller graph for this function:

◆ findAccessEdgesForRailStops()

void NBPTStopCont::findAccessEdgesForRailStops ( NBEdgeCont cont,
double  maxRadius,
int  maxCount,
double  accessFactor 
)

Definition at line 364 of file NBPTStopCont.cpp.

References Position::distanceTo2D(), NBEdgeCont::getByID(), NBEdge::getPermissions(), NamedRTree::Insert(), myPTStops, NamedRTree::Search(), SVC_PEDESTRIAN, Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ findStop()

NBPTStop * NBPTStopCont::findStop ( const std::string &  origEdgeID,
Position  pos,
double  threshold = 1 
) const

Definition at line 417 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ generateBidiStops()

int NBPTStopCont::generateBidiStops ( NBEdgeCont cont)

duplicate stops for superposed rail edges and return the number of generated stops

Definition at line 117 of file NBPTStopCont.cpp.

References NBPTStop::findLaneAndComputeBusStopExtent(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTStop::getID(), NBPTStop::getLength(), NBPTStop::getName(), NBPTStop::getOrigEdgeId(), NBPTStop::getPermissions(), NBPTStop::getPosition(), getReverseID(), NBEdge::getTurnDestination(), NBEdge::isBidiRail(), myPTStops, NBPTStop::setBidiStop(), toString(), WRITE_MESSAGE, and WRITE_WARNING.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ get()

NBPTStop * NBPTStopCont::get ( std::string  id)

Retrieve a previously inserted pt stop.

Definition at line 54 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NIXMLPTHandler::addPTLineStop(), NIXMLPTHandler::addRouteStop(), and NIImporter_OpenStreetMap::insertEdge().

Here is the caller graph for this function:

◆ getClosestPlatformToPTStopPosition()

const NBPTPlatform * NBPTStopCont::getClosestPlatformToPTStopPosition ( NBPTStop pStop)
private

Definition at line 271 of file NBPTStopCont.cpp.

References Position::distanceSquaredTo2D(), NBPTStop::getPlatformCands(), and NBPTStop::getPosition().

Referenced by assignPTStopToEdgeOfClosestPlatform().

Here is the caller graph for this function:

◆ getReverseEdge()

NBEdge * NBPTStopCont::getReverseEdge ( NBEdge edge)
static

Definition at line 288 of file NBPTStopCont.cpp.

References NBEdge::getFromNode(), NBNode::getOutgoingEdges(), and NBEdge::getToNode().

Referenced by assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), getReverseStop(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getReverseID()

std::string NBPTStopCont::getReverseID ( const std::string &  id)
staticprivate

Definition at line 340 of file NBPTStopCont.cpp.

Referenced by alignIdSigns(), generateBidiStops(), and getReverseStop().

Here is the caller graph for this function:

◆ getReverseStop()

NBPTStop * NBPTStopCont::getReverseStop ( NBPTStop pStop,
NBEdgeCont cont 
)
private

Definition at line 163 of file NBPTStopCont.cpp.

References NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTStop::getID(), NBPTStop::getLength(), NBPTStop::getName(), NBPTStop::getPermissions(), NBPTStop::getPosition(), getReverseEdge(), getReverseID(), and myPTStops.

Referenced by assignAndCreatNewPTStopAsNeeded(), and localizePTStops().

Here is the caller graph for this function:

◆ getStops()

const std::map<std::string, NBPTStop*>& NBPTStopCont::getStops ( ) const
inline

Definition at line 64 of file NBPTStopCont.h.

References myPTStops.

Referenced by NBEdgeCont::appendRailwayTurnarounds(), NBNetBuilder::compute(), NBEdgeCont::remapIDs(), and NBRailwayTopologyAnalyzer::reverseEdges().

Here is the caller graph for this function:

◆ insert()

bool NBPTStopCont::insert ( NBPTStop ptStop)

Inserts a node into the map.

Parameters
[in]stopThe pt stop to insert
Returns
Whether the pt stop could be added

Definition at line 42 of file NBPTStopCont.cpp.

References NBPTStop::getID(), and myPTStops.

Referenced by NIXMLPTHandler::addPTStop(), NBPTLineCont::findWay(), NIImporter_OpenStreetMap::insertEdge(), and localizePTStops().

Here is the caller graph for this function:

◆ localizePTStops()

void NBPTStopCont::localizePTStops ( NBEdgeCont cont)

Definition at line 63 of file NBPTStopCont.cpp.

References assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), NBPTStop::getIsMultipleStopPositions(), NBPTStop::getPlatformCands(), getReverseStop(), insert(), and myPTStops.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ postprocess()

void NBPTStopCont::postprocess ( std::set< std::string > &  usedStops)

Definition at line 329 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ size()

int NBPTStopCont::size ( ) const
inline

Returns the number of pt stops stored in this container.

Definition at line 46 of file NBPTStopCont.h.

References myPTStops.

Field Documentation

◆ myPTStops


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