![]() |
SUMO - Simulation of Urban MObility
|
#include <NBPTStopCont.h>
Public Member Functions | |
void | addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into) |
add edges that must be kept More... | |
void | alignIdSigns () |
void | assignLanes (NBEdgeCont &cont) |
std::map< std::string, NBPTStop * >::const_iterator | begin () const |
Returns the pointer to the begin of the stored pt stops. More... | |
std::map< std::string, NBPTStop * >::const_iterator | end () const |
Returns the pointer to the end of the stored pt stops. More... | |
void | findAccessEdgesForRailStops (NBEdgeCont &cont, double d, int i) |
NBPTStop * | get (std::string id) |
Retrieve a previously inserted pt stop. More... | |
bool | insert (NBPTStop *ptStop) |
Inserts a node into the map. More... | |
void | localizePTStops (NBEdgeCont &cont) |
void | postprocess (std::set< std::string > &usedStops) |
void | reviseStops (NBEdgeCont &cont) |
revise pt stops and remove stops on non existing (removed) edges More... | |
int | size () const |
Returns the number of pt stops stored in this container. More... | |
~NBPTStopCont () | |
Static Public Member Functions | |
static NBEdge * | getReverseEdge (NBEdge *edge) |
Private Types | |
typedef std::map< std::string, NBPTStop * > | PTStopsCont |
Definition of the map of names to pt stops. More... | |
Private Member Functions | |
NBPTStop * | assignAndCreatNewPTStopAsNeeded (NBPTStop *pStop, NBEdgeCont &cont) |
void | assignPTStopToEdgeOfClosestPlatform (NBPTStop *pStop, NBEdgeCont &cont) |
double | computeCrossProductEdgePosition (const NBEdge *edge, const Position *closestPlatform) const |
NBPTPlatform * | getClosestPlatformToPTStopPosition (NBPTStop *pStop) |
NBPTStop * | getReverseStop (NBPTStop *pStop, NBEdgeCont &cont) |
Private Attributes | |
PTStopsCont | myPTStops |
The map of names to pt stops. More... | |
Definition at line 30 of file NBPTStopCont.h.
|
private |
Definition of the map of names to pt stops.
Definition at line 84 of file NBPTStopCont.h.
NBPTStopCont::~NBPTStopCont | ( | ) |
Definition at line 32 of file NBPTStopCont.cpp.
References myPTStops.
void NBPTStopCont::addEdges2Keep | ( | const OptionsCont & | oc, |
std::set< std::string > & | into | ||
) |
add edges that must be kept
Definition at line 276 of file NBPTStopCont.cpp.
References OptionsCont::isSet(), and myPTStops.
Referenced by NBRampsComputer::computeRamps(), end(), and NBNodeCont::removeUnwishedNodes().
void NBPTStopCont::alignIdSigns | ( | ) |
Definition at line 298 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 131 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), Named::getID(), NBPTPlatform::getMyLength(), NBPTPlatform::getMyPos(), NBPTStop::getPlatformCands(), getReverseEdge(), getReverseStop(), NBPTStop::setEdgeId(), and NBPTStop::setMyPTStopLength().
Referenced by localizePTStops().
void NBPTStopCont::assignLanes | ( | NBEdgeCont & | cont | ) |
Definition at line 97 of file NBPTStopCont.cpp.
References NBPTStop::findLaneAndComputeBusStopExtend(), NBEdgeCont::getGeneratedFrom(), myPTStops, and WRITE_WARNING.
Referenced by NBNetBuilder::compute(), and end().
|
private |
Definition at line 171 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), getClosestPlatformToPTStopPosition(), NBPTStop::getEdgeId(), Named::getID(), NBPTPlatform::getMyLength(), NBPTPlatform::getMyPos(), getReverseEdge(), NBPTStop::setEdgeId(), and NBPTStop::setMyPTStopLength().
Referenced by localizePTStops().
|
inline |
Returns the pointer to the begin of the stored pt stops.
Definition at line 53 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().
|
private |
Definition at line 194 of file NBPTStopCont.cpp.
References NBEdge::getGeometry(), PositionVector::indexOfClosest(), PositionVector::nearest_offset_to_point2D(), PositionVector::offsetAtIndex2D(), WRITE_WARNING, Position::x(), and Position::y().
Referenced by assignAndCreatNewPTStopAsNeeded(), and assignPTStopToEdgeOfClosestPlatform().
|
inline |
Returns the pointer to the end of the stored pt stops.
Definition at line 61 of file NBPTStopCont.h.
References addEdges2Keep(), assignLanes(), findAccessEdgesForRailStops(), localizePTStops(), myPTStops, postprocess(), and reviseStops().
Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().
void NBPTStopCont::findAccessEdgesForRailStops | ( | NBEdgeCont & | cont, |
double | d, | ||
int | i | ||
) |
Definition at line 316 of file NBPTStopCont.cpp.
References PositionVector::distance2D(), NBEdge::getFinalLength(), NBEdge::getGeometry(), NBEdge::getPermissions(), NamedRTree::Insert(), isRailway(), myPTStops, NamedRTree::Search(), SVC_PEDESTRIAN, Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().
Referenced by NBNetBuilder::compute(), and end().
NBPTStop * NBPTStopCont::get | ( | std::string | id | ) |
Retrieve a previously inserted pt stop.
Definition at line 53 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NIImporter_OpenStreetMap::insertEdge(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().
|
private |
Definition at line 226 of file NBPTStopCont.cpp.
References Position::distanceSquaredTo2D(), NBPTPlatform::getMyPos(), NBPTStop::getPlatformCands(), and NBPTStop::getPosition().
Referenced by assignPTStopToEdgeOfClosestPlatform().
Definition at line 247 of file NBPTStopCont.cpp.
References NBEdge::getFromNode(), NBNode::getOutgoingEdges(), and NBEdge::getToNode().
Referenced by assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), getReverseStop(), and NBPTLineCont::reviseStops().
|
private |
Definition at line 116 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBPTStop::getID(), Named::getID(), NBPTStop::getLength(), NBPTStop::getName(), NBPTStop::getPermissions(), NBPTStop::getPosition(), and getReverseEdge().
Referenced by assignAndCreatNewPTStopAsNeeded(), and localizePTStops().
bool NBPTStopCont::insert | ( | NBPTStop * | ptStop | ) |
Inserts a node into the map.
[in] | stop | The pt stop to insert |
Definition at line 41 of file NBPTStopCont.cpp.
References NBPTStop::getID(), and myPTStops.
Referenced by NIImporter_OpenStreetMap::insertEdge(), and localizePTStops().
void NBPTStopCont::localizePTStops | ( | NBEdgeCont & | cont | ) |
Definition at line 62 of file NBPTStopCont.cpp.
References assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), NBPTStop::getIsMultipleStopPositions(), NBPTStop::getPlatformCands(), getReverseStop(), insert(), and myPTStops.
Referenced by NBNetBuilder::compute(), and end().
void NBPTStopCont::postprocess | ( | std::set< std::string > & | usedStops | ) |
Definition at line 286 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBNetBuilder::compute(), and end().
void NBPTStopCont::reviseStops | ( | NBEdgeCont & | cont | ) |
revise pt stops and remove stops on non existing (removed) edges
cont |
Definition at line 262 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), myPTStops, and WRITE_WARNING.
Referenced by end(), and NIImporter_OpenStreetMap::load().
|
inline |
Returns the number of pt stops stored in this container.
Definition at line 46 of file NBPTStopCont.h.
References myPTStops.
|
private |
The map of names to pt stops.
Definition at line 87 of file NBPTStopCont.h.
Referenced by addEdges2Keep(), alignIdSigns(), assignLanes(), begin(), end(), findAccessEdgesForRailStops(), get(), insert(), localizePTStops(), postprocess(), reviseStops(), size(), and ~NBPTStopCont().