SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PedestrianRouter.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // The Pedestrian Router build a special network and (delegegates to a SUMOAbstractRouter)
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef PedestrianRouter_h
21 #define PedestrianRouter_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <vector>
35 #include <algorithm>
36 #include <assert.h>
37 #include <utils/common/SysUtils.h>
39 #include <utils/common/SUMOTime.h>
40 #include <utils/common/ToString.h>
41 #include <utils/common/Named.h>
45 
46 #define TL_RED_PENALTY 20
47 
48 //#define PedestrianRouter_DEBUG_NETWORK
49 //#define PedestrianRouter_DEBUG_ROUTES
50 //#define PedestrianRouter_DEBUG_EFFORTS
51 
52 template <class E, class L>
53 inline const L* getSidewalk(const E* edge) {
54  if (edge == 0) {
55  return 0;
56  }
57  const std::vector<L*>& lanes = edge->getLanes();
58  for (typename std::vector<L*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
59  if ((*it)->allowsVehicleClass(SVC_PEDESTRIAN)) {
60  return *it;
61  }
62  }
63  return 0;
64 }
65 
66 // ===========================================================================
67 // class definitions
68 // ===========================================================================
69 
71 template<class E, class N>
73 
74  PedestrianTrip(const E* _from, const E* _to, SUMOReal _departPos, SUMOReal _arrivalPos, SUMOReal _speed, SUMOReal _departTime, const N* _node) :
75  from(_from),
76  to(_to),
77  node(_node),
78  departPos(_departPos < 0 ? _from->getLength() + _departPos : _departPos),
79  arrivalPos(_arrivalPos < 0 ? _to->getLength() + _arrivalPos : _arrivalPos),
80  speed(_speed),
81  departTime(_departTime)
82  {}
83 
84  // exists just for debugging purposes
85  std::string getID() const {
86  return from->getID() + ":" + to->getID() + ":" + toString(departTime);
87  }
88 
89 
90  inline SUMOVehicleClass getVClass() const {
91  return SVC_PEDESTRIAN;
92  }
93 
94  const E* from;
95  const E* to;
96  const N* node; // indicates whether only routing across this node shall be performed
99  const SUMOReal speed;
101 private:
104 };
105 
106 
108 template<class E, class L, class N>
109 class PedestrianEdge : public Named {
110  typedef std::pair<PedestrianEdge*, PedestrianEdge*> EdgePair;
111  /* brief build the pedestrian network (once)
112  * @param noE The number of edges in the dictionary of E
113  */
114 
115 public:
116  static size_t dictSize() {
117  return myEdgeDict.size();
118  }
119 
120  static void cleanup() {
121  myFromToLookup.clear();
122  myBidiLookup.clear();
123  myEdgeDict.clear();
124  }
125 
126  static void initPedestrianNetwork(size_t noE) {
127  if (myEdgeDict.size() > 0) {
128  return;
129  }
130 #ifdef PedestrianRouter_DEBUG_NETWORK
131  std::cout << "initPedestrianNetwork\n";
132 #endif
133  // build the Pedestrian edges
134  bool haveSeenWalkingArea = false;
135  unsigned int numericalID = 0;
136  for (size_t i = 0; i < noE; i++) {
137  E* edge = E::dictionary(i);
138  const L* lane = getSidewalk<E, L>(edge);
139  if (edge->isInternal() || lane == 0) {
140  continue;
141  } else if (edge->isWalkingArea()) {
142  // only a single edge
143  myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true));
144  haveSeenWalkingArea = true;
145  } else { // regular edge or crossing
146  // forward and backward edges
147  myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true));
148  myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, false));
149  // depart and arrival edges for (the router can decide the initial direction to take and the direction to arrive from)
150  myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true, true));
151  myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, false, true));
152  }
153 
154  }
155  // build the lookup tables after myEdgeDict is complete
156  numericalID = 0;
157  for (size_t i = 0; i < noE; i++) {
158  E* edge = E::dictionary(i);
159  const L* lane = getSidewalk<E, L>(edge);
160  if (edge->isInternal() || lane == 0) {
161  continue;
162  } else if (edge->isWalkingArea()) {
163  // only a single edge. Connectors are used when routing across a single intersecton
164  myBidiLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID]);
165  myFromToLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID]);
166  numericalID += 1;
167  } else { // regular edge or crossing
168  myBidiLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID + 1]);
169  myFromToLookup[edge] = std::make_pair(&myEdgeDict[numericalID + 2], &myEdgeDict[numericalID + 3]);
170  numericalID += 4;
171  }
172  }
173 
174  // build the connections
175  for (size_t i = 0; i < noE; i++) {
176  E* edge = E::dictionary(i);
177  const L* sidewalk = getSidewalk<E, L>(edge);
178  if (edge->isInternal() || sidewalk == 0) {
179  continue;
180  }
181  // find all incoming and outgoing lanes for the sidewalk and
182  // connect the corresponding PedestrianEdges
183  const EdgePair& pair = getBothDirections(edge);
184 #ifdef PedestrianRouter_DEBUG_NETWORK
185  std::cout << " building connections from " << sidewalk->getID() << "\n";
186 #endif
187  if (haveSeenWalkingArea) {
188  std::vector<const L*> outgoing = sidewalk->getOutgoingLanes();
189  // if one of the outgoing lanes is a walking area it must be used.
190  // All other connections shall be ignored
191  bool hasWalkingArea = false;
192  for (typename std::vector<const L*>::iterator it = outgoing.begin(); it != outgoing.end(); ++it) {
193  const L* target = *it;
194  const E* targetEdge = &(target->getEdge());
195  if (targetEdge->isWalkingArea()) {
196  hasWalkingArea = true;
197  break;
198  }
199  }
200  for (typename std::vector<const L*>::iterator it = outgoing.begin(); it != outgoing.end(); ++it) {
201  const L* target = *it;
202  const E* targetEdge = &(target->getEdge());
203  const bool used = (target == getSidewalk<E, L>(targetEdge)
204  && (!hasWalkingArea || targetEdge->isWalkingArea()));
205 #ifdef PedestrianRouter_DEBUG_NETWORK
206  const L* potTarget = getSidewalk<E, L>(targetEdge);
207  std::cout << " lane=" << (potTarget == 0 ? "NULL" : potTarget->getID()) << (used ? "(used)" : "") << "\n";
208 #endif
209  if (used) {
210  const EdgePair& targetPair = getBothDirections(targetEdge);
211  pair.first->myFollowingEdges.push_back(targetPair.first);
212  targetPair.second->myFollowingEdges.push_back(pair.second);
213 #ifdef PedestrianRouter_DEBUG_NETWORK
214  std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n";
215  std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n";
216 #endif
217  }
218  }
219  } else {
220  // we have a network without pedestrian structures. Assume that
221  // all sidewalks at a crossing are interconnected
222  const N* toNode = edge->getToJunction();
223  std::vector<const E*> outgoing = toNode->getOutgoing();
224  for (typename std::vector<const E*>::iterator it = outgoing.begin(); it != outgoing.end(); ++it) {
225  // build forward and backward connections for all outgoing sidewalks
226  const E* targetEdge = *it;
227  const L* target = getSidewalk<E, L>(targetEdge);
228  if (targetEdge->isInternal() || target == 0) {
229  continue;
230  }
231  const EdgePair& targetPair = getBothDirections(targetEdge);
232  pair.first->myFollowingEdges.push_back(targetPair.first);
233  targetPair.second->myFollowingEdges.push_back(pair.second);
234 #ifdef PedestrianRouter_DEBUG_NETWORK
235  std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n";
236  std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n";
237 #endif
238  }
239  std::vector<const E*> incoming = toNode->getIncoming();
240  for (typename std::vector<const E*>::iterator it = incoming.begin(); it != incoming.end(); ++it) {
241  // build forward-to-backward connections for all incoming sidewalks
242  const E* targetEdge = *it;
243  const L* target = getSidewalk<E, L>(targetEdge);
244  if (targetEdge->isInternal() || target == 0 || targetEdge == edge) {
245  continue;
246  }
247  const EdgePair& targetPair = getBothDirections(targetEdge);
248  pair.first->myFollowingEdges.push_back(targetPair.second); // change direction
249 #ifdef PedestrianRouter_DEBUG_NETWORK
250  std::cout << " " << pair.first->getID() << " -> " << targetPair.second->getID() << "\n";
251 #endif
252 
253  }
254  const N* fromNode = edge->getFromJunction();
255  outgoing = fromNode->getOutgoing();
256  for (typename std::vector<const E*>::iterator it = outgoing.begin(); it != outgoing.end(); ++it) {
257  // build backward-to-forward connections for all outgoing sidewalks at the fromNode
258  const E* targetEdge = *it;
259  const L* target = getSidewalk<E, L>(targetEdge);
260  if (targetEdge->isInternal() || target == 0 || targetEdge == edge) {
261  continue;
262  }
263  const EdgePair& targetPair = getBothDirections(targetEdge);
264  pair.second->myFollowingEdges.push_back(targetPair.first);
265 #ifdef PedestrianRouter_DEBUG_NETWORK
266  std::cout << " " << pair.second->getID() << " -> " << targetPair.first->getID() << "\n";
267 #endif
268  }
269  }
270  if (edge->isWalkingArea()) {
271  continue;
272  }
273  // build connections from depart connector
274  PedestrianEdge* startConnector = getDepartEdge(edge);
275  startConnector->myFollowingEdges.push_back(pair.first);
276  startConnector->myFollowingEdges.push_back(pair.second);
277  // build connections to arrival connector
278  PedestrianEdge* endConnector = getArrivalEdge(edge);
279  pair.first->myFollowingEdges.push_back(endConnector);
280  pair.second->myFollowingEdges.push_back(endConnector);
281 #ifdef PedestrianRouter_DEBUG_NETWORK
282  std::cout << " " << startConnector->getID() << " -> " << pair.first->getID() << "\n";
283  std::cout << " " << startConnector->getID() << " -> " << pair.second->getID() << "\n";
284  std::cout << " " << pair.first->getID() << " -> " << endConnector->getID() << "\n";
285  std::cout << " " << pair.second->getID() << " -> " << endConnector->getID() << "\n";
286 #endif
287  }
288  }
289 
290  bool includeInRoute(bool allEdges) const {
291  return !myAmConnector && (allEdges || (!myEdge->isCrossing() && !myEdge->isWalkingArea()));
292  }
293 
294  const E* getEdge() const {
295  return myEdge;
296  }
297 
299  static const EdgePair& getBothDirections(const E* e) {
300  typename std::map<const E*, EdgePair>::const_iterator it = myBidiLookup.find(e);
301  if (it == myBidiLookup.end()) {
302  assert(false);
303  throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '");
304  }
305  return (*it).second;
306  }
307 
309  static PedestrianEdge* getDepartEdge(const E* e) {
310  typename std::map<const E*, EdgePair>::const_iterator it = myFromToLookup.find(e);
311  if (it == myFromToLookup.end()) {
312  assert(false);
313  throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '");
314  }
315  return (*it).second.first;
316  }
317 
319  static PedestrianEdge* getArrivalEdge(const E* e) {
320  typename std::map<const E*, EdgePair>::const_iterator it = myFromToLookup.find(e);
321  if (it == myFromToLookup.end()) {
322  assert(false);
323  throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '");
324  }
325  return (*it).second.second;
326  }
327 
330 
331  unsigned int getNumericalID() const {
332  return myNumericalID;
333  }
334 
336  static const PedestrianEdge* dictionary(size_t index) {
337  assert(index < myEdgeDict.size());
338  return &myEdgeDict[index];
339  }
340 
341  unsigned int getNumSuccessors() const {
342  return (unsigned int)myFollowingEdges.size();
343  }
344 
345  const std::vector<PedestrianEdge*>& getSuccessors() const {
346  return myFollowingEdges;
347  }
348 
349  const std::vector<PedestrianEdge*>& getSuccessors(SUMOVehicleClass /*vClass*/) const {
350  // the network is already tailored for pedestrians. No need to check for permissions here
351  return myFollowingEdges;
352  }
353 
354  bool prohibits(const PedestrianTrip<E, N>* const trip) const {
355  if (trip->node == 0) {
356  // network only includes PedestrianEdges
357  return false;
358  } else {
359  // limit routing to the surroundings of the specified node
360  return (myEdge->getFromJunction() != trip->node
361  && myEdge->getToJunction() != trip->node);
362  }
363  }
364 
366 
367  /*@brief the function called by RouterTT_direct
368  * (distance is used as effort, effort is assumed to be independent of time
369  */
370  static SUMOReal getEffort(const PedestrianEdge* const edge, const PedestrianTrip<E, N>* const trip, SUMOReal time) {
371  if (edge->myAmConnector) {
372  return 0;
373  }
374  SUMOReal length = edge->myEdge->getLength();
375  if (edge->myEdge == trip->from) {
376  if (edge->myForward) {
377  length -= trip->departPos;
378  } else {
379  length = trip->departPos;
380  }
381  }
382  if (edge->myEdge == trip->to) {
383  if (edge->myForward) {
384  length = trip->arrivalPos;
385  } else {
386  length -= trip->arrivalPos;
387  }
388  }
389  // ensure that 'normal' edges always have a higher weight than connector edges
390  length = MAX2(length, POSITION_EPS);
391  SUMOReal tlsDelay = 0;
392  // @note pedestrian traffic lights should never have LINKSTATE_TL_REDYELLOW
393  if (edge->myEdge->isCrossing() && edge->myLane->getIncomingLinkState() == LINKSTATE_TL_RED) {
394  // red traffic lights occurring later in the route may be green by the time we arive
395  tlsDelay += MAX2(SUMOReal(0), TL_RED_PENALTY - (time - trip->departTime));
396 
397  }
398 #ifdef PedestrianRouter_DEBUG_EFFORTS
399  std::cout << " effort for " << trip->getID() << " at " << time << " edge=" << edge->getID() << " effort=" << length / trip->speed + tlsDelay << " l=" << length << " s=" << trip->speed << " tlsDelay=" << tlsDelay << "\n";
400 #endif
401  return length / trip->speed + tlsDelay;
402  }
403 
404 private:
405  PedestrianEdge(unsigned int numericalID, const E* edge, const L* lane, bool forward, bool connector = false) :
406  Named(edge->getID() + (edge->isWalkingArea() ? "" :
407  ((forward ? "_fwd" : "_bwd") + std::string(connector ? "_connector" : "")))),
408  myNumericalID(numericalID),
409  myEdge(edge),
410  myLane(lane),
411  myForward(forward),
412  myAmConnector(connector) { }
413 
415  unsigned int myNumericalID;
416 
418  const E* myEdge;
419 
421  const L* myLane;
422 
424  bool myForward;
425 
428 
430  std::vector<PedestrianEdge*> myFollowingEdges;
431 
433  static std::vector<PedestrianEdge> myEdgeDict;
434 
436  static std::map<const E*, EdgePair> myBidiLookup;
437 
439  static std::map<const E*, EdgePair> myFromToLookup;
440 
441 };
442 
443 
448 template<class E, class L, class N, class INTERNALROUTER>
449 class PedestrianRouter : public SUMOAbstractRouter<E, PedestrianTrip<E, N> > {
450 public:
451 
454 
457  SUMOAbstractRouter<E, _PedestrianTrip>(0, "PedestrianRouter") {
460  }
461 
463  virtual ~PedestrianRouter() {
464  delete myInternalRouter;
465  }
466 
469  }
470 
473  void compute(const E* from, const E* to, SUMOReal departPos, SUMOReal arrivalPos, SUMOReal speed,
474  SUMOTime msTime, const N* onlyNode, std::vector<const E*>& into, bool allEdges = false) {
475  //startQuery();
476  if (getSidewalk<E, L>(from) == 0) {
477  WRITE_WARNING("Departure edge '" + from->getID() + "' does not allow pedestrians.");
478  return;
479  }
480  if (getSidewalk<E, L>(to) == 0) {
481  WRITE_WARNING("Destination edge '" + to->getID() + "' does not allow pedestrians.");
482  return;
483  }
484  _PedestrianTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode);
485  std::vector<const _PedestrianEdge*> intoPed;
487  _PedestrianEdge::getArrivalEdge(to), &trip, msTime, intoPed);
488  for (size_t i = 0; i < intoPed.size(); ++i) {
489  if (intoPed[i]->includeInRoute(allEdges)) {
490  into.push_back(intoPed[i]->getEdge());
491  }
492  }
493 #ifdef PedestrianRouter_DEBUG_ROUTES
494  SUMOReal time = msTime;
495  for (size_t i = 0; i < intoPed.size(); ++i) {
496  time += myInternalRouter->getEffort(intoPed[i], &trip, time);
497  }
498  std::cout << TIME2STEPS(msTime) << " trip from " << from->getID() << " to " << to->getID()
499  << " departPos=" << departPos
500  << " arrivalPos=" << arrivalPos
501  << " onlyNode=" << (onlyNode == 0 ? "NULL" : onlyNode->getID())
502  << " edges=" << toString(intoPed)
503  << " resultEdges=" << toString(into)
504  << " time=" << time
505  << "\n";
506 #endif
507  //endQuery();
508  }
509 
512  void compute(const E*, const E*, const _PedestrianTrip* const,
513  SUMOTime, std::vector<const E*>&) {
514  throw ProcessError("Do not use this method");
515  }
516 
517  SUMOReal recomputeCosts(const std::vector<const E*>&, const _PedestrianTrip* const, SUMOTime) const {
518  throw ProcessError("Do not use this method");
519  }
520 
521  void prohibit(const std::vector<E*>& toProhibit) {
522  std::vector<_PedestrianEdge*> toProhibitPE;
523  for (typename std::vector<E*>::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) {
524  toProhibitPE.push_back(_PedestrianEdge::getBothDirections(*it).first);
525  toProhibitPE.push_back(_PedestrianEdge::getBothDirections(*it).second);
526  }
527  myInternalRouter->prohibit(toProhibitPE);
528  }
529 
530 private:
531  INTERNALROUTER* myInternalRouter;
532 
533 
534 private:
537 
538 private:
539 
540 };
541 
542 // common specializations
543 template<class E, class L, class N>
545  DijkstraRouterTT<PedestrianEdge<E, L, N>, PedestrianTrip<E, N>, prohibited_withRestrictions<PedestrianEdge<E, L, N>, PedestrianTrip<E, N> > > > { };
546 
547 
548 // ===========================================================================
549 // static member definitions (PedestrianEdge)
550 // ===========================================================================
551 
552 template<class E, class L, class N>
553 std::vector<PedestrianEdge<E, L, N> > PedestrianEdge<E, L, N>::myEdgeDict;
554 
555 template<class E, class L, class N>
556 std::map<const E*, typename PedestrianEdge<E, L, N>::EdgePair> PedestrianEdge<E, L, N>::myBidiLookup;
557 
558 template<class E, class L, class N>
559 std::map<const E*, typename PedestrianEdge<E, L, N>::EdgePair> PedestrianEdge<E, L, N>::myFromToLookup;
560 
561 #endif
562 
563 
564 /****************************************************************************/
565 
SUMOVehicleClass getVClass() const
PedestrianRouter()
Constructor.
is a pedestrian
const std::vector< PedestrianEdge * > & getSuccessors() const
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
const L * getSidewalk(const E *edge)
INTERNALROUTER * myInternalRouter
static const EdgePair & getBothDirections(const E *e)
Returns the pair of forward and backward edge.
PedestrianTrip(const E *_from, const E *_to, SUMOReal _departPos, SUMOReal _arrivalPos, SUMOReal _speed, SUMOReal _departTime, const N *_node)
const SUMOReal departPos
void compute(const E *, const E *, const _PedestrianTrip *const, SUMOTime, std::vector< const E * > &)
Builds the route between the given edges using the minimum effort at the given time The definition of...
static PedestrianEdge * getDepartEdge(const E *e)
Returns the departing Pedestrian edge.
bool includeInRoute(bool allEdges) const
std::string getID() const
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
T MAX2(T a, T b)
Definition: StdDefs.h:74
std::pair< PedestrianEdge *, PedestrianEdge * > EdgePair
std::vector< PedestrianEdge * > myFollowingEdges
List of edges that may be approached from this edge.
#define TIME2STEPS(x)
Definition: SUMOTime.h:66
static std::vector< PedestrianEdge > myEdgeDict
the edge dictionary
bool myForward
the direction of this edge
static PedestrianEdge * getArrivalEdge(const E *e)
Returns the arriving Pedestrian edge.
PedestrianTrip & operator=(const PedestrianTrip &)
Invalidated assignment operator.
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:200
static void cleanup()
const E * myEdge
the original edge
const std::string & getID() const
Returns the id.
Definition: Named.h:60
void compute(const E *from, const E *to, SUMOReal departPos, SUMOReal arrivalPos, SUMOReal speed, SUMOTime msTime, const N *onlyNode, std::vector< const E * > &into, bool allEdges=false)
Builds the route between the given edges using the minimum effort at the given time The definition of...
unsigned int getNumSuccessors() const
const E * getEdge() const
bool myAmConnector
the direction of this edge
const SUMOReal departTime
#define TL_RED_PENALTY
bool prohibits(const PedestrianTrip< E, N > *const trip) const
#define POSITION_EPS
Definition: config.h:189
PedestrianTrip< E, N > _PedestrianTrip
const SUMOReal arrivalPos
const L * myLane
the original edge
PedestrianEdge< E, L, N > _PedestrianEdge
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:53
Base class for objects which have an id.
Definition: Named.h:45
unsigned int getNumericalID() const
void prohibit(const std::vector< E * > &toProhibit)
static const PedestrianEdge * dictionary(size_t index)
Returns the PedstrianEdge with the given numericalID.
const std::vector< PedestrianEdge * > & getSuccessors(SUMOVehicleClass) const
PedestrianEdge(unsigned int numericalID, const E *edge, const L *lane, bool forward, bool connector=false)
The link has red light (must brake)
static size_t dictSize()
int SUMOTime
Definition: SUMOTime.h:43
static std::map< const E *, EdgePair > myBidiLookup
retrieve the forward and backward edge for the given input edge E
#define SUMOReal
Definition: config.h:218
the edge type that is given to the internal router (SUMOAbstractRouter)
PedestrianRouter & operator=(const PedestrianRouter &s)
Invalidated assignment operator.
const SUMOReal speed
virtual SUMOAbstractRouter< E, PedestrianTrip< E, N > > * clone() const
static SUMOReal getEffort(const PedestrianEdge *const edge, const PedestrianTrip< E, N > *const trip, SUMOReal time)
unsigned int myNumericalID
the index in myEdgeDict
SUMOReal recomputeCosts(const std::vector< const E * > &, const _PedestrianTrip *const, SUMOTime) const
virtual ~PedestrianRouter()
Destructor.
static void initPedestrianNetwork(size_t noE)
static std::map< const E *, EdgePair > myFromToLookup
retrieve the depart and arrival edge for the given input edge E