Eclipse SUMO - Simulation of Urban MObility
NBPTLineCont Class Reference

#include <NBPTLineCont.h>

Public Member Functions

void addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into)
 add edges that must be kept More...
 
void fixBidiStops (const NBEdgeCont &ec)
 select the correct stop on superposed rail edges More...
 
const std::map< std::string, NBPTLine * > & getLines () const
 
std::set< std::string > & getServedPTStops ()
 
void insert (NBPTLine *ptLine)
 insert new line More...
 
 NBPTLineCont ()
 constructor More...
 
void process (NBEdgeCont &ec, NBPTStopCont &sc)
 
void replaceEdge (const std::string &edgeID, const EdgeVector &replacement)
 replace the edge with the given edge list in all lines More...
 
 ~NBPTLineCont ()
 destructor More...
 

Private Member Functions

void constructRoute (NBPTLine *myPTLine, NBEdgeCont &cont)
 
NBPTStopfindWay (NBPTLine *line, 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 More...
 

Static Private Member Functions

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

Private Attributes

std::map< std::string, NBPTLine * > myPTLines
 The map of names to pt lines. More...
 
std::set< std::string > myServedPTStops
 

Static Private Attributes

static const int BWD
 
static const int FWD
 

Detailed Description

Definition at line 29 of file NBPTLineCont.h.

Constructor & Destructor Documentation

◆ NBPTLineCont()

NBPTLineCont::NBPTLineCont ( )

constructor

Definition at line 46 of file NBPTLineCont.cpp.

◆ ~NBPTLineCont()

NBPTLineCont::~NBPTLineCont ( )

destructor

Definition at line 49 of file NBPTLineCont.cpp.

References myPTLines.

Member Function Documentation

◆ addEdges2Keep()

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

add edges that must be kept

Definition at line 365 of file NBPTLineCont.cpp.

References OptionsCont::isSet(), and myPTLines.

Referenced by NBRampsComputer::computeRamps().

Here is the caller graph for this function:

◆ constructRoute()

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

Definition at line 257 of file NBPTLineCont.cpp.

References NBPTLine::getLineID(), NBPTLine::getMyWays(), NBPTLine::getName(), NBEdgeCont::retrieve(), NBPTLine::setEdges(), toString(), and WRITE_WARNING.

Referenced by process().

Here is the caller graph for this function:

◆ findWay()

◆ fixBidiStops()

void NBPTLineCont::fixBidiStops ( const NBEdgeCont ec)

select the correct stop on superposed rail edges

Definition at line 392 of file NBPTLineCont.cpp.

References NBEdgeCont::getAllRouterEdges(), NBPTStop::getBidiStop(), getCost(), NBPTStop::getID(), NBPTLine::getLineID(), NBPTLine::getRef(), NBPTLine::getStops(), NBRouterEdge::getTravelTimeStatic(), NBPTLine::getType(), myPTLines, NBPTLine::replaceStops(), SVC_BUS, SVC_RAIL, SVC_RAIL_URBAN, SVC_SHIP, SVC_TRAM, toString(), and WRITE_WARNING.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ getCost()

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

Definition at line 491 of file NBPTLineCont.cpp.

References SUMOAbstractRouter< E, V >::compute(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBPTStop::getEndPos(), 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 41 of file NBPTLineCont.h.

References myPTLines.

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

Here is the caller graph for this function:

◆ getServedPTStops()

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

Definition at line 386 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 515 of file NBPTLineCont.cpp.

Referenced by findWay().

Here is the caller graph for this function:

◆ insert()

void NBPTLineCont::insert ( NBPTLine ptLine)

insert new line

Definition at line 57 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 
)

Definition at line 61 of file NBPTLineCont.cpp.

References constructRoute(), myPTLines, and reviseStops().

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

References myPTLines.

Referenced by NBEdgeCont::joinTramEdges().

Here is the caller graph for this function:

◆ reviseSingleWayStops()

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

Definition at line 158 of file NBPTLineCont.cpp.

References findWay(), NBPTLine::getMyWays(), NBPTLine::getRef(), NBPTLine::getStops(), and myServedPTStops.

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

References BWD, findWay(), FWD, NBEdgeCont::getByID(), NBEdge::getID(), NBPTLine::getLineID(), NBPTLine::getMyWays(), NBPTLine::getRef(), NBPTStopCont::getReverseEdge(), NBPTLine::getRoute(), NBPTLine::getStops(), NBPTLine::getWaysNodes(), myServedPTStops, reviseSingleWayStops(), and WRITE_WARNING.

Referenced by process().

Here is the caller graph for this function:

Field Documentation

◆ BWD

const int NBPTLineCont::BWD
staticprivate

Definition at line 60 of file NBPTLineCont.h.

Referenced by reviseStops().

◆ FWD

const int NBPTLineCont::FWD
staticprivate

Definition at line 59 of file NBPTLineCont.h.

Referenced by reviseStops().

◆ myPTLines

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

The map of names to pt lines.

Definition at line 63 of file NBPTLineCont.h.

Referenced by addEdges2Keep(), fixBidiStops(), getLines(), insert(), process(), replaceEdge(), and ~NBPTLineCont().

◆ myServedPTStops

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

Definition at line 76 of file NBPTLineCont.h.

Referenced by getServedPTStops(), reviseSingleWayStops(), and reviseStops().


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