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

#include <NBPTLine.h>

Collaboration diagram for NBPTLine:
[legend]

Data Structures

struct  PTStopInfo
 get stop edges and stop ids and directional validity More...

Public Member Functions

void addPTStop (std::shared_ptr< NBPTStop > pStop)
void addWayNode (long long int way, long long int node)
void deleteDuplicateStops ()
void deleteInvalidStops (const NBEdgeCont &ec, const NBPTStopCont &sc)
 remove invalid stops from the line
const EdgeVectorgetEdges () const
const std::string & getLineID () const
const std::string & getName () const
const std::string & getRef () const
 get line reference (not unique)
const std::vector< NBEdge * > & getRoute () const
NBEdgegetRouteEnd (const NBEdgeCont &ec) const
 return last valid edge of myRoute (if it doest not lie before the last stop)
NBEdgegetRouteStart (const NBEdgeCont &ec) const
 return first valid edge of myRoute (if it doest not lie after the first stop)
std::vector< PTStopInfogetStopEdges (const NBEdgeCont &ec) const
const std::vector< std::shared_ptr< NBPTStop > > & getStops ()
const std::string & getType () const
SUMOVehicleClass getVClass () const
const std::vector< long long int > * getWayNodes (std::string wayId)
const std::vector< std::string > & getWays () const
bool isConsistent (std::vector< NBEdge * > stops) const
 return whether the mentioned edges appear in that order in the route
 NBPTLine (const std::string &id, const std::string &name, const std::string &type, const std::string &ref, int interval, const std::string &nightService, SUMOVehicleClass vClass, RGBColor color)
void removeInvalidEdges (const NBEdgeCont &ec)
 remove invalid edges from the line
void replaceEdge (const std::string &edgeID, const std::vector< NBEdge * > &replacement)
 replace the edge with the given edge list
void replaceStop (std::shared_ptr< NBPTStop > oldStop, std::shared_ptr< NBPTStop > newStop)
 replace the given stop
void replaceStops (std::vector< std::shared_ptr< NBPTStop > > stops)
void setEdges (const std::vector< NBEdge * > &edges)
void setName (const std::string &name)
void setNumOfStops (int numStops, int missingBefore, int missingAfter)
void setPeriod (int intervalS)
void setRef (const std::string &line)
void setRevised (std::vector< bool > stopsRevised)
void write (OutputDevice &device)

Private Attributes

RGBColor myColor
std::string myCurrentWay
int myInterval
int myMissingStopsAfter
int myMissingStopsBefore
std::string myName
std::string myNightService
int myNumOfStops
std::string myPTLineId
std::vector< std::shared_ptr< NBPTStop > > myPTStops
std::string myRef
std::vector< NBEdge * > myRoute
std::vector< bool > myStopsRevised
std::string myType
SUMOVehicleClass myVClass
std::map< std::string, std::vector< long long int > > myWayNodes
std::vector< std::string > myWays

Detailed Description

Definition at line 43 of file NBPTLine.h.

Constructor & Destructor Documentation

◆ NBPTLine()

NBPTLine::NBPTLine ( const std::string & id,
const std::string & name,
const std::string & type,
const std::string & ref,
int interval,
const std::string & nightService,
SUMOVehicleClass vClass,
RGBColor color )

Member Function Documentation

◆ addPTStop()

void NBPTLine::addPTStop ( std::shared_ptr< NBPTStop > pStop)

Definition at line 54 of file NBPTLine.cpp.

References myPTStops.

Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ addWayNode()

void NBPTLine::addWayNode ( long long int way,
long long int node )

Definition at line 121 of file NBPTLine.cpp.

References myCurrentWay, myWayNodes, myWays, and toString().

Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ deleteDuplicateStops()

void NBPTLine::deleteDuplicateStops ( )

Definition at line 327 of file NBPTLine.cpp.

References getLineID(), myPTStops, TL, toString(), and WRITE_WARNINGF.

◆ deleteInvalidStops()

void NBPTLine::deleteInvalidStops ( const NBEdgeCont & ec,
const NBPTStopCont & sc )

remove invalid stops from the line

Definition at line 310 of file NBPTLine.cpp.

References NBPTStopCont::get(), NBEdgeCont::getByID(), getLineID(), myPTStops, TL, and WRITE_WARNINGF.

Referenced by NBPTLineCont::process().

Here is the caller graph for this function:

◆ getEdges()

const EdgeVector & NBPTLine::getEdges ( ) const
inline

Definition at line 136 of file NBPTLine.h.

References myRoute.

◆ getLineID()

const std::string & NBPTLine::getLineID ( ) const
inline

Definition at line 51 of file NBPTLine.h.

References myPTLineId.

Referenced by NBPTLineCont::constructRoute(), deleteDuplicateStops(), deleteInvalidStops(), NBPTLineCont::findWay(), NBPTLineCont::fixBidiStops(), NBPTLineCont::insert(), removeInvalidEdges(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getName()

const std::string & NBPTLine::getName ( ) const
inline

Definition at line 55 of file NBPTLine.h.

References myName.

Referenced by NBPTLineCont::constructRoute().

Here is the caller graph for this function:

◆ getRef()

const std::string & NBPTLine::getRef ( ) const
inline

get line reference (not unique)

Definition at line 70 of file NBPTLine.h.

References myRef.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NBPTLineCont::fixBidiStops(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getRoute()

const std::vector< NBEdge * > & NBPTLine::getRoute ( ) const

Definition at line 174 of file NBPTLine.cpp.

References myRoute.

Referenced by NBPTLineCont::findWay(), NBPTLineCont::fixPermissions(), NBPTLineCont::process(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getRouteEnd()

NBEdge * NBPTLine::getRouteEnd ( const NBEdgeCont & ec) const

return last valid edge of myRoute (if it doest not lie before the last stop)

Definition at line 226 of file NBPTLine.cpp.

References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getRouteStart()

NBEdge * NBPTLine::getRouteStart ( const NBEdgeCont & ec) const

return first valid edge of myRoute (if it doest not lie after the first stop)

Definition at line 196 of file NBPTLine.cpp.

References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getStopEdges()

std::vector< NBPTLine::PTStopInfo > NBPTLine::getStopEdges ( const NBEdgeCont & ec) const

Definition at line 180 of file NBPTLine.cpp.

References NBEdge::getID(), myPTStops, myStopsRevised, and NBEdgeCont::retrieve().

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), and NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ getStops()

const std::vector< std::shared_ptr< NBPTStop > > & NBPTLine::getStops ( )

Definition at line 68 of file NBPTLine.cpp.

References myPTStops.

Referenced by NBPTLineCont::fixBidiStops(), NBPTLineCont::getServedPTStops(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), NBPTLineCont::process(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getType()

const std::string & NBPTLine::getType ( ) const
inline

Definition at line 59 of file NBPTLine.h.

References myType.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ getVClass()

SUMOVehicleClass NBPTLine::getVClass ( ) const
inline

Definition at line 101 of file NBPTLine.h.

References myVClass.

Referenced by NBPTLineCont::constructRoute(), and NBPTLineCont::fixPermissions().

Here is the caller graph for this function:

◆ getWayNodes()

const std::vector< long long int > * NBPTLine::getWayNodes ( std::string wayId)

Definition at line 132 of file NBPTLine.cpp.

References myWayNodes.

Referenced by NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getWays()

const std::vector< std::string > & NBPTLine::getWays ( ) const
inline

Definition at line 130 of file NBPTLine.h.

References myWays.

Referenced by NBPTLineCont::constructRoute(), NBPTLineCont::findWay(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ isConsistent()

bool NBPTLine::isConsistent ( std::vector< NBEdge * > stops) const

return whether the mentioned edges appear in that order in the route

Definition at line 256 of file NBPTLine.cpp.

References myRoute.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ removeInvalidEdges()

void NBPTLine::removeInvalidEdges ( const NBEdgeCont & ec)

remove invalid edges from the line

Definition at line 349 of file NBPTLine.cpp.

References getLineID(), NBEdgeCont::getSplit(), myPTStops, myRoute, NBEdgeCont::retrieve(), split(), TL, and WRITE_WARNINGF.

◆ replaceEdge()

void NBPTLine::replaceEdge ( const std::string & edgeID,
const std::vector< NBEdge * > & replacement )

replace the edge with the given edge list

Definition at line 292 of file NBPTLine.cpp.

References myRoute.

◆ replaceStop()

void NBPTLine::replaceStop ( std::shared_ptr< NBPTStop > oldStop,
std::shared_ptr< NBPTStop > newStop )

replace the given stop

Definition at line 282 of file NBPTLine.cpp.

References myPTStops.

Referenced by NBPTLineCont::findWay(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ replaceStops()

void NBPTLine::replaceStops ( std::vector< std::shared_ptr< NBPTStop > > stops)
inline

Definition at line 74 of file NBPTLine.h.

References myPTStops.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ setEdges()

void NBPTLine::setEdges ( const std::vector< NBEdge * > & edges)

Definition at line 141 of file NBPTLine.cpp.

References myRoute, myVClass, SUMO_const_laneWidth, SVC_BICYCLE, and SVC_PEDESTRIAN.

Referenced by NBPTLineCont::constructRoute(), and NBPTLineCont::process().

Here is the caller graph for this function:

◆ setName()

void NBPTLine::setName ( const std::string & name)
inline

Definition at line 118 of file NBPTLine.h.

References myName.

◆ setNumOfStops()

void NBPTLine::setNumOfStops ( int numStops,
int missingBefore,
int missingAfter )

Definition at line 166 of file NBPTLine.cpp.

References myMissingStopsAfter, myMissingStopsBefore, and myNumOfStops.

Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ setPeriod()

void NBPTLine::setPeriod ( int intervalS)
inline

Definition at line 126 of file NBPTLine.h.

References myInterval.

◆ setRef()

void NBPTLine::setRef ( const std::string & line)
inline

Definition at line 122 of file NBPTLine.h.

References myRef.

◆ setRevised()

void NBPTLine::setRevised ( std::vector< bool > stopsRevised)
inline

Definition at line 78 of file NBPTLine.h.

References myStopsRevised.

Referenced by NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ write()

Field Documentation

◆ myColor

RGBColor NBPTLine::myColor
private

Definition at line 152 of file NBPTLine.h.

Referenced by NBPTLine(), and write().

◆ myCurrentWay

std::string NBPTLine::myCurrentWay
private

Definition at line 148 of file NBPTLine.h.

Referenced by addWayNode().

◆ myInterval

int NBPTLine::myInterval
private

Definition at line 155 of file NBPTLine.h.

Referenced by NBPTLine(), setPeriod(), and write().

◆ myMissingStopsAfter

int NBPTLine::myMissingStopsAfter
private

Definition at line 171 of file NBPTLine.h.

Referenced by NBPTLine(), setNumOfStops(), and write().

◆ myMissingStopsBefore

int NBPTLine::myMissingStopsBefore
private

Definition at line 170 of file NBPTLine.h.

Referenced by NBPTLine(), setNumOfStops(), and write().

◆ myName

std::string NBPTLine::myName
private

Definition at line 141 of file NBPTLine.h.

Referenced by getName(), NBPTLine(), setName(), and write().

◆ myNightService

std::string NBPTLine::myNightService
private

Definition at line 157 of file NBPTLine.h.

Referenced by NBPTLine(), and write().

◆ myNumOfStops

int NBPTLine::myNumOfStops
private

Definition at line 169 of file NBPTLine.h.

Referenced by NBPTLine(), setNumOfStops(), and write().

◆ myPTLineId

std::string NBPTLine::myPTLineId
private

Definition at line 149 of file NBPTLine.h.

Referenced by getLineID(), getRouteEnd(), getRouteStart(), NBPTLine(), and write().

◆ myPTStops

std::vector<std::shared_ptr<NBPTStop> > NBPTLine::myPTStops
private

◆ myRef

std::string NBPTLine::myRef
private

Definition at line 150 of file NBPTLine.h.

Referenced by getRef(), NBPTLine(), setRef(), and write().

◆ myRoute

std::vector<NBEdge*> NBPTLine::myRoute
private

◆ myStopsRevised

std::vector<bool> NBPTLine::myStopsRevised
private

Definition at line 145 of file NBPTLine.h.

Referenced by getStopEdges(), and setRevised().

◆ myType

std::string NBPTLine::myType
private

Definition at line 142 of file NBPTLine.h.

Referenced by getType(), NBPTLine(), and write().

◆ myVClass

SUMOVehicleClass NBPTLine::myVClass
private

Definition at line 158 of file NBPTLine.h.

Referenced by getVClass(), NBPTLine(), setEdges(), and write().

◆ myWayNodes

std::map<std::string, std::vector<long long int> > NBPTLine::myWayNodes
private

Definition at line 146 of file NBPTLine.h.

Referenced by addWayNode(), and getWayNodes().

◆ myWays

std::vector<std::string> NBPTLine::myWays
private

Definition at line 147 of file NBPTLine.h.

Referenced by addWayNode(), and getWays().


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