Eclipse SUMO - Simulation of Urban MObility
|
#include <NBPTLine.h>
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 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 |
NBEdge * | getRouteEnd (const NBEdgeCont &ec) const |
return last valid edge of myRoute (if it doest not lie before the last stop) | |
NBEdge * | getRouteStart (const NBEdgeCont &ec) const |
return first valid edge of myRoute (if it doest not lie after the first stop) | |
std::vector< std::pair< NBEdge *, std::string > > | getStopEdges (const NBEdgeCont &ec) const |
get stop edges and stop ids | |
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 | 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::string | myType |
SUMOVehicleClass | myVClass |
std::map< std::string, std::vector< long long int > > | myWayNodes |
std::vector< std::string > | myWays |
Definition at line 43 of file NBPTLine.h.
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 | ||
) |
Definition at line 37 of file NBPTLine.cpp.
void NBPTLine::addPTStop | ( | std::shared_ptr< NBPTStop > | pStop | ) |
Definition at line 54 of file NBPTLine.cpp.
References myPTStops.
Referenced by NIXMLPTHandler::addPTLineFromFlow(), NIXMLPTHandler::addPTLineStop(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().
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().
void NBPTLine::deleteDuplicateStops | ( | ) |
Definition at line 324 of file NBPTLine.cpp.
References getLineID(), myPTStops, TL, toString(), and WRITE_WARNINGF.
void NBPTLine::deleteInvalidStops | ( | const NBEdgeCont & | ec, |
const NBPTStopCont & | sc | ||
) |
remove invalid stops from the line
Definition at line 307 of file NBPTLine.cpp.
References NBPTStopCont::get(), NBEdgeCont::getByID(), getLineID(), myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBPTLineCont::process().
|
inline |
Definition at line 51 of file NBPTLine.h.
References myPTLineId.
Referenced by NIXMLPTHandler::addPTLineStop(), NBPTLineCont::constructRoute(), deleteDuplicateStops(), deleteInvalidStops(), NBPTLineCont::findWay(), NBPTLineCont::fixBidiStops(), NBPTLineCont::insert(), and NBPTLineCont::reviseStops().
|
inline |
Definition at line 55 of file NBPTLine.h.
References myName.
Referenced by NIXMLPTHandler::addPTLineRoute(), NIXMLPTHandler::addRoute(), and NBPTLineCont::constructRoute().
|
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().
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().
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 223 of file NBPTLine.cpp.
References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().
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 193 of file NBPTLine.cpp.
References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().
std::vector< std::pair< NBEdge *, std::string > > NBPTLine::getStopEdges | ( | const NBEdgeCont & | ec | ) | const |
get stop edges and stop ids
Definition at line 180 of file NBPTLine.cpp.
References NBEdge::getID(), myPTStops, and NBEdgeCont::retrieve().
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().
const std::vector< std::shared_ptr< NBPTStop > > & NBPTLine::getStops | ( | ) |
Definition at line 68 of file NBPTLine.cpp.
References myPTStops.
Referenced by NBPTLineCont::fixBidiStops(), NIXMLPTHandler::myEndElement(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), NBPTLineCont::process(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().
|
inline |
Definition at line 59 of file NBPTLine.h.
References myType.
Referenced by NBPTLineCont::fixBidiStops().
|
inline |
Definition at line 89 of file NBPTLine.h.
References myVClass.
Referenced by NBPTLineCont::constructRoute(), and NBPTLineCont::fixPermissions().
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().
|
inline |
Definition at line 118 of file NBPTLine.h.
References myWays.
Referenced by NBPTLineCont::constructRoute(), NBPTLineCont::findWay(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().
bool NBPTLine::isConsistent | ( | std::vector< NBEdge * > | stops | ) | const |
return whether the mentioned edges appear in that order in the route
Definition at line 253 of file NBPTLine.cpp.
References myRoute.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().
void NBPTLine::removeInvalidEdges | ( | const NBEdgeCont & | ec | ) |
remove invalid edges from the line
Definition at line 346 of file NBPTLine.cpp.
References NBEdgeCont::getSplit(), myRoute, NBEdgeCont::retrieve(), and split().
void NBPTLine::replaceEdge | ( | const std::string & | edgeID, |
const std::vector< NBEdge * > & | replacement | ||
) |
replace the edge with the given edge list
Definition at line 289 of file NBPTLine.cpp.
References myRoute.
void NBPTLine::replaceStop | ( | std::shared_ptr< NBPTStop > | oldStop, |
std::shared_ptr< NBPTStop > | newStop | ||
) |
replace the given stop
Definition at line 279 of file NBPTLine.cpp.
References myPTStops.
Referenced by NBPTLineCont::findWay(), and NBPTLineCont::reviseStops().
|
inline |
Definition at line 74 of file NBPTLine.h.
References myPTStops.
Referenced by NBPTLineCont::fixBidiStops().
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 NIXMLPTHandler::addPTLineFromFlow(), NIXMLPTHandler::addPTLineRoute(), NBPTLineCont::constructRoute(), and NBPTLineCont::process().
|
inline |
Definition at line 106 of file NBPTLine.h.
References myName.
Referenced by NIXMLPTHandler::addPTLine(), and NIXMLPTHandler::myStartElement().
void NBPTLine::setNumOfStops | ( | int | numStops, |
int | missingBefore, | ||
int | missingAfter | ||
) |
Definition at line 166 of file NBPTLine.cpp.
References myMissingStopsAfter, myMissingStopsBefore, and myNumOfStops.
Referenced by NIXMLPTHandler::myEndElement(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().
|
inline |
Definition at line 114 of file NBPTLine.h.
References myInterval.
Referenced by NIXMLPTHandler::addPTLine().
|
inline |
Definition at line 110 of file NBPTLine.h.
References myRef.
Referenced by NIXMLPTHandler::addPTLine().
void NBPTLine::write | ( | OutputDevice & | device | ) |
Definition at line 74 of file NBPTLine.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), RGBColor::isValid(), myColor, myInterval, myMissingStopsAfter, myMissingStopsBefore, myName, myNightService, myNumOfStops, myPTLineId, myPTStops, myRef, myRoute, myType, myVClass, OutputDevice::openTag(), SUMO_ATTR_COLOR, SUMO_ATTR_EDGES, SUMO_ATTR_ID, SUMO_ATTR_LINE, SUMO_ATTR_NAME, SUMO_ATTR_PERIOD, SUMO_ATTR_TYPE, SUMO_ATTR_VCLASS, SUMO_TAG_BUS_STOP, SUMO_TAG_PT_LINE, SUMO_TAG_ROUTE, toString(), and OutputDevice::writeAttr().
|
private |
Definition at line 134 of file NBPTLine.h.
Referenced by write().
|
private |
Definition at line 130 of file NBPTLine.h.
Referenced by addWayNode().
|
private |
Definition at line 137 of file NBPTLine.h.
Referenced by setPeriod(), and write().
|
private |
Definition at line 153 of file NBPTLine.h.
Referenced by setNumOfStops(), and write().
|
private |
Definition at line 152 of file NBPTLine.h.
Referenced by setNumOfStops(), and write().
|
private |
Definition at line 125 of file NBPTLine.h.
|
private |
Definition at line 139 of file NBPTLine.h.
Referenced by write().
|
private |
Definition at line 151 of file NBPTLine.h.
Referenced by setNumOfStops(), and write().
|
private |
Definition at line 131 of file NBPTLine.h.
Referenced by getLineID(), getRouteEnd(), getRouteStart(), and write().
|
private |
Definition at line 127 of file NBPTLine.h.
Referenced by addPTStop(), deleteDuplicateStops(), deleteInvalidStops(), getRouteEnd(), getRouteStart(), getStopEdges(), getStops(), replaceStop(), replaceStops(), and write().
|
private |
Definition at line 132 of file NBPTLine.h.
|
private |
Definition at line 146 of file NBPTLine.h.
Referenced by getRoute(), getRouteEnd(), getRouteStart(), isConsistent(), removeInvalidEdges(), replaceEdge(), setEdges(), and write().
|
private |
Definition at line 126 of file NBPTLine.h.
|
private |
Definition at line 140 of file NBPTLine.h.
Referenced by getVClass(), setEdges(), and write().
|
private |
Definition at line 128 of file NBPTLine.h.
Referenced by addWayNode(), and getWayNodes().
|
private |
Definition at line 129 of file NBPTLine.h.
Referenced by addWayNode(), and getWays().