Eclipse SUMO - Simulation of Urban MObility
NBPTStopCont.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // Container for pt stops during the netbuilding process
15 /****************************************************************************/
16 
17 
19 #include <utils/geom/Boundary.h>
21 #include <microsim/MSLane.h>
22 #include "NBPTStopCont.h"
23 #include "NBEdgeCont.h"
24 #include "NBEdge.h"
25 #include "NBNode.h"
26 #include <utils/geom/Position.h>
27 
28 
30  for (auto& myPTStop : myPTStops) {
31  delete myPTStop.second;
32  }
33  myPTStops.clear();
34 }
35 
36 
37 bool
39  std::string id = ptStop->getID();
40  auto i = myPTStops.find(id);
41  if (i != myPTStops.end()) {
42  return false;
43  }
44  myPTStops[id] = ptStop;
45  return true;
46 }
47 
48 
49 NBPTStop*
50 NBPTStopCont::get(std::string id) {
51  if (myPTStops.find(id) != myPTStops.end()) {
52  return myPTStops.find(id)->second;
53  }
54  return nullptr;
55 }
56 
57 
58 void
60  std::vector<NBPTStop*> reverseStops;
61  //first pass localize pt stop at correct side of the street; create stop for opposite side if needed
62  for (auto& myPTStop : myPTStops) {
63 
64  NBPTStop* stop = myPTStop.second;
65 
66  bool multipleStopPositions = stop->getIsMultipleStopPositions();
67  bool platformsDefined = !stop->getPlatformCands().empty();
68  if (!platformsDefined) {
69  //create pt stop for reverse edge if edge exists
70  NBPTStop* reverseStop = getReverseStop(stop, cont);
71  if (reverseStop != nullptr) {
72  reverseStops.push_back(reverseStop);
73  }
74  } else if (multipleStopPositions) {
75  //create pt stop for closest platform at corresponding edge
77 
78  } else {
79  //create pt stop for each side of the street where a platform is defined (create additional pt stop as needed)
80  NBPTStop* additionalStop = assignAndCreatNewPTStopAsNeeded(stop, cont);
81  if (additionalStop != nullptr) {
82  reverseStops.push_back(additionalStop);
83  }
84  }
85  }
86 
87  //insrt new stops if any
88  for (auto& reverseStop : reverseStops) {
89  insert(reverseStop);
90  }
91 }
92 
93 
95  //scnd pass set correct lane
96  for (auto i = myPTStops.begin(); i != myPTStops.end();) {
97  NBPTStop* stop = i->second;
98 
99  if (!stop->findLaneAndComputeBusStopExtent(cont)) {
100  WRITE_WARNING("Could not find corresponding edge or compatible lane for pt stop '" + i->first
101  + "' (" + i->second->getName() + "). Thus, it will be removed!");
102  EdgeVector edgeVector = cont.getGeneratedFrom((*i).second->getOrigEdgeId());
103  //std::cout << edgeVector.size() << std::endl;
104  myPTStops.erase(i++);
105  } else {
106  i++;
107  }
108  }
109 }
110 
111 
112 int
114  //scnd pass set correct lane
115  std::vector<NBPTStop*> toAdd;
116  for (auto i = myPTStops.begin(); i != myPTStops.end(); i++) {
117  NBPTStop* stop = i->second;
118  NBEdge* edge = ec.getByID(stop->getEdgeId());
119  if (edge != nullptr && edge->isBidiRail()) {
120  NBEdge* bidiEdge = edge->getTurnDestination(true);
121  assert(bidiEdge != 0);
122  const std::string id = getReverseID(stop->getID());
123  if (myPTStops.count(id) > 0) {
124  if (myPTStops[id]->getEdgeId() != bidiEdge->getID()) {
125  WRITE_WARNING("Could not create reverse-direction stop for superposed edge '" + bidiEdge->getID()
126  + "' (origStop '" + i->first + "'). Stop id '" + id
127  + "' already in use by stop on edge '" + myPTStops[id]->getEdgeId() + "'.");
128  }
129  continue;
130  }
131  NBPTStop* bidiStop = new NBPTStop(id,
132  stop->getPosition(),
133  bidiEdge->getID(),
134  stop->getOrigEdgeId(),
135  stop->getLength(),
136  stop->getName(),
137  stop->getPermissions());
138  if (bidiStop->findLaneAndComputeBusStopExtent(ec)) {
139  toAdd.push_back(bidiStop);
140  stop->setBidiStop(bidiStop);
141  bidiStop->setBidiStop(stop);
142  } else {
143  // should not happen
144  assert(false);
145  }
146  }
147  }
148  for (NBPTStop* newStop : toAdd) {
149  myPTStops[newStop->getID()] = newStop;
150  }
151  if (toAdd.size() > 0) {
152  WRITE_MESSAGE("Added " + toString(toAdd.size()) + " stops for superposed rail edges.");
153  }
154  return (int)toAdd.size();
155 }
156 
157 
158 NBPTStop*
160  std::string edgeId = pStop->getEdgeId();
161  NBEdge* edge = cont.getByID(edgeId);
162  NBEdge* reverse = NBPTStopCont::getReverseEdge(edge);
163  if (reverse != nullptr) {
164  const std::string reverseID = getReverseID(pStop->getID());
165  if (myPTStops.count(reverseID) == 0) {
166  return new NBPTStop(reverseID, pStop->getPosition(), reverse->getID(), reverse->getID(),
167  pStop->getLength(), pStop->getName(), pStop->getPermissions());
168  } else {
169  return myPTStops[reverseID];
170  }
171  }
172  return nullptr;
173 }
174 
175 
176 NBPTStop*
178  std::string edgeId = pStop->getEdgeId();
179  NBEdge* edge = cont.getByID(edgeId);
180  bool rightOfEdge = false;
181  bool leftOfEdge = false;
182  const NBPTPlatform* left = nullptr;
183  for (const NBPTPlatform& platform : pStop->getPlatformCands()) {
184  double crossProd = computeCrossProductEdgePosition(edge, platform.getPos());
185  //TODO consider driving on the left!!! [GL May '17]
186  if (crossProd > 0) {
187  leftOfEdge = true;
188  left = &platform;
189  } else {
190  rightOfEdge = true;
191  pStop->setMyPTStopLength(platform.getLength());
192  }
193  }
194 
195  if (leftOfEdge && rightOfEdge) {
196  NBPTStop* leftStop = getReverseStop(pStop, cont);
197  leftStop->setMyPTStopLength(left->getLength());
198  return leftStop;
199  } else if (leftOfEdge) {
200  NBEdge* reverse = getReverseEdge(edge);
201  if (reverse != nullptr) {
202  pStop->setEdgeId(reverse->getID(), cont);
203  pStop->setMyPTStopLength(left->getLength());
204  }
205  }
206 
207  return nullptr;
208 }
209 
210 
211 void
213  std::string edgeId = pStop->getEdgeId();
214  NBEdge* edge = cont.getByID(edgeId);
215  NBEdge* reverse = NBPTStopCont::getReverseEdge(edge);
216  const NBPTPlatform* closestPlatform = getClosestPlatformToPTStopPosition(pStop);
217  pStop->setMyPTStopLength(closestPlatform->getLength());
218  if (reverse != nullptr) {
219 
220  //TODO make isLeft in PositionVector static [GL May '17]
221 // if (PositionVector::isLeft(edge->getFromNode()->getPosition(),edge->getToNode()->getPosition(),closestPlatform)){
222 //
223 // }
224  double crossProd = computeCrossProductEdgePosition(edge, closestPlatform->getPos());
225 
226  //TODO consider driving on the left!!! [GL May '17]
227  if (crossProd > 0) { //pt stop is on the left of the orig edge
228  pStop->setEdgeId(reverse->getID(), cont);
229  }
230  }
231 }
232 
233 
234 double
235 NBPTStopCont::computeCrossProductEdgePosition(const NBEdge* edge, const Position& closestPlatform) const {
236  PositionVector geom = edge->getGeometry();
237  int idxTmp = geom.indexOfClosest(closestPlatform);
238  double offset = geom.nearest_offset_to_point2D(closestPlatform, true);
239  double offset2 = geom.offsetAtIndex2D(idxTmp);
240  int idx1, idx2;
241  if (offset2 < offset) {
242  idx1 = idxTmp;
243  idx2 = idx1 + 1;
244  } else {
245  idx2 = idxTmp;
246  idx1 = idxTmp - 1;
247  }
248  if (idx1 < 0 || idx1 >= (int) geom.size() || idx2 < 0 || idx2 >= (int) geom.size()) {
249  WRITE_WARNING("Could not determine cross product");
250  return 0;
251  }
252  Position p1 = geom[idx1];
253  Position p2 = geom[idx2];
254 
255  double x0 = p1.x();
256  double y0 = p1.y();
257  double x1 = p2.x();
258  double y1 = p2.y();
259  double x2 = closestPlatform.x();
260  double y2 = closestPlatform.y();
261  double crossProd = (x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0);
262  return crossProd;
263 }
264 
265 
266 const NBPTPlatform*
268  Position stopPosition = pStop->getPosition();
269  const NBPTPlatform* closest = nullptr;
270  double minSqrDist = std::numeric_limits<double>::max();
271  for (const NBPTPlatform& platform : pStop->getPlatformCands()) {
272  double sqrDist = stopPosition.distanceSquaredTo2D(platform.getPos());
273  if (sqrDist < minSqrDist) {
274  minSqrDist = sqrDist;
275  closest = &platform;
276  }
277  }
278  return closest;
279 }
280 
281 //static functions
282 
283 NBEdge*
285  if (edge != nullptr) {
286  for (auto it = edge->getToNode()->getOutgoingEdges().begin();
287  it != edge->getToNode()->getOutgoingEdges().end();
288  it++) {
289  if ((*it)->getToNode() == edge->getFromNode()) {
290  return (*it);
291  }
292  }
293  }
294  return nullptr;
295 }
296 
297 
298 int
300  int numDeleted = 0;
301  for (auto i = myPTStops.begin(); i != myPTStops.end();) {
302  if (cont.getByID((*i).second->getEdgeId()) == nullptr) {
303  WRITE_WARNING("Removing pt stop:" + (*i).first + " on non existing edge: " + (*i).second->getEdgeId());
304  myPTStops.erase(i++);
305  numDeleted++;
306  } else {
307  i++;
308  }
309  }
310  return numDeleted;
311 }
312 
313 
314 void
315 NBPTStopCont::addEdges2Keep(const OptionsCont& oc, std::set<std::string>& into) {
316  if (oc.isSet("ptstop-output")) {
317  for (auto stop : myPTStops) {
318  into.insert(stop.second->getEdgeId());
319  }
320  }
321 }
322 
323 
324 void
325 NBPTStopCont::postprocess(std::set<std::string>& usedStops) {
326  for (auto i = myPTStops.begin(); i != myPTStops.end();) {
327  if (usedStops.find(i->second->getID()) == usedStops.end()) {
328  myPTStops.erase(i++);
329  } else {
330  i++;
331  }
332  }
333 }
334 
335 std::string
336 NBPTStopCont::getReverseID(const std::string& id) {
337  return id.size() > 0 && id[0] == '-' ? id.substr(1) : "-" + id;
338 }
339 
340 void
342  PTStopsCont stops = myPTStops;
343  for (auto& i : stops) {
344  const std::string& stopId = i.second->getID();
345  if (i.second->getEdgeId() == "") {
346  continue;
347  }
348  const char edgeSign = i.second->getEdgeId().at(0);
349  const char stopSign = stopId.at(0);
350  if (edgeSign != stopSign && (edgeSign == '-' || stopSign == '-')) {
351  i.second->setMyPTStopId(getReverseID(stopId));
352  myPTStops.erase(stopId);
353  myPTStops[i.second->getID()] = i.second;
354  }
355  }
356 }
357 
358 
359 void
360 NBPTStopCont::findAccessEdgesForRailStops(NBEdgeCont& cont, double maxRadius, int maxCount, double accessFactor) {
361  NamedRTree r;
362  for (auto edge : cont) {
363  const Boundary& bound = edge.second->getGeometry().getBoxBoundary();
364  float min[2] = { static_cast<float>(bound.xmin()), static_cast<float>(bound.ymin()) };
365  float max[2] = { static_cast<float>(bound.xmax()), static_cast<float>(bound.ymax()) };
366  r.Insert(min, max, edge.second);
367  }
368  for (auto& ptStop : myPTStops) {
369  const std::string& stopEdgeID = ptStop.second->getEdgeId();
370  NBEdge* stopEdge = cont.getByID(stopEdgeID);
371  //std::cout << "findAccessEdgesForRailStops edge=" << stopEdgeID << " exists=" << (stopEdge != 0) << "\n";
372  if (stopEdge != nullptr && (stopEdge->getPermissions() & SVC_PEDESTRIAN) == 0) {
373  //if (stopEdge != 0 && isRailway(stopEdge->getPermissions())) {
374  std::set<std::string> ids;
375  Named::StoringVisitor visitor(ids);
376  const Position& pos = ptStop.second->getPosition();
377  float min[2] = {static_cast<float>(pos.x() - maxRadius), static_cast<float>(pos.y() - maxRadius)};
378  float max[2] = {static_cast<float>(pos.x() + maxRadius), static_cast<float>(pos.y() + maxRadius)};
379  r.Search(min, max, visitor);
380  std::vector<NBEdge*> edgCants;
381  for (const auto& id : ids) {
382  NBEdge* e = cont.getByID(id);
383  edgCants.push_back(e);
384  }
385  std::sort(edgCants.begin(), edgCants.end(), [pos](NBEdge * a, NBEdge * b) {
386  return a->getLaneShape(0).distance2D(pos, false) < b->getLaneShape(0).distance2D(pos, false);
387  });
388  int cnt = 0;
389  for (auto edge : edgCants) {
390  int laneIdx = 0;
391  for (auto lane : edge->getLanes()) {
392  if ((lane.permissions & SVC_PEDESTRIAN) != 0) {
393  double offset = lane.shape.nearest_offset_to_point2D(pos, false);
394  double finalLength = edge->getFinalLength();
395  double laneLength = lane.shape.length();
396  double accessLength = pos.distanceTo2D(lane.shape.positionAtOffset2D(offset)) * accessFactor;
397  ptStop.second->addAccess(edge->getLaneID(laneIdx), offset * finalLength / laneLength, accessLength);
398  cnt++;
399  break;
400  }
401  laneIdx++;
402  }
403  if (cnt == maxCount) {
404  break;
405  }
406  }
407  }
408  }
409 }
410 
411 
412 NBPTStop*
413 NBPTStopCont::findStop(const std::string& origEdgeID, Position pos, double threshold) const {
414  for (auto& item : myPTStops) {
415  if (item.second->getOrigEdgeId() == origEdgeID &&
416  item.second->getPosition().distanceTo2D(pos) < threshold) {
417  return item.second;
418  }
419  }
420  return nullptr;
421 }
422 
423 /****************************************************************************/
NBPTStop::setBidiStop
void setBidiStop(NBPTStop *bidiStop)
Definition: NBPTStop.h:82
OptionsCont::isSet
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
Definition: OptionsCont.cpp:135
Boundary.h
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:156
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
NBPTStopCont::localizePTStops
void localizePTStops(NBEdgeCont &cont)
Definition: NBPTStopCont.cpp:59
Boundary::ymin
double ymin() const
Returns minimum y-coordinate.
Definition: Boundary.cpp:130
NBPTStopCont::addEdges2Keep
void addEdges2Keep(const OptionsCont &oc, std::set< std::string > &into)
add edges that must be kept
Definition: NBPTStopCont.cpp:315
NBPTStop::getPermissions
SVCPermissions getPermissions() const
Definition: NBPTStop.cpp:131
OptionsCont.h
Named::StoringVisitor
Allows to store the object; used as context while traveling the rtree in TraCI.
Definition: Named.h:92
NBPTStop::getLength
double getLength() const
Definition: NBPTStop.cpp:161
NBPTPlatform::getPos
const Position & getPos() const
Definition: NBPTPlatform.cpp:22
MsgHandler.h
NBPTStop::setMyPTStopLength
void setMyPTStopLength(double myPTStopLength)
Definition: NBPTStop.cpp:192
EdgeVector
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:34
NBNode::getOutgoingEdges
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
Definition: NBNode.h:260
NBEdge::isBidiRail
bool isBidiRail(bool ignoreSpread=false) const
whether this edge is part of a bidirectional railway
Definition: NBEdge.cpp:691
NBEdgeCont.h
Boundary::xmax
double xmax() const
Returns maximum x-coordinate.
Definition: Boundary.cpp:124
NBPTStop::getID
std::string getID() const
Definition: NBPTStop.cpp:48
NBPTStop::getPlatformCands
const std::vector< NBPTPlatform > & getPlatformCands()
Definition: NBPTStop.cpp:143
NBEdgeCont::getByID
NBEdge * getByID(const std::string &edgeID) const
Returns the edge with id if it exists.
Definition: NBEdgeCont.cpp:1045
NBPTStop::getOrigEdgeId
const std::string getOrigEdgeId() const
Definition: NBPTStop.cpp:53
NBEdge::getPermissions
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:3404
NBPTStopCont::getReverseEdge
static NBEdge * getReverseEdge(NBEdge *edge)
Definition: NBPTStopCont.cpp:284
NBPTStopCont::computeCrossProductEdgePosition
double computeCrossProductEdgePosition(const NBEdge *edge, const Position &closestPlatform) const
Definition: NBPTStopCont.cpp:235
PositionVector
A list of positions.
Definition: PositionVector.h:45
PositionVector::offsetAtIndex2D
double offsetAtIndex2D(int index) const
return the offset at the given index
Definition: PositionVector.cpp:1651
NBPTStop::getEdgeId
const std::string getEdgeId() const
Definition: NBPTStop.cpp:59
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NBEdgeCont::getGeneratedFrom
EdgeVector getGeneratedFrom(const std::string &id) const
Returns the edges which have been built by splitting the edge of the given id.
Definition: NBEdgeCont.cpp:1115
PositionVector::nearest_offset_to_point2D
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Definition: PositionVector.cpp:817
NBEdge::getToNode
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:498
NBEdge::getGeometry
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:692
NBPTStopCont::alignIdSigns
void alignIdSigns()
Definition: NBPTStopCont.cpp:341
Boundary::xmin
double xmin() const
Returns minimum x-coordinate.
Definition: Boundary.cpp:118
NamedRTree::Insert
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
Definition: NamedRTree.h:81
NBPTStop::getIsMultipleStopPositions
bool getIsMultipleStopPositions() const
Definition: NBPTStop.cpp:149
NBPTStopCont::cleanupDeleted
int cleanupDeleted(NBEdgeCont &cont)
remove stops on non existing (removed) edges
Definition: NBPTStopCont.cpp:299
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
NBPTStopCont::assignAndCreatNewPTStopAsNeeded
NBPTStop * assignAndCreatNewPTStopAsNeeded(NBPTStop *pStop, NBEdgeCont &cont)
Definition: NBPTStopCont.cpp:177
NBPTStopCont::~NBPTStopCont
~NBPTStopCont()
Definition: NBPTStopCont.cpp:29
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
PositionVector::indexOfClosest
int indexOfClosest(const Position &p) const
index of the closest position to p
Definition: PositionVector.cpp:940
NBPTStopCont::getReverseStop
NBPTStop * getReverseStop(NBPTStop *pStop, NBEdgeCont &cont)
Definition: NBPTStopCont.cpp:159
NBPTPlatform
Definition: NBPTPlatform.h:22
Position::distanceSquaredTo2D
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
Definition: Position.h:248
PositionVector::distance2D
double distance2D(const Position &p, bool perpendicular=false) const
closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector)
Definition: PositionVector.cpp:1259
Position::distanceTo2D
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
Definition: Position.h:243
NBPTStopCont::findStop
NBPTStop * findStop(const std::string &origEdgeID, Position pos, double threshold=1) const
Definition: NBPTStopCont.cpp:413
NBEdge::getLaneShape
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
Definition: NBEdge.cpp:879
Position.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
NBPTStop::getPosition
const Position & getPosition() const
Definition: NBPTStop.cpp:71
NBPTStopCont::PTStopsCont
std::map< std::string, NBPTStop * > PTStopsCont
Definition of the map of names to pt stops.
Definition: NBPTStopCont.h:90
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
NBPTStopCont::myPTStops
PTStopsCont myPTStops
The map of names to pt stops.
Definition: NBPTStopCont.h:93
NBPTStopCont::assignPTStopToEdgeOfClosestPlatform
void assignPTStopToEdgeOfClosestPlatform(NBPTStop *pStop, NBEdgeCont &cont)
Definition: NBPTStopCont.cpp:212
NBPTStop::getName
const std::string getName() const
Definition: NBPTStop.cpp:65
NBPTStopCont::get
NBPTStop * get(std::string id)
Retrieve a previously inserted pt stop.
Definition: NBPTStopCont.cpp:50
NamedRTree
A RT-tree for efficient storing of SUMO's Named objects.
Definition: NamedRTree.h:63
NBEdge::getFinalLength
double getFinalLength() const
get length that will be assigned to the lanes in the final network
Definition: NBEdge.cpp:3682
NBPTStop::findLaneAndComputeBusStopExtent
bool findLaneAndComputeBusStopExtent(const NBEdgeCont &ec)
Definition: NBPTStop.cpp:198
NBPTStopCont::assignLanes
void assignLanes(NBEdgeCont &cont)
Definition: NBPTStopCont.cpp:94
NBPTStopCont::generateBidiStops
int generateBidiStops(NBEdgeCont &cont)
duplicate stops for superposed rail edges and return the number of generated stops
Definition: NBPTStopCont.cpp:113
NamedRTree::Search
int Search(const float a_min[2], const float a_max[2], const Named::StoringVisitor &c) const
Find all within search rectangle.
Definition: NamedRTree.h:114
NBPTStopCont::getReverseID
static std::string getReverseID(const std::string &id)
Definition: NBPTStopCont.cpp:336
MSLane.h
NBPTStopCont::insert
bool insert(NBPTStop *ptStop)
Inserts a node into the map.
Definition: NBPTStopCont.cpp:38
NBPTStopCont::postprocess
void postprocess(std::set< std::string > &usedStops)
Definition: NBPTStopCont.cpp:325
NBPTStop::setEdgeId
bool setEdgeId(std::string edgeId, const NBEdgeCont &ec)
Definition: NBPTStop.cpp:167
NBPTStop
The representation of a single pt stop.
Definition: NBPTStop.h:44
NBNode.h
NBPTStopCont::getClosestPlatformToPTStopPosition
const NBPTPlatform * getClosestPlatformToPTStopPosition(NBPTStop *pStop)
Definition: NBPTStopCont.cpp:267
NBPTStopCont::findAccessEdgesForRailStops
void findAccessEdgesForRailStops(NBEdgeCont &cont, double maxRadius, int maxCount, double accessFactor)
Definition: NBPTStopCont.cpp:360
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:491
WRITE_MESSAGE
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:277
NBPTPlatform::getLength
double getLength() const
Definition: NBPTPlatform.cpp:34
NBEdge.h
Boundary::ymax
double ymax() const
Returns maximum y-coordinate.
Definition: Boundary.cpp:136
NBPTStopCont.h
NBEdge::getTurnDestination
NBEdge * getTurnDestination(bool possibleDestination=false) const
Definition: NBEdge.cpp:3084
NBEdge::getID
const std::string & getID() const
Definition: NBEdge.h:1380