Eclipse SUMO - Simulation of Urban MObility
NBPTStop Class Reference

The representation of a single pt stop. More...

#include <NBPTStop.h>

Collaboration diagram for NBPTStop:
[legend]

Public Member Functions

void addAccess (std::string laneID, double offset, double length)
 
void addLine (const std::string &line)
 register line that services this stop (for displaying) More...
 
void addPlatformCand (NBPTPlatform platform)
 
void clearAccess ()
 remove all access definitions More...
 
bool findLaneAndComputeBusStopExtent (const NBEdge *edge)
 
bool findLaneAndComputeBusStopExtent (const NBEdgeCont &ec)
 
NBPTStopgetBidiStop () const
 
const std::string getEdgeId () const
 
double getEndPos () const
 
std::string getID () const
 
bool getIsMultipleStopPositions () const
 
double getLength () const
 
const std::map< std::string, std::string > & getMyAdditionalEdgeCandidates () const
 
const std::string getName () const
 
const std::string getOrigEdgeId () const
 
SVCPermissions getPermissions () const
 
const std::vector< NBPTPlatform > & getPlatformCands ()
 
const PositiongetPosition () const
 
bool isLoose () const
 
void mirrorX ()
 mirror coordinates along the x-axis More...
 
 NBPTStop (std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions, double parkingLength=0)
 Constructor. More...
 
void registerAdditionalEdge (std::string wayId, std::string edgeId)
 
void reshiftPosition (const double offsetX, const double offsetY)
 
void setBidiStop (NBPTStop *bidiStop)
 
bool setEdgeId (std::string edgeId, const NBEdgeCont &ec)
 
void setIsMultipleStopPositions (bool multipleStopPositions)
 
void setMyOrigEdgeId (const std::string &myOrigEdgeId)
 
void setMyPTStopId (std::string id)
 
void setMyPTStopLength (double myPTStopLength)
 
void write (OutputDevice &device)
 

Private Member Functions

void computeExtent (double center, double d)
 
NBPTStopoperator= (const NBPTStop &)
 Invalidated assignment operator. More...
 

Private Attributes

std::vector< std::tuple< std::string, double, double > > myAccesses
 laneId, lanePos, accessLength More...
 
std::map< std::string, std::string > myAdditionalEdgeCandidates
 
NBPTStopmyBidiStop
 
std::string myEdgeId
 
double myEndPos
 
bool myIsLoose
 whether the stop was not part of the road network and must be mapped More...
 
bool myIsMultipleStopPositions
 
std::string myLaneId
 
std::vector< std::string > myLines
 list of public transport lines (for displaying) More...
 
const std::string myName
 
std::string myOrigEdgeId
 
const double myParkingLength
 
const SVCPermissions myPermissions
 
std::vector< NBPTPlatformmyPlatformCands
 
Position myPosition
 
std::string myPTStopId
 
double myPTStopLength
 
double myStartPos
 

Detailed Description

The representation of a single pt stop.

Definition at line 44 of file NBPTStop.h.

Constructor & Destructor Documentation

◆ NBPTStop()

NBPTStop::NBPTStop ( std::string  ptStopId,
Position  position,
std::string  edgeId,
std::string  origEdgeId,
double  length,
std::string  name,
SVCPermissions  svcPermissions,
double  parkingLength = 0 
)

Constructor.

Parameters
[in]idThe id of the pt stop
[in]positionThe position of the pt stop
[in]edgeIdThe edge id of the pt stop
[in]lengthThe length of the pt stop

Definition at line 32 of file NBPTStop.cpp.

Member Function Documentation

◆ addAccess()

void NBPTStop::addAccess ( std::string  laneID,
double  offset,
double  length 
)

Definition at line 247 of file NBPTStop.cpp.

References SUMOXMLDefinitions::getEdgeIDFromLane(), and myAccesses.

Referenced by NIXMLPTHandler::addAccess().

Here is the caller graph for this function:

◆ addLine()

void NBPTStop::addLine ( const std::string &  line)

register line that services this stop (for displaying)

Definition at line 90 of file NBPTStop.cpp.

References StringUtils::escapeXML(), and myLines.

◆ addPlatformCand()

void NBPTStop::addPlatformCand ( NBPTPlatform  platform)

Definition at line 146 of file NBPTStop.cpp.

References myPlatformCands.

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

Here is the caller graph for this function:

◆ clearAccess()

void NBPTStop::clearAccess ( )

remove all access definitions

Definition at line 242 of file NBPTStop.cpp.

References myAccesses.

Referenced by NBPTLine::replaceEdge().

Here is the caller graph for this function:

◆ computeExtent()

void NBPTStop::computeExtent ( double  center,
double  d 
)
private

Definition at line 83 of file NBPTStop.cpp.

References MAX2(), MIN2(), myEndPos, myPTStopLength, and myStartPos.

Referenced by findLaneAndComputeBusStopExtent().

Here is the caller graph for this function:

◆ findLaneAndComputeBusStopExtent() [1/2]

◆ findLaneAndComputeBusStopExtent() [2/2]

bool NBPTStop::findLaneAndComputeBusStopExtent ( const NBEdgeCont ec)

Definition at line 206 of file NBPTStop.cpp.

References NBEdgeCont::getByID(), and myEdgeId.

Referenced by NBPTStopCont::assignLanes(), NBPTStopCont::generateBidiStops(), NBPTLine::replaceEdge(), and setEdgeId().

Here is the caller graph for this function:

◆ getBidiStop()

NBPTStop* NBPTStop::getBidiStop ( ) const
inline

Definition at line 89 of file NBPTStop.h.

References myBidiStop.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ getEdgeId()

const std::string NBPTStop::getEdgeId ( ) const

Definition at line 61 of file NBPTStop.cpp.

References myEdgeId.

Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), NBPTLineCont::getCost(), and NBPTStopCont::getReverseStop().

Here is the caller graph for this function:

◆ getEndPos()

double NBPTStop::getEndPos ( ) const
inline

Definition at line 97 of file NBPTStop.h.

References myEndPos.

Referenced by NBPTLineCont::getCost().

Here is the caller graph for this function:

◆ getID()

std::string NBPTStop::getID ( ) const

Definition at line 50 of file NBPTStop.cpp.

References myPTStopId.

Referenced by NBPTLineCont::findWay(), NBPTLineCont::fixBidiStops(), NBPTStopCont::generateBidiStops(), NBPTStopCont::getReverseStop(), NBPTStopCont::insert(), and NBPTLine::replaceEdge().

Here is the caller graph for this function:

◆ getIsMultipleStopPositions()

bool NBPTStop::getIsMultipleStopPositions ( ) const

Definition at line 158 of file NBPTStop.cpp.

References myIsMultipleStopPositions.

Referenced by NBPTStopCont::localizePTStops().

Here is the caller graph for this function:

◆ getLength()

double NBPTStop::getLength ( ) const

Definition at line 170 of file NBPTStop.cpp.

References myPTStopLength.

Referenced by NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().

Here is the caller graph for this function:

◆ getMyAdditionalEdgeCandidates()

const std::map< std::string, std::string > & NBPTStop::getMyAdditionalEdgeCandidates ( ) const

Definition at line 189 of file NBPTStop.cpp.

References myAdditionalEdgeCandidates.

Referenced by NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ getName()

const std::string NBPTStop::getName ( ) const

Definition at line 67 of file NBPTStop.cpp.

References myName.

Referenced by NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().

Here is the caller graph for this function:

◆ getOrigEdgeId()

const std::string NBPTStop::getOrigEdgeId ( ) const

Definition at line 55 of file NBPTStop.cpp.

References myOrigEdgeId.

Referenced by NBPTLineCont::findWay(), and NBPTStopCont::generateBidiStops().

Here is the caller graph for this function:

◆ getPermissions()

SVCPermissions NBPTStop::getPermissions ( ) const

Definition at line 140 of file NBPTStop.cpp.

References myPermissions.

Referenced by findLaneAndComputeBusStopExtent(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().

Here is the caller graph for this function:

◆ getPlatformCands()

const std::vector< NBPTPlatform > & NBPTStop::getPlatformCands ( )

Definition at line 152 of file NBPTStop.cpp.

References myPlatformCands.

Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::getClosestPlatformToPTStopPosition(), and NBPTStopCont::localizePTStops().

Here is the caller graph for this function:

◆ getPosition()

const Position & NBPTStop::getPosition ( ) const

Definition at line 73 of file NBPTStop.cpp.

References myPosition.

Referenced by findLaneAndComputeBusStopExtent(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), NBPTStopCont::getClosestPlatformToPTStopPosition(), NBPTStopCont::getReverseStop(), and NBPTLine::replaceEdge().

Here is the caller graph for this function:

◆ isLoose()

bool NBPTStop::isLoose ( ) const
inline

Definition at line 93 of file NBPTStop.h.

References myIsLoose.

Referenced by NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ mirrorX()

void NBPTStop::mirrorX ( )

mirror coordinates along the x-axis

Definition at line 78 of file NBPTStop.cpp.

References Position::mul(), and myPosition.

◆ operator=()

NBPTStop& NBPTStop::operator= ( const NBPTStop )
private

Invalidated assignment operator.

◆ registerAdditionalEdge()

void NBPTStop::registerAdditionalEdge ( std::string  wayId,
std::string  edgeId 
)

Definition at line 183 of file NBPTStop.cpp.

References myAdditionalEdgeCandidates.

Referenced by NIImporter_OpenStreetMap::insertEdge().

Here is the caller graph for this function:

◆ reshiftPosition()

void NBPTStop::reshiftPosition ( const double  offsetX,
const double  offsetY 
)

Definition at line 131 of file NBPTStop.cpp.

References Position::add(), myPlatformCands, and myPosition.

◆ setBidiStop()

void NBPTStop::setBidiStop ( NBPTStop bidiStop)
inline

Definition at line 85 of file NBPTStop.h.

References myBidiStop.

Referenced by NBPTStopCont::generateBidiStops().

Here is the caller graph for this function:

◆ setEdgeId()

bool NBPTStop::setEdgeId ( std::string  edgeId,
const NBEdgeCont ec 
)

Definition at line 176 of file NBPTStop.cpp.

References findLaneAndComputeBusStopExtent(), and myEdgeId.

Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), and NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ setIsMultipleStopPositions()

void NBPTStop::setIsMultipleStopPositions ( bool  multipleStopPositions)

Definition at line 164 of file NBPTStop.cpp.

References myIsMultipleStopPositions.

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

Here is the caller graph for this function:

◆ setMyOrigEdgeId()

void NBPTStop::setMyOrigEdgeId ( const std::string &  myOrigEdgeId)

Definition at line 195 of file NBPTStop.cpp.

References myOrigEdgeId.

Referenced by NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ setMyPTStopId()

void NBPTStop::setMyPTStopId ( std::string  id)

Definition at line 237 of file NBPTStop.cpp.

References myPTStopId.

◆ setMyPTStopLength()

void NBPTStop::setMyPTStopLength ( double  myPTStopLength)

Definition at line 201 of file NBPTStop.cpp.

References myPTStopLength.

Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), and NBPTStopCont::assignPTStopToEdgeOfClosestPlatform().

Here is the caller graph for this function:

◆ write()

Field Documentation

◆ myAccesses

std::vector<std::tuple<std::string, double, double> > NBPTStop::myAccesses
private

laneId, lanePos, accessLength

Definition at line 132 of file NBPTStop.h.

Referenced by addAccess(), clearAccess(), and write().

◆ myAdditionalEdgeCandidates

std::map<std::string, std::string> NBPTStop::myAdditionalEdgeCandidates
private

Definition at line 111 of file NBPTStop.h.

Referenced by getMyAdditionalEdgeCandidates(), and registerAdditionalEdge().

◆ myBidiStop

NBPTStop* NBPTStop::myBidiStop
private

Definition at line 137 of file NBPTStop.h.

Referenced by getBidiStop(), and setBidiStop().

◆ myEdgeId

std::string NBPTStop::myEdgeId
private

Definition at line 110 of file NBPTStop.h.

Referenced by findLaneAndComputeBusStopExtent(), getEdgeId(), and setEdgeId().

◆ myEndPos

double NBPTStop::myEndPos
private

Definition at line 129 of file NBPTStop.h.

Referenced by computeExtent(), getEndPos(), and write().

◆ myIsLoose

bool NBPTStop::myIsLoose
private

whether the stop was not part of the road network and must be mapped

Definition at line 140 of file NBPTStop.h.

Referenced by isLoose().

◆ myIsMultipleStopPositions

bool NBPTStop::myIsMultipleStopPositions
private

Definition at line 148 of file NBPTStop.h.

Referenced by getIsMultipleStopPositions(), and setIsMultipleStopPositions().

◆ myLaneId

std::string NBPTStop::myLaneId
private

Definition at line 125 of file NBPTStop.h.

Referenced by findLaneAndComputeBusStopExtent(), and write().

◆ myLines

std::vector<std::string> NBPTStop::myLines
private

list of public transport lines (for displaying)

Definition at line 135 of file NBPTStop.h.

Referenced by addLine(), and write().

◆ myName

const std::string NBPTStop::myName
private

Definition at line 123 of file NBPTStop.h.

Referenced by getName(), and write().

◆ myOrigEdgeId

std::string NBPTStop::myOrigEdgeId
private

Definition at line 115 of file NBPTStop.h.

Referenced by getOrigEdgeId(), and setMyOrigEdgeId().

◆ myParkingLength

const double NBPTStop::myParkingLength
private

Definition at line 124 of file NBPTStop.h.

Referenced by write().

◆ myPermissions

const SVCPermissions NBPTStop::myPermissions
private

Definition at line 126 of file NBPTStop.h.

Referenced by getPermissions().

◆ myPlatformCands

std::vector<NBPTPlatform> NBPTStop::myPlatformCands
private

Definition at line 147 of file NBPTStop.h.

Referenced by addPlatformCand(), getPlatformCands(), and reshiftPosition().

◆ myPosition

Position NBPTStop::myPosition
private

Definition at line 109 of file NBPTStop.h.

Referenced by getPosition(), mirrorX(), and reshiftPosition().

◆ myPTStopId

std::string NBPTStop::myPTStopId
private

Definition at line 108 of file NBPTStop.h.

Referenced by getID(), setMyPTStopId(), and write().

◆ myPTStopLength

double NBPTStop::myPTStopLength
private

Definition at line 119 of file NBPTStop.h.

Referenced by computeExtent(), getLength(), and setMyPTStopLength().

◆ myStartPos

double NBPTStop::myStartPos
private

Definition at line 128 of file NBPTStop.h.

Referenced by computeExtent(), and write().


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