Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NBPTLineCont Class Reference

#include <NBPTLineCont.h>

Public Member Functions

void fixBidiStops (const NBEdgeCont &ec)
 select the correct stop on superposed rail edges
void fixPermissions ()
 ensure that all turn lanes have sufficient permissions
const std::map< std::string, NBPTLine * > & getLines () const
std::set< std::string > getServedPTStops ()
bool insert (NBPTLine *ptLine)
 insert new line
void process (NBEdgeCont &ec, NBPTStopCont &sc, bool routeOnly=false)
void removeInvalidEdges (const NBEdgeCont &ec)
 filter out edges that were removed due to –geometry.remove
void replaceEdge (const std::string &edgeID, const EdgeVector &replacement)
 replace the edge with the given edge list in all lines
NBPTLineretrieve (const std::string &lineID)
 ~NBPTLineCont ()
 destructor

Private Member Functions

void constructRoute (NBPTLine *myPTLine, const NBEdgeCont &cont)
std::shared_ptr< NBPTStopfindWay (NBPTLine *line, std::shared_ptr< NBPTStop > stop, const NBEdgeCont &ec, NBPTStopCont &sc) const
void reviseSingleWayStops (NBPTLine *line, const NBEdgeCont &ec, NBPTStopCont &sc)
void reviseStops (NBPTLine *line, const NBEdgeCont &ec, NBPTStopCont &sc)
 find directional edge for all stops of the line

Static Private Member Functions

static double getCost (const NBEdgeCont &ec, SUMOAbstractRouter< NBRouterEdge, NBVehicle > &router, const std::shared_ptr< NBPTStop > from, const std::shared_ptr< NBPTStop > to, const NBVehicle *veh)
static std::string getWayID (const std::string &edgeID)

Private Attributes

std::map< std::string, std::set< NBPTLine * > > myPTLineLookup
 The map of edge ids to lines that use this edge in their route.
std::map< std::string, NBPTLine * > myPTLines
 The map of names to pt lines.

Static Private Attributes

static const int BWD
static const int FWD

Detailed Description

Definition at line 33 of file NBPTLineCont.h.

Constructor & Destructor Documentation

◆ ~NBPTLineCont()

NBPTLineCont::~NBPTLineCont ( )

destructor

Definition at line 51 of file NBPTLineCont.cpp.

References myPTLines.

Member Function Documentation

◆ constructRoute()

void NBPTLineCont::constructRoute ( NBPTLine * myPTLine,
const NBEdgeCont & cont )
private

Definition at line 305 of file NBPTLineCont.cpp.

References DEBUGLINEID, Named::getIDSecure(), NBPTLine::getLineID(), NBPTLine::getName(), NBPTLine::getVClass(), NBPTLine::getWays(), isRailway(), NBEdgeCont::retrieve(), NBPTLine::setEdges(), and toString().

Referenced by process().

Here is the caller graph for this function:

◆ findWay()

std::shared_ptr< NBPTStop > NBPTLineCont::findWay ( NBPTLine * line,
std::shared_ptr< NBPTStop > stop,
const NBEdgeCont & ec,
NBPTStopCont & sc ) const
private

Definition at line 222 of file NBPTLineCont.cpp.

References DEBUGSTOPID, NBPTStopCont::findStop(), NBEdge::getID(), Named::getIDSecure(), NBPTLine::getLineID(), OptionsCont::getOptions(), NBPTLine::getRoute(), getWayID(), NBPTLine::getWays(), NBPTStopCont::insert(), NBPTLine::replaceStop(), TL, toString(), and WRITE_WARNINGF.

Referenced by reviseSingleWayStops(), and reviseStops().

Here is the caller graph for this function:

◆ fixBidiStops()

◆ fixPermissions()

void NBPTLineCont::fixPermissions ( )

ensure that all turn lanes have sufficient permissions

Definition at line 593 of file NBPTLineCont.cpp.

References NBEdge::getConnectionsFromLane(), NBEdge::getPermissions(), NBPTLine::getRoute(), NBPTLine::getVClass(), myPTLines, and NBEdge::setPermissions().

◆ getCost()

double NBPTLineCont::getCost ( const NBEdgeCont & ec,
SUMOAbstractRouter< NBRouterEdge, NBVehicle > & router,
const std::shared_ptr< NBPTStop > from,
const std::shared_ptr< NBPTStop > to,
const NBVehicle * veh )
staticprivate

Definition at line 623 of file NBPTLineCont.cpp.

References SUMOAbstractRouter< E, V >::compute(), NBEdge::getBidiEdge(), NBEdgeCont::getByID(), and SUMOAbstractRouter< E, V >::recomputeCosts().

Referenced by fixBidiStops().

Here is the caller graph for this function:

◆ getLines()

const std::map< std::string, NBPTLine * > & NBPTLineCont::getLines ( ) const
inline

Definition at line 43 of file NBPTLineCont.h.

References myPTLines.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NBRailwayTopologyAnalyzer::findBidiCandidates(), NBRailwayTopologyAnalyzer::repairTopology(), and NWWriter_XML::writePTLines().

Here is the caller graph for this function:

◆ getServedPTStops()

std::set< std::string > NBPTLineCont::getServedPTStops ( )

Definition at line 470 of file NBPTLineCont.cpp.

References NBPTLine::getStops(), and myPTLines.

◆ getWayID()

std::string NBPTLineCont::getWayID ( const std::string & edgeID)
staticprivate

Definition at line 649 of file NBPTLineCont.cpp.

Referenced by findWay().

Here is the caller graph for this function:

◆ insert()

bool NBPTLineCont::insert ( NBPTLine * ptLine)

insert new line

Definition at line 60 of file NBPTLineCont.cpp.

References NBPTLine::getLineID(), and myPTLines.

◆ process()

void NBPTLineCont::process ( NBEdgeCont & ec,
NBPTStopCont & sc,
bool routeOnly = false )

◆ removeInvalidEdges()

void NBPTLineCont::removeInvalidEdges ( const NBEdgeCont & ec)

filter out edges that were removed due to –geometry.remove

Definition at line 585 of file NBPTLineCont.cpp.

References myPTLines.

◆ replaceEdge()

void NBPTLineCont::replaceEdge ( const std::string & edgeID,
const EdgeVector & replacement )

replace the edge with the given edge list in all lines

Definition at line 449 of file NBPTLineCont.cpp.

References myPTLineLookup, and myPTLines.

Referenced by NBEdgeCont::joinTramEdges(), and NBNodeCont::removeUnwishedNodes().

Here is the caller graph for this function:

◆ retrieve()

NBPTLine * NBPTLineCont::retrieve ( const std::string & lineID)

Definition at line 70 of file NBPTLineCont.cpp.

References myPTLines.

◆ reviseSingleWayStops()

void NBPTLineCont::reviseSingleWayStops ( NBPTLine * line,
const NBEdgeCont & ec,
NBPTStopCont & sc )
private

Definition at line 202 of file NBPTLineCont.cpp.

References findWay(), NBPTLine::getRef(), NBPTLine::getStops(), and NBPTLine::getWays().

Referenced by reviseStops().

Here is the caller graph for this function:

◆ reviseStops()

void NBPTLineCont::reviseStops ( NBPTLine * line,
const NBEdgeCont & ec,
NBPTStopCont & sc )
private

find directional edge for all stops of the line

Definition at line 114 of file NBPTLineCont.cpp.

References BWD, findWay(), FWD, NBEdgeCont::getByID(), NBEdge::getID(), NBPTLine::getLineID(), NBPTLine::getRef(), NBPTStopCont::getReverseEdge(), NBPTStopCont::getReverseStop(), NBPTLine::getRoute(), NBPTLine::getStops(), NBPTLine::getWayNodes(), NBPTLine::getWays(), NBPTStopCont::insert(), NBPTLine::replaceStop(), reviseSingleWayStops(), TL, and WRITE_WARNINGF.

Referenced by process().

Here is the caller graph for this function:

Field Documentation

◆ BWD

const int NBPTLineCont::BWD
staticprivate

Definition at line 65 of file NBPTLineCont.h.

Referenced by reviseStops().

◆ FWD

const int NBPTLineCont::FWD
staticprivate

Definition at line 64 of file NBPTLineCont.h.

Referenced by reviseStops().

◆ myPTLineLookup

std::map<std::string, std::set<NBPTLine*> > NBPTLineCont::myPTLineLookup
private

The map of edge ids to lines that use this edge in their route.

Definition at line 87 of file NBPTLineCont.h.

Referenced by replaceEdge().

◆ myPTLines

std::map<std::string, NBPTLine*> NBPTLineCont::myPTLines
private

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