SUMO - Simulation of Urban MObility
NBAlgorithms.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 // Algorithms for network computation
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2012-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <sstream>
33 #include <iostream>
34 #include <cassert>
35 #include <algorithm>
37 #include <utils/common/ToString.h>
38 #include "NBEdge.h"
39 #include "NBNodeCont.h"
40 #include "NBTypeCont.h"
41 #include "NBNode.h"
42 #include "NBAlgorithms.h"
43 
44 
45 // ===========================================================================
46 // method definitions
47 // ===========================================================================
48 // ---------------------------------------------------------------------------
49 // NBTurningDirectionsComputer
50 // ---------------------------------------------------------------------------
51 void
53  for (std::map<std::string, NBNode*>::const_iterator i = nc.begin(); i != nc.end(); ++i) {
54  computeTurnDirectionsForNode(i->second, warn);
55  }
56 }
57 
58 void
60  const std::vector<NBEdge*>& incoming = node->getIncomingEdges();
61  const std::vector<NBEdge*>& outgoing = node->getOutgoingEdges();
62  // reset turning directions since this may be called multiple times
63  for (std::vector<NBEdge*>::const_iterator k = incoming.begin(); k != incoming.end(); ++k) {
64  (*k)->setTurningDestination(0);
65  }
66  std::vector<Combination> combinations;
67  for (std::vector<NBEdge*>::const_iterator j = outgoing.begin(); j != outgoing.end(); ++j) {
68  NBEdge* outedge = *j;
69  for (std::vector<NBEdge*>::const_iterator k = incoming.begin(); k != incoming.end(); ++k) {
70  NBEdge* e = *k;
71  // @todo: check whether NBHelpers::relAngle is properly defined and whether it should really be used, here
72  const double signedAngle = NBHelpers::normRelAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node));
73  if (signedAngle > 0 && signedAngle < 177 && e->getGeometry().back().distanceTo2D(outedge->getGeometry().front()) < POSITION_EPS) {
74  // backwards curving edges can only be turnaround when there are
75  // non-default endpoints
76  continue;
77  }
78  double angle = fabs(signedAngle);
79  // std::cout << "incoming=" << e->getID() << " outgoing=" << outedge->getID() << " relAngle=" << NBHelpers::relAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node)) << "\n";
80  if (e->getFromNode() == outedge->getToNode() && angle > 120) {
81  // they connect the same nodes; should be the turnaround direction
82  // we'll assign a maximum number
83  //
84  // @todo: indeed, we have observed some pathological intersections
85  // see "294831560" in OSM/adlershof. Here, several edges are connecting
86  // same nodes. We have to do the angle check before...
87  //
88  // @todo: and well, there are some other as well, see plain import
89  // of delphi_muenchen (elmar), intersection "59534191". Not that it would
90  // be realistic in any means; we will warn, here.
91  angle += 360;
92  }
93  if (angle < 160) {
94  continue;
95  }
96  Combination c;
97  c.from = e;
98  c.to = outedge;
99  c.angle = angle;
100  combinations.push_back(c);
101  }
102  }
103  // sort combinations so that the ones with the highest angle are at the begin
104  std::sort(combinations.begin(), combinations.end(), combination_by_angle_sorter());
105  std::set<NBEdge*> seen;
106  for (std::vector<Combination>::const_iterator j = combinations.begin(); j != combinations.end(); ++j) {
107  if (seen.find((*j).from) != seen.end() || seen.find((*j).to) != seen.end()) {
108  // do not regard already set edges
109  if ((*j).angle > 360 && warn) {
110  WRITE_WARNING("Ambiguity in turnarounds computation at junction '" + node->getID() + "'.");
111  warn = false;
112  }
113  continue;
114  }
115  // mark as seen
116  seen.insert((*j).from);
117  seen.insert((*j).to);
118  // set turnaround information
119  bool onlyPossible = (*j).from->getConnections().size() != 0 && !(*j).from->isConnectedTo((*j).to);
120  //std::cout << " setTurningDestination from=" << (*j).from->getID() << " to=" << (*j).to->getID() << " onlyPossible=" << onlyPossible << "\n";
121  (*j).from->setTurningDestination((*j).to, onlyPossible);
122  }
123 }
124 
125 
126 // ---------------------------------------------------------------------------
127 // NBNodesEdgesSorter
128 // ---------------------------------------------------------------------------
129 void
131  for (std::map<std::string, NBNode*>::const_iterator i = nc.begin(); i != nc.end(); ++i) {
132  i->second->sortEdges(useNodeShape);
133  }
134 }
135 
136 
137 void
139  const std::vector<NBEdge*>::iterator& i1,
140  const std::vector<NBEdge*>::iterator& i2) {
141  NBEdge* e1 = *i1;
142  NBEdge* e2 = *i2;
143  // @todo: The difference between "isTurningDirectionAt" and "isTurnaround"
144  // is not nice. Maybe we could get rid of it if we would always mark edges
145  // as turnarounds, even if they do not have to be added, as mentioned in
146  // notes on NBTurningDirectionsComputer::computeTurnDirectionsForNode
147  if (e2->getToNode() == n && e2->isTurningDirectionAt(e1)) {
148  std::swap(*i1, *i2);
149  }
150 }
151 
152 
153 // ---------------------------------------------------------------------------
154 // NBNodeTypeComputer
155 // ---------------------------------------------------------------------------
156 void
158  for (std::map<std::string, NBNode*>::const_iterator i = nc.begin(); i != nc.end(); ++i) {
159  NBNode* n = (*i).second;
160  // the type may already be set from the data
161  if (n->myType != NODETYPE_UNKNOWN && n->myType != NODETYPE_DEAD_END) {
162  continue;
163  }
164  // check whether the node is a waterway node. Set to unregulated by default
165  bool waterway = true;
166  for (EdgeVector::const_iterator i = n->getEdges().begin(); i != n->getEdges().end(); ++i) {
167  if (!isWaterway((*i)->getPermissions())) {
168  waterway = false;
169  break;
170  }
171  }
172  if (waterway && (n->myType == NODETYPE_UNKNOWN || n->myType == NODETYPE_DEAD_END)) {
174  continue;
175  }
176 
177  // check whether the junction is not a real junction
178  if (n->myIncomingEdges.size() == 1) {
180  continue;
181  }
182  // @todo "isSimpleContinuation" should be revalidated
183  if (n->isSimpleContinuation()) {
185  continue;
186  }
187  // determine the type
189  for (EdgeVector::const_iterator i = n->myIncomingEdges.begin(); i != n->myIncomingEdges.end(); i++) {
190  for (EdgeVector::const_iterator j = i + 1; j != n->myIncomingEdges.end(); j++) {
191  // @todo "getOppositeIncoming" should probably be refactored into something the edge knows
192  if (n->getOppositeIncoming(*j) == *i && n->myIncomingEdges.size() > 2) {
193  continue;
194  }
195  // @todo check against a legal document
196  // @todo figure out when NODETYPE_PRIORITY_STOP is appropriate
197  const double s1 = (*i)->getSpeed() * (double) 3.6;
198  const double s2 = (*j)->getSpeed() * (double) 3.6;
199  const int p1 = (*i)->getPriority();
200  const int p2 = (*j)->getPriority();
201  if (fabs(s1 - s2) > (double) 9.5 || MAX2(s1, s2) >= (double) 49. || p1 != p2) {
202  type = NODETYPE_PRIORITY;
203  break;
204  }
205  }
206  }
207  // save type
208  n->myType = type;
209  }
210 }
211 
212 
213 void
215  // the type may already be set from the data
216  if (node->myType != NODETYPE_UNKNOWN && node->myType != NODETYPE_DEAD_END) {
217  }
218  // check whether the node is a waterway node. Set to unregulated by default
219  bool waterway = true;
220  for (EdgeVector::const_iterator i = node->getEdges().begin(); i != node->getEdges().end(); ++i) {
221  if (!isWaterway((*i)->getPermissions())) {
222  waterway = false;
223  break;
224  }
225  }
226  if (waterway && (node->myType == NODETYPE_UNKNOWN || node->myType == NODETYPE_DEAD_END)) {
227  node->myType = NODETYPE_NOJUNCTION;
228  }
229 
230  // check whether the junction is not a real junction
231  if (node->myIncomingEdges.size() == 1) {
232  node->myType = NODETYPE_PRIORITY;
233  }
234  // @todo "isSimpleContinuation" should be revalidated
235  if (node->isSimpleContinuation()) {
236  node->myType = NODETYPE_PRIORITY;
237  }
238  // determine the type
240  for (EdgeVector::const_iterator i = node->myIncomingEdges.begin(); i != node->myIncomingEdges.end(); i++) {
241  for (EdgeVector::const_iterator j = i + 1; j != node->myIncomingEdges.end(); j++) {
242  // @todo "getOppositeIncoming" should probably be refactored into something the edge knows
243  if (node->getOppositeIncoming(*j) == *i && node->myIncomingEdges.size() > 2) {
244  continue;
245  }
246  // @todo check against a legal document
247  // @todo figure out when NODETYPE_PRIORITY_STOP is appropriate
248  const double s1 = (*i)->getSpeed() * (double) 3.6;
249  const double s2 = (*j)->getSpeed() * (double) 3.6;
250  const int p1 = (*i)->getPriority();
251  const int p2 = (*j)->getPriority();
252  if (fabs(s1 - s2) > (double) 9.5 || MAX2(s1, s2) >= (double) 49. || p1 != p2) {
253  type = NODETYPE_PRIORITY;
254  break;
255  }
256  }
257  }
258  // save type
259  node->myType = type;
260 }
261 
262 // ---------------------------------------------------------------------------
263 // NBEdgePriorityComputer
264 // ---------------------------------------------------------------------------
265 void
267  for (std::map<std::string, NBNode*>::const_iterator i = nc.begin(); i != nc.end(); ++i) {
268  computeEdgePrioritiesSingleNode((*i).second);
269  }
270 }
271 
272 
273 void
275  // preset all junction's edge priorities to zero
276  for (EdgeVector::iterator j = node->myAllEdges.begin(); j != node->myAllEdges.end(); ++j) {
277  (*j)->setJunctionPriority(node, NBEdge::MINOR_ROAD);
278  }
279  // check if the junction is not a real junction
280  if (node->myIncomingEdges.size() == 1 && node->myOutgoingEdges.size() == 1) {
281  return;
282  }
283  // compute the priorities on junction when needed
284  if (node->getType() != NODETYPE_RIGHT_BEFORE_LEFT) {
285  setPriorityJunctionPriorities(*node);
286  }
287 }
288 
289 
290 void
292  if (n.myIncomingEdges.size() == 0 || n.myOutgoingEdges.size() == 0) {
293  return;
294  }
295  EdgeVector incoming = n.myIncomingEdges;
296  EdgeVector outgoing = n.myOutgoingEdges;
297  // what we do want to have is to extract the pair of roads that are
298  // the major roads for this junction
299  // let's get the list of incoming edges with the highest priority
300  std::sort(incoming.begin(), incoming.end(), NBContHelper::edge_by_priority_sorter());
301  EdgeVector bestIncoming;
302  NBEdge* best = incoming[0];
303  while (incoming.size() > 0 && samePriority(best, incoming[0])) {
304  bestIncoming.push_back(*incoming.begin());
305  incoming.erase(incoming.begin());
306  }
307  // now, let's get the list of best outgoing
308  assert(outgoing.size() != 0);
309  sort(outgoing.begin(), outgoing.end(), NBContHelper::edge_by_priority_sorter());
310  EdgeVector bestOutgoing;
311  best = outgoing[0];
312  while (outgoing.size() > 0 && samePriority(best, outgoing[0])) { //->getPriority()==best->getPriority()) {
313  bestOutgoing.push_back(*outgoing.begin());
314  outgoing.erase(outgoing.begin());
315  }
316  // special case: user input makes mainDirection unambiguous
317  const bool mainDirectionExplicit = (
318  bestIncoming.size() == 1 && n.myIncomingEdges.size() <= 2
319  && (incoming.size() == 0 || bestIncoming[0]->getPriority() > incoming[0]->getPriority())
320  && bestOutgoing.size() == 1 && n.myOutgoingEdges.size() <= 2
321  && (outgoing.size() == 0 || bestOutgoing[0]->getPriority() > outgoing[0]->getPriority())
322  && !bestIncoming[0]->isTurningDirectionAt(bestOutgoing[0]));
323  // now, let's compute for each of the best incoming edges
324  // the incoming which is most opposite
325  // the outgoing which is most opposite
326  EdgeVector::iterator i;
327  std::map<NBEdge*, NBEdge*> counterIncomingEdges;
328  std::map<NBEdge*, NBEdge*> counterOutgoingEdges;
329  incoming = n.myIncomingEdges;
330  outgoing = n.myOutgoingEdges;
331  for (i = bestIncoming.begin(); i != bestIncoming.end(); ++i) {
332  std::sort(incoming.begin(), incoming.end(), NBContHelper::edge_opposite_direction_sorter(*i, &n, true));
333  counterIncomingEdges[*i] = *incoming.begin();
334  std::sort(outgoing.begin(), outgoing.end(), NBContHelper::edge_opposite_direction_sorter(*i, &n, true));
335  counterOutgoingEdges[*i] = *outgoing.begin();
336  }
337  //std::cout << "n=" << n.getID() << " best=" << best->getID() << " bestIncoming=" << toString(bestIncoming) << "\n incoming=" << toString(incoming) << "\n outgoing=" << toString(outgoing) << "\n mainExplicit=" << mainDirectionExplicit << " counterBest=" << counterIncomingEdges.find(bestIncoming[0])->second->getID() << "\n";
338  // ok, let's try
339  // 1) there is one best incoming road
340  if (bestIncoming.size() == 1) {
341  // let's mark this road as the best
342  NBEdge* best1 = extractAndMarkFirst(n, bestIncoming);
343  if (!mainDirectionExplicit && counterIncomingEdges.find(best1) != counterIncomingEdges.end()) {
344  // ok, look, what we want is the opposit of the straight continuation edge
345  // but, what if such an edge does not exist? By now, we'll determine it
346  // geometrically
347  NBEdge* s = counterIncomingEdges.find(best1)->second;
348  const double minAngleDiff = GeomHelper::getMinAngleDiff(best1->getAngleAtNode(&n), s->getAngleAtNode(&n));
349  if (minAngleDiff > 180 - 45
350  || (minAngleDiff > 75 && s->getPriority() == best1->getPriority() && hasDifferentPriorities(incoming, best1))) {
352  }
353  }
354  assert(bestOutgoing.size() != 0);
355  // mark the best outgoing as the continuation
356  sort(bestOutgoing.begin(), bestOutgoing.end(), NBContHelper::edge_similar_direction_sorter(best1));
357  // assign extra priority if the priorities are unambiguous (regardless of geometry)
358  best1 = extractAndMarkFirst(n, bestOutgoing);
359  if (!mainDirectionExplicit && counterOutgoingEdges.find(best1) != counterOutgoingEdges.end()) {
360  NBEdge* s = counterOutgoingEdges.find(best1)->second;
361  if (GeomHelper::getMinAngleDiff(best1->getAngleAtNode(&n), s->getAngleAtNode(&n)) > 180 - 45) {
362  s->setJunctionPriority(&n, 1);
363  }
364  }
365  return;
366  }
367 
368  // ok, what we want to do in this case is to determine which incoming
369  // has the best continuation...
370  // This means, when several incoming roads have the same priority,
371  // we want a (any) straight connection to be more priorised than a turning
372  double bestAngle = 0;
373  NBEdge* bestFirst = 0;
374  NBEdge* bestSecond = 0;
375  bool hadBest = false;
376  for (i = bestIncoming.begin(); i != bestIncoming.end(); ++i) {
377  EdgeVector::iterator j;
378  NBEdge* t1 = *i;
379  double angle1 = t1->getAngleAtNode(&n) + 180;
380  if (angle1 >= 360) {
381  angle1 -= 360;
382  }
383  for (j = i + 1; j != bestIncoming.end(); ++j) {
384  NBEdge* t2 = *j;
385  double angle2 = t2->getAngleAtNode(&n) + 180;
386  if (angle2 >= 360) {
387  angle2 -= 360;
388  }
389  double angle = GeomHelper::getMinAngleDiff(angle1, angle2);
390  if (!hadBest || angle > bestAngle) {
391  bestAngle = angle;
392  bestFirst = *i;
393  bestSecond = *j;
394  hadBest = true;
395  }
396  }
397  }
398  bestFirst->setJunctionPriority(&n, 1);
399  sort(bestOutgoing.begin(), bestOutgoing.end(), NBContHelper::edge_similar_direction_sorter(bestFirst));
400  if (bestOutgoing.size() != 0) {
401  extractAndMarkFirst(n, bestOutgoing);
402  }
403  bestSecond->setJunctionPriority(&n, 1);
404  sort(bestOutgoing.begin(), bestOutgoing.end(), NBContHelper::edge_similar_direction_sorter(bestSecond));
405  if (bestOutgoing.size() != 0) {
406  extractAndMarkFirst(n, bestOutgoing);
407  }
408 }
409 
410 
411 NBEdge*
412 NBEdgePriorityComputer::extractAndMarkFirst(NBNode& n, std::vector<NBEdge*>& s, int prio) {
413  if (s.size() == 0) {
414  return 0;
415  }
416  NBEdge* ret = s.front();
417  s.erase(s.begin());
418  ret->setJunctionPriority(&n, prio);
419  return ret;
420 }
421 
422 
423 bool
424 NBEdgePriorityComputer::samePriority(const NBEdge* const e1, const NBEdge* const e2) {
425  if (e1 == e2) {
426  return true;
427  }
428  if (e1->getPriority() != e2->getPriority()) {
429  return false;
430  }
431  if ((int) e1->getSpeed() != (int) e2->getSpeed()) {
432  return false;
433  }
434  return (int) e1->getNumLanes() == (int) e2->getNumLanes();
435 }
436 
437 
438 bool
440  if (edges.size() < 2) {
441  return false;
442  }
443  int prio = edges[0] == excluded ? edges[1]->getPriority() : edges[0]->getPriority();
444  for (auto e : edges) {
445  if (e != excluded && e->getPriority() != prio) {
446  return true;
447  }
448  }
449  return false;
450 }
451 
452 
454  // reorder based on getAngleAtNodeToCenter
455  myOrdering = ordering;
456  sort(myOrdering.begin(), myOrdering.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(node));
457  // let the first edge remain the first
458  rotate(myOrdering.begin(), std::find(myOrdering.begin(), myOrdering.end(), ordering.front()), myOrdering.end());
459 }
460 
461 
462 /****************************************************************************/
463 
static double getMinAngleDiff(double angle1, double angle2)
Returns the minimum distance (clockwise/counter-clockwise) between both angles.
Definition: GeomHelper.cpp:168
const EdgeVector & getIncomingEdges() const
Returns this node&#39;s incoming edges (The edges which yield in this node)
Definition: NBNode.h:243
NBEdge * getOppositeIncoming(NBEdge *e) const
returns the opposite incoming edge of certain edge
Definition: NBNode.cpp:1220
double getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge&#39;s geometry at the given node.
Definition: NBEdge.cpp:1595
static double normRelAngle(double angle1, double angle2)
ensure that reverse relAngles (>=179.999) always count as turnarounds (-180)
Definition: NBHelpers.cpp:65
SumoXMLNodeType myType
The type of the junction.
Definition: NBNode.h:738
The representation of a single edge during network building.
Definition: NBEdge.h:71
Class to sort edges by their angle in relation to the given edge.
Definition: NBContHelper.h:178
static void swapWhenReversed(const NBNode *const n, const std::vector< NBEdge * >::iterator &i1, const std::vector< NBEdge * >::iterator &i2)
Assures correct order for same-angle opposite-direction edges.
T MAX2(T a, T b)
Definition: StdDefs.h:74
double getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:508
static void computeSingleNodeType(NBNode *node)
Computes a single node type.
static void sortNodesEdges(NBNodeCont &nc, bool useNodeShape=false)
Sorts a node&#39;s edges clockwise regarding driving direction.
Stores the information about the angle between an incoming ("from") and an outgoing ("to") edge...
Definition: NBAlgorithms.h:75
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:200
static bool hasDifferentPriorities(const EdgeVector &edges, const NBEdge *excluded)
return whether the priorite attribute can be used to distinguish the edges
const EdgeVector & getOutgoingEdges() const
Returns this node&#39;s outgoing edges (The edges which start at this node)
Definition: NBNode.h:248
const std::string & getID() const
Returns the id.
Definition: Named.h:66
EdgeVector myAllEdges
Vector of incoming and outgoing edges.
Definition: NBNode.h:729
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:421
static void computeEdgePriorities(NBNodeCont &nc)
Computes edge priorities within a node.
bool isWaterway(SVCPermissions permissions)
Returns whether an edge with the given permission is a waterway edge.
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:260
static NBEdge * extractAndMarkFirst(NBNode &n, std::vector< NBEdge * > &s, int prio=1)
Sets the priorites in case of a priority junction.
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:414
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
Definition: NBEdge.cpp:2422
const EdgeVector & getEdges() const
Returns all edges which participate in this node (Edges that start or end at this node) ...
Definition: NBNode.h:253
#define POSITION_EPS
Definition: config.h:176
std::map< std::string, NBNode * >::const_iterator end() const
Returns the pointer to the end of the stored nodes.
Definition: NBNodeCont.h:119
crossing_by_junction_angle_sorter(const NBNode *node, const EdgeVector &ordering)
EdgeVector myIncomingEdges
Vector of incoming edges.
Definition: NBNode.h:723
static void computeTurnDirectionsForNode(NBNode *node, bool warn)
Computes turnaround destinations for all incoming edges of the given nodes (if any) ...
static bool samePriority(const NBEdge *const e1, const NBEdge *const e2)
Returns whether both edges have the same priority.
EdgeVector myOutgoingEdges
Vector of outgoing edges.
Definition: NBNode.h:726
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:435
static void computeEdgePrioritiesSingleNode(NBNode *node)
Computes edge priorities within a single node.
static void computeNodeTypes(NBNodeCont &nc)
Computes node types.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:41
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:596
void setJunctionPriority(const NBNode *const node, int prio)
Sets the junction priority of the edge.
Definition: NBEdge.cpp:1585
Represents a single node (junction) during network building.
Definition: NBNode.h:75
bool isSimpleContinuation(bool checkLaneNumbers=true) const
check if node is a simple continuation
Definition: NBNode.cpp:422
static void computeTurnDirections(NBNodeCont &nc, bool warn=true)
Computes turnaround destinations for all edges (if exist)
Sorts "Combination"s by decreasing angle.
Definition: NBAlgorithms.h:85
static void setPriorityJunctionPriorities(NBNode &n)
Sets the priorites in case of a priority junction.
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:63
std::map< std::string, NBNode * >::const_iterator begin() const
Returns the pointer to the begin of the stored nodes.
Definition: NBNodeCont.h:114
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:428