![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBPTLineCont.h>
Public Member Functions | |
void | fixBidiStops (const NBEdgeCont &ec) |
select the correct stop on superposed rail edges More... | |
void | fixPermissions () |
ensure that all turn lanes have sufficient permissions 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, bool routeOnly=false) |
void | removeInvalidEdges (const NBEdgeCont &ec) |
filter out edges that were removed due to –geometry.remove More... | |
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, const NBEdgeCont &cont) |
NBPTStop * | findWay (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, std::set< NBPTLine * > > | myPTLineLookup |
The map of edge ids to lines that use this edge in their route. More... | |
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 |
Definition at line 30 of file NBPTLineCont.h.
NBPTLineCont::NBPTLineCont | ( | ) |
constructor
Definition at line 50 of file NBPTLineCont.cpp.
NBPTLineCont::~NBPTLineCont | ( | ) |
|
private |
Definition at line 286 of file NBPTLineCont.cpp.
References DEBUGLINEID, Named::getIDSecure(), NBPTLine::getLineID(), NBPTLine::getName(), NBPTLine::getWays(), NBEdgeCont::retrieve(), NBPTLine::setEdges(), nlohmann::to_string(), and toString().
Referenced by process().
|
private |
Definition at line 203 of file NBPTLineCont.cpp.
References DEBUGSTOPID, PositionVector::distance2D(), NBPTStopCont::findStop(), NBPTStop::getAdditionalEdgeCandidates(), NBPTStop::getEdgeId(), OptionsCont::getFloat(), NBEdge::getID(), NBPTStop::getID(), Named::getIDSecure(), NBEdge::getLaneShape(), NBPTStop::getLength(), NBPTLine::getLineID(), NBPTStop::getName(), OptionsCont::getOptions(), NBPTStop::getOrigEdgeId(), NBPTStop::getPermissions(), NBPTStop::getPosition(), NBPTLine::getRoute(), getWayID(), NBPTLine::getWays(), NBPTStopCont::insert(), NBPTStop::isLoose(), NBPTLine::replaceStop(), NBPTStop::setEdgeId(), NBPTStop::setOrigEdgeId(), TL, toString(), and WRITE_WARNINGF.
Referenced by reviseSingleWayStops(), and reviseStops().
void NBPTLineCont::fixBidiStops | ( | const NBEdgeCont & | ec | ) |
select the correct stop on superposed rail edges
Definition at line 440 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, TL, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute().
void NBPTLineCont::fixPermissions | ( | ) |
ensure that all turn lanes have sufficient permissions
Definition at line 548 of file NBPTLineCont.cpp.
References NBEdge::getConnectionsFromLane(), NBEdge::getPermissions(), NBPTLine::getRoute(), NBPTLine::getVClass(), myPTLines, and NBEdge::setPermissions().
Referenced by NBNetBuilder::compute().
|
staticprivate |
Definition at line 577 of file NBPTLineCont.cpp.
References SUMOAbstractRouter< E, V >::compute(), NBEdge::getBidiEdge(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBPTStop::getEndPos(), and SUMOAbstractRouter< E, V >::recomputeCosts().
Referenced by fixBidiStops().
|
inline |
Definition at line 42 of file NBPTLineCont.h.
References myPTLines.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NBNetBuilder::compute(), NBRailwayTopologyAnalyzer::findBidiCandidates(), NBRailwayTopologyAnalyzer::repairTopology(), and NWWriter_XML::writePTLines().
std::set< std::string > & NBPTLineCont::getServedPTStops | ( | ) |
Definition at line 434 of file NBPTLineCont.cpp.
References myServedPTStops.
Referenced by NBNetBuilder::compute().
|
staticprivate |
Definition at line 603 of file NBPTLineCont.cpp.
Referenced by findWay().
void NBPTLineCont::insert | ( | NBPTLine * | ptLine | ) |
insert new line
Definition at line 62 of file NBPTLineCont.cpp.
References NBPTLine::getLineID(), and myPTLines.
Referenced by NIXMLPTHandler::addPTLine(), and NIXMLPTHandler::addPTLineFromFlow().
void NBPTLineCont::process | ( | NBEdgeCont & | ec, |
NBPTStopCont & | sc, | ||
bool | routeOnly = false |
||
) |
Definition at line 68 of file NBPTLineCont.cpp.
References constructRoute(), NBPTLine::deleteInvalidStops(), NBPTLine::getStops(), myPTLines, myServedPTStops, and reviseStops().
Referenced by NBNetBuilder::compute().
void NBPTLineCont::removeInvalidEdges | ( | const NBEdgeCont & | ec | ) |
filter out edges that were removed due to –geometry.remove
Definition at line 540 of file NBPTLineCont.cpp.
References myPTLines.
Referenced by NBNetBuilder::compute().
void NBPTLineCont::replaceEdge | ( | const std::string & | edgeID, |
const EdgeVector & | replacement | ||
) |
replace the edge with the given edge list in all lines
Definition at line 413 of file NBPTLineCont.cpp.
References myPTLineLookup, and myPTLines.
Referenced by NBEdgeCont::joinTramEdges(), and NBNodeCont::removeUnwishedNodes().
|
private |
Definition at line 183 of file NBPTLineCont.cpp.
References findWay(), NBPTLine::getRef(), NBPTLine::getStops(), and NBPTLine::getWays().
Referenced by reviseStops().
|
private |
find directional edge for all stops of the line
Definition at line 90 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::getWays(), NBPTLine::getWaysNodes(), NBPTStopCont::insert(), NBPTLine::replaceStop(), reviseSingleWayStops(), TL, and WRITE_WARNINGF.
Referenced by process().
|
staticprivate |
Definition at line 64 of file NBPTLineCont.h.
Referenced by reviseStops().
|
staticprivate |
Definition at line 63 of file NBPTLineCont.h.
Referenced by reviseStops().
|
private |
The map of edge ids to lines that use this edge in their route.
Definition at line 88 of file NBPTLineCont.h.
Referenced by replaceEdge().
|
private |
The map of names to pt lines.
Definition at line 67 of file NBPTLineCont.h.
Referenced by fixBidiStops(), fixPermissions(), getLines(), insert(), process(), removeInvalidEdges(), replaceEdge(), and ~NBPTLineCont().
|
private |
Definition at line 80 of file NBPTLineCont.h.
Referenced by getServedPTStops(), and process().