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.
 
std::set< std::string > myServedPTStops
 

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 308 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 225 of file NBPTLineCont.cpp.

References DEBUGSTOPID, PositionVector::distance2D(), NBPTStopCont::findStop(), OptionsCont::getFloat(), NBEdge::getID(), Named::getIDSecure(), NBEdge::getLaneShape(), 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()

void NBPTLineCont::fixBidiStops ( const NBEdgeCont ec)

select the correct stop on superposed rail edges

Definition at line 479 of file NBPTLineCont.cpp.

References NBEdgeCont::getAllRouterEdges(), getCost(), NBPTLine::getLineID(), NBPTLine::getRef(), NBPTLine::getStops(), NBRouterEdge::getTravelTimeStatic(), NBPTLine::getType(), myPTLines, NBPTLine::replaceStops(), SVC_BUS, SVC_RAIL, SVC_RAIL_URBAN, SVC_SHIP, SVC_TRAM, TL, and WRITE_WARNINGF.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ fixPermissions()

void NBPTLineCont::fixPermissions ( )

ensure that all turn lanes have sufficient permissions

Definition at line 589 of file NBPTLineCont.cpp.

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

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ 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 619 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(), NBNetBuilder::compute(), 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 473 of file NBPTLineCont.cpp.

References myServedPTStops.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ getWayID()

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

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

Referenced by NIXMLPTHandler::addPTLine(), and NIXMLPTHandler::addPTLineFromFlow().

Here is the caller graph for this function:

◆ process()

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

Definition at line 79 of file NBPTLineCont.cpp.

References constructRoute(), NBPTLine::deleteInvalidStops(), NBPTLine::getRoute(), NBPTLine::getStops(), myPTLines, myServedPTStops, reviseStops(), and NBPTLine::setEdges().

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ removeInvalidEdges()

void NBPTLineCont::removeInvalidEdges ( const NBEdgeCont ec)

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

Definition at line 581 of file NBPTLineCont.cpp.

References myPTLines.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ 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 452 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.

Referenced by NIXMLPTHandler::addPTLine().

Here is the caller graph for this function:

◆ reviseSingleWayStops()

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

Definition at line 205 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 117 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 89 of file NBPTLineCont.h.

Referenced by replaceEdge().

◆ myPTLines

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

The map of names to pt lines.

Definition at line 68 of file NBPTLineCont.h.

Referenced by fixBidiStops(), fixPermissions(), getLines(), insert(), process(), removeInvalidEdges(), replaceEdge(), retrieve(), and ~NBPTLineCont().

◆ myServedPTStops

std::set<std::string> NBPTLineCont::myServedPTStops
private

Definition at line 81 of file NBPTLineCont.h.

Referenced by getServedPTStops(), and process().


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