SUMO - Simulation of Urban MObility
MSEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
11 // A road/street connecting two junctions
12 /****************************************************************************/
13 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
14 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 #ifndef MSEdge_h
25 #define MSEdge_h
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 #include <vector>
38 #include <map>
39 #include <string>
40 #include <iostream>
41 #include <utils/common/Named.h>
43 #include <utils/common/SUMOTime.h>
45 #include <utils/geom/Boundary.h>
47 #include "MSNet.h"
48 
49 
50 // ===========================================================================
51 // class declarations
52 // ===========================================================================
53 class Boundary;
54 class OutputDevice;
55 class SUMOVehicle;
57 class MSVehicle;
58 class MSLane;
59 class MSLaneChanger;
60 class MSPerson;
61 class MSJunction;
62 class MSEdge;
63 class MSContainer;
64 class MSTransportable;
65 
66 
67 // ===========================================================================
68 // class definitions
69 // ===========================================================================
78 typedef std::vector<MSEdge*> MSEdgeVector;
79 typedef std::vector<const MSEdge*> ConstMSEdgeVector;
80 
81 class MSEdge : public Named, public Parameterised {
82 public:
84  typedef std::map< const MSEdge*, std::vector<MSLane*>* > AllowedLanesCont;
85 
87  typedef std::map< SUMOVehicleClass, AllowedLanesCont > ClassedAllowedLanesCont;
88 
89 
90 public:
102  MSEdge(const std::string& id, int numericalID, const SumoXMLEdgeFunc function,
103  const std::string& streetName, const std::string& edgeType, int priority);
104 
105 
107  virtual ~MSEdge();
108 
109 
115  void initialize(const std::vector<MSLane*>* lanes);
116 
117 
120  void recalcCache();
121 
122 
124  void closeBuilding();
125 
127  void buildLaneChanger();
128 
129  /* @brief returns whether initizliaing a lane change is permitted on this edge
130  * @note Has to be called after all sucessors and predecessors have been set (after closeBuilding())
131  */
132  bool allowsLaneChanging();
133 
136 
143  MSLane* leftLane(const MSLane* const lane) const;
144 
145 
152  MSLane* rightLane(const MSLane* const lane) const;
153 
154 
161  MSLane* parallelLane(const MSLane* const lane, int offset) const;
162 
163 
168  const std::vector<MSLane*>& getLanes() const {
169  return *myLanes;
170  }
171 
177  inline const std::set<MSTransportable*>& getPersons() const {
178  return myPersons;
179  }
180 
185  std::vector<MSTransportable*> getSortedPersons(SUMOTime timestep, bool includeRiding = false) const;
186 
187 
192  std::vector<MSTransportable*> getSortedContainers(SUMOTime timestep, bool includeRiding = false) const;
193 
202  const std::vector<MSLane*>* allowedLanes(const MSEdge& destination,
203  SUMOVehicleClass vclass = SVC_IGNORING) const;
204 
205 
213  const std::vector<MSLane*>* allowedLanes(SUMOVehicleClass vclass = SVC_IGNORING) const;
215 
216 
217 
220 
225  inline SumoXMLEdgeFunc getFunction() const {
226  return myFunction;
227  }
228 
230  inline bool isInternal() const {
231  return myFunction == EDGEFUNC_INTERNAL;
232  }
233 
235  inline bool isCrossing() const {
236  return myFunction == EDGEFUNC_CROSSING;
237  }
238 
239 
242 
244  inline const MSEdge* getMyOppositeSuperposableEdge() const {
246  }
247 
249  inline bool isWalkingArea() const {
251  }
252 
253  inline bool isTazConnector() const {
254  return myFunction == EDGEFUNC_CONNECTOR;
255  }
256 
260  inline int getNumericalID() const {
261  return myNumericalID;
262  }
263 
264 
267  const std::string& getStreetName() const {
268  return myStreetName;
269  }
270 
273  const std::string& getEdgeType() const {
274  return myEdgeType;
275  }
276 
279  int getPriority() const {
280  return myPriority;
281  }
283 
287  void setCrossingEdges(const std::vector<std::string>& crossingEdges) {
288  myCrossingEdges.clear();
289  myCrossingEdges.insert(myCrossingEdges.begin(), crossingEdges.begin(), crossingEdges.end());
290  }
291 
295  const std::vector<std::string>& getCrossingEdges() const {
296  return myCrossingEdges;
297  }
298 
299 
302 
308  void addSuccessor(MSEdge* edge);
309 
313  int getNumSuccessors() const {
314  return (int) mySuccessors.size();
315  }
316 
317 
320  const MSEdgeVector& getSuccessors() const {
321  return mySuccessors;
322  }
323 
324 
329  const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const;
330 
331 
336  int getNumPredecessors() const {
337  return (int) myPredecessors.size();
338  }
339 
340 
344  const MSEdgeVector& getPredecessors() const {
345  return myPredecessors;
346  }
347 
348 
349  const MSJunction* getFromJunction() const {
350  return myFromJunction;
351  }
352 
353  const MSJunction* getToJunction() const {
354  return myToJunction;
355  }
356 
357 
358  void setJunctions(MSJunction* from, MSJunction* to) {
359  myFromJunction = from;
360  myToJunction = to;
361  }
363 
364 
365 
368 
372  bool isVaporizing() const {
373  return myVaporizationRequests > 0;
374  }
375 
376 
387 
388 
400 
401 
410  double getCurrentTravelTime(const double minSpeed = NUMERICAL_EPS) const;
411 
412 
414  inline double getMinimumTravelTime(const SUMOVehicle* const veh) const {
416  return 0;
417  } else if (veh != 0) {
418  return getLength() / getVehicleMaxSpeed(veh);
419  } else {
420  return getLength() / getSpeedLimit();
421  }
422  }
423 
424 
432  static inline double getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, double time) {
433  return MSNet::getInstance()->getTravelTime(edge, veh, time);
434  }
435 
438  double getRoutingSpeed() const;
439 
440 
443 
463  bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false, const bool forceCheck = false) const;
464 
465 
485  MSLane* getFreeLane(const std::vector<MSLane*>* allowed, const SUMOVehicleClass vclass, double departPos) const;
486 
487 
498  MSLane* getDepartLane(MSVehicle& veh) const;
499 
500 
506  }
507 
508 
512  inline void setLastFailedInsertionTime(SUMOTime time) const {
514  }
516 
517 
519  virtual void changeLanes(SUMOTime t);
520 
521 
523  const MSEdge* getInternalFollowingEdge(const MSEdge* followerAfterInternal) const;
524 
525 
527  double getInternalFollowingLengthTo(const MSEdge* followerAfterInternal) const;
528 
530  const MSEdge* getNormalBefore() const;
531 
533  inline bool prohibits(const SUMOVehicle* const vehicle) const {
534  if (vehicle == 0) {
535  return false;
536  }
537  const SUMOVehicleClass svc = vehicle->getVClass();
538  return (myCombinedPermissions & svc) != svc;
539  }
540 
542  return myCombinedPermissions;
543  }
544 
548  double getWidth() const {
549  return myWidth;
550  }
551 
553  const std::vector<double> getSubLaneSides() const {
554  return mySublaneSides;
555  }
556 
557  void rebuildAllowedLanes();
558 
559 
564  double getDistanceTo(const MSEdge* other) const;
565 
566 
570  inline double getLength() const {
571  return myLength;
572  }
573 
574 
579  double getSpeedLimit() const;
580 
582  double getLengthGeometryFactor() const;
583 
587  void setMaxSpeed(double val) const;
588 
594  double getVehicleMaxSpeed(const SUMOVehicle* const veh) const;
595 
596  virtual void addPerson(MSTransportable* p) const {
597  myPersons.insert(p);
598  }
599 
600  virtual void removePerson(MSTransportable* p) const {
601  std::set<MSTransportable*>::iterator i = myPersons.find(p);
602  if (i != myPersons.end()) {
603  myPersons.erase(i);
604  }
605  }
606 
608  virtual void addContainer(MSTransportable* container) const {
609  myContainers.insert(container);
610  }
611 
613  virtual void removeContainer(MSTransportable* container) const {
614  std::set<MSTransportable*>::iterator i = myContainers.find(container);
615  if (i != myContainers.end()) {
616  myContainers.erase(i);
617  }
618  }
619 
620  inline bool isRoundabout() const {
621  return myAmRoundabout;
622  }
623 
625  myAmRoundabout = true;
626  }
627 
628  void markDelayed() const {
629  myAmDelayed = true;
630  }
631 
632  bool hasLaneChanger() const {
633  return myLaneChanger != 0;
634  }
635 
637  bool canChangeToOpposite();
638 
640  double getMeanSpeed() const;
641 
643  bool hasMinorLink() const;
644 
646  bool isFringe() const {
647  return myAmFringe;
648  }
649 
651  virtual void lock() const {}
652 
654  virtual void unlock() const {};
655 
659  static bool dictionary(const std::string& id, MSEdge* edge);
660 
662  static MSEdge* dictionary(const std::string& id);
663 
665  static int dictSize();
666 
668  static const MSEdgeVector& getAllEdges();
669 
671  static void clear();
672 
674  static void insertIDs(std::vector<std::string>& into);
675 
676 
677 public:
680 
689  static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into,
690  const std::string& rid);
691 
692 
699  static void parseEdgesList(const std::vector<std::string>& desc, ConstMSEdgeVector& into,
700  const std::string& rid);
702 
703 
704 protected:
708  class by_id_sorter {
709  public:
711  explicit by_id_sorter() { }
712 
714  int operator()(const MSEdge* const e1, const MSEdge* const e2) const {
715  return e1->getID() < e2->getID();
716  }
717 
718  };
719 
724  public:
726  explicit transportable_by_position_sorter(SUMOTime timestep): myTime(timestep) { }
727 
729  int operator()(const MSTransportable* const c1, const MSTransportable* const c2) const;
730  private:
732  };
733 
734 
743  const std::vector<MSLane*>* allowedLanes(const MSEdge* destination,
744  SUMOVehicleClass vclass = SVC_IGNORING) const;
745 
746 
748  const std::vector<MSLane*>* getAllowedLanesWithDefault(const AllowedLanesCont& c, const MSEdge* dest) const;
749 
750 
752  double getDepartPosBound(const MSVehicle& veh, bool upper = true) const;
753 
754 protected:
756  const int myNumericalID;
757 
759  const std::vector<MSLane*>* myLanes;
760 
763 
766 
769 
772 
776  mutable std::set<int> myFailedInsertionMemory;
777 
779  std::vector<std::string> myCrossingEdges;
780 
783 
786 
790 
792  mutable std::set<MSTransportable*> myPersons;
793 
795  mutable std::set<MSTransportable*> myContainers;
796 
799 
801  AllowedLanesCont myAllowed;
802 
804  // @note: this map is filled on demand
805  mutable ClassedAllowedLanesCont myClassedAllowed;
806 
812 
814  std::string myStreetName;
815 
817  std::string myEdgeType;
818 
820  const int myPriority;
821 
823  double myWidth;
824 
826  double myLength;
827 
830 
832  mutable bool myAmDelayed;
833 
836 
839 
841  std::vector<double> mySublaneSides;
842 
845 
847  typedef std::map< std::string, MSEdge* > DictType;
848 
852  static DictType myDict;
853 
859 
860 
862  mutable std::map<SUMOVehicleClass, MSEdgeVector> myClassesSuccessorMap;
863 
866 
867 private:
868 
871 
873  MSEdge(const MSEdge&);
874 
876  MSEdge& operator=(const MSEdge&);
877 
878  bool isSuperposable(const MSEdge* other);
879 };
880 
881 
882 #endif
883 
884 /****************************************************************************/
885 
double getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:414
const SumoXMLEdgeFunc myFunction
the purpose of the edge
Definition: MSEdge.h:765
double getInternalFollowingLengthTo(const MSEdge *followerAfterInternal) const
returns the length of all internal edges on the junction until reaching the non-internal edge followe...
Definition: MSEdge.cpp:677
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
Definition: MSEdge.h:832
double getLength() const
return the length of the edge
Definition: MSEdge.h:570
bool allowsLaneChanging()
Definition: MSEdge.cpp:224
std::set< MSTransportable * > myContainers
Containers on the edge.
Definition: MSEdge.h:795
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
Definition: MSEdge.cpp:794
Sorts edges by their ids.
Definition: MSEdge.h:708
void addSuccessor(MSEdge *edge)
Adds an edge to the list of edges which may be reached from this edge and to the incoming of the othe...
Definition: MSEdge.cpp:914
MSEdge(const std::string &id, int numericalID, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
Definition: MSEdge.cpp:71
const MSEdge * getInternalFollowingEdge(const MSEdge *followerAfterInternal) const
Definition: MSEdge.cpp:657
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static int dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:772
void initialize(const std::vector< MSLane * > *lanes)
Initialize the edge.
Definition: MSEdge.cpp:108
const std::vector< MSLane * > & getLanes() const
Returns this edge&#39;s lanes.
Definition: MSEdge.h:168
bool isTazConnector() const
Definition: MSEdge.h:253
virtual void lock() const
grant exclusive access to the mesoscopic state
Definition: MSEdge.h:651
void recalcCache()
Recalculates the cached values.
Definition: MSEdge.cpp:129
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:608
The base class for an intersection.
Definition: MSJunction.h:64
static MSEdgeVector myEdges
Static list of edges.
Definition: MSEdge.h:857
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
double getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
Definition: MSEdge.cpp:847
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
Definition: MSEdge.h:287
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
Definition: MSEdge.h:805
bool isWalkingArea() const
return whether this edge is walking area
Definition: MSEdge.h:249
void closeBuilding()
Definition: MSEdge.cpp:160
virtual ~MSEdge()
Destructor.
Definition: MSEdge.cpp:92
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:267
const MSEdge * myOppositingSuperposableEdge
the oppositing superposble edge
Definition: MSEdge.h:870
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:169
std::string myEdgeType
the type of the edge (optionally used during network creation)
Definition: MSEdge.h:817
SVCPermissions getPermissions() const
Definition: MSEdge.h:541
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge&#39;s persons sorted by pos.
Definition: MSEdge.cpp:877
transportable_by_position_sorter(SUMOTime timestep)
constructor
Definition: MSEdge.h:726
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn&#39;t already in the dictionary...
Definition: MSEdge.cpp:745
std::vector< double > mySublaneSides
the right side for each sublane on this edge
Definition: MSEdge.h:841
const int myNumericalID
This edge&#39;s numerical id.
Definition: MSEdge.h:756
double getRoutingSpeed() const
Returns the averaged speed used by the routing device.
Definition: MSEdge.cpp:738
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
Definition: MSEdge.cpp:379
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:79
bool hasMinorLink() const
whether any lane has a minor link
Definition: MSEdge.cpp:973
int myVaporizationRequests
Vaporizer counter.
Definition: MSEdge.h:768
bool prohibits(const SUMOVehicle *const vehicle) const
Returns whether the vehicle (class) is not allowed on the edge.
Definition: MSEdge.h:533
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
Definition: MSEdge.cpp:386
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
Definition: MSEdge.h:613
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
Definition: MSEdge.h:847
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle&#39;s access class.
SumoXMLEdgeFunc getFunction() const
Returns the edge type (SumoXMLEdgeFunc)
Definition: MSEdge.h:225
void checkAndRegisterBiDirEdge()
check and register the opposite superposable edge if any
Definition: MSEdge.cpp:986
const std::vector< double > getSubLaneSides() const
Returns the right side offsets of this edge&#39;s sublanes.
Definition: MSEdge.h:553
MSEdge & operator=(const MSEdge &)
assignment operator.
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:55
const std::string & getID() const
Returns the id.
Definition: Named.h:66
A road/street connecting two junctions.
Definition: MSEdge.h:81
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
Definition: MSEdge.h:771
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition: MSEdge.h:862
void rebuildAllowedLanes()
Definition: MSEdge.cpp:247
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
Definition: MSEdge.cpp:859
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:600
double myLength
the length of the edge (cached value for speedup)
Definition: MSEdge.h:826
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep, bool includeRiding=false) const
Returns this edge&#39;s containers sorted by pos.
Definition: MSEdge.cpp:895
double getDepartPosBound(const MSVehicle &veh, bool upper=true) const
return upper bound for the depart position on this edge
Definition: MSEdge.cpp:424
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:596
Representation of a vehicle.
Definition: SUMOVehicle.h:67
static double getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition: MSEdge.h:432
const MSEdgeVector & getPredecessors() const
Definition: MSEdge.h:344
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:152
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
Definition: MSEdge.h:801
std::map< SUMOVehicleClass, AllowedLanesCont > ClassedAllowedLanesCont
Map from vehicle types to lanes that may be used to reach one of the next edges.
Definition: MSEdge.h:87
static void clear()
Clears the dictionary.
Definition: MSEdge.cpp:784
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
Definition: MSEdge.h:808
double getDistanceTo(const MSEdge *other) const
optimistic air distance heuristic for use in routing
Definition: MSEdge.cpp:832
MSEdgeVector mySuccessors
The succeeding edges.
Definition: MSEdge.h:782
MSLane * leftLane(const MSLane *const lane) const
Returns the lane left to the one given, 0 if the given lane is leftmost.
Definition: MSEdge.cpp:269
MSJunction * myToJunction
Definition: MSEdge.h:789
MSLaneChanger * myLaneChanger
This member will do the lane-change.
Definition: MSEdge.h:762
void markDelayed() const
Definition: MSEdge.h:628
bool isRoundabout() const
Definition: MSEdge.h:620
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
Definition: MSEdge.h:313
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
Definition: MSEdge.h:372
bool myAmFringe
whether this edge is at the network fringe
Definition: MSEdge.h:838
const MSEdge * getMyOppositeSuperposableEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition: MSEdge.h:244
bool insertVehicle(SUMOVehicle &v, SUMOTime time, const bool checkOnly=false, const bool forceCheck=false) const
Tries to insert the given vehicle into the network.
Definition: MSEdge.cpp:531
const std::vector< MSLane * > * myLanes
Container for the edge&#39;s lane; should be sorted: (right-hand-traffic) the more left the lane...
Definition: MSEdge.h:759
An upper class for objects with additional parameters.
Definition: Parameterised.h:51
bool isInternal() const
return whether this edge is an internal edge
Definition: MSEdge.h:230
const std::string & getEdgeType() const
Returns the type of the edge.
Definition: MSEdge.h:273
bool isSuperposable(const MSEdge *other)
Definition: MSEdge.cpp:1004
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
Definition: MSEdge.cpp:965
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Definition: MSEdge.cpp:468
Base class for objects which have an id.
Definition: Named.h:46
double getWidth() const
Returns the edges&#39;s width (sum over all lanes)
Definition: MSEdge.h:548
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
Definition: MSEdge.h:810
const MSEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself ...
Definition: MSEdge.cpp:691
void buildLaneChanger()
Has to be called after all sucessors and predecessors have been set (after closeBuilding()) ...
Definition: MSEdge.cpp:206
Structure representing possible vehicle parameter.
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
Definition: MSEdge.h:714
virtual void unlock() const
release exclusive access to the mesoscopic state
Definition: MSEdge.h:654
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:260
int getPriority() const
Returns the priority of the edge.
Definition: MSEdge.h:279
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
Definition: MSEdge.h:295
MSLane * parallelLane(const MSLane *const lane, int offset) const
Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist...
Definition: MSEdge.cpp:281
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:778
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
Definition: MSEdge.cpp:647
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass, double departPos) const
Finds the emptiest lane allowing the vehicle class.
Definition: MSEdge.cpp:393
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
Get the allowed lanes to reach the destination-edge.
Definition: MSEdge.cpp:296
bool myAmRoundabout
whether this edge belongs to a roundabout
Definition: MSEdge.h:835
double myWidth
Edge width [m].
Definition: MSEdge.h:823
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
std::string myStreetName
the real-world name of this edge (need not be unique)
Definition: MSEdge.h:814
MSJunction * myFromJunction
the junctions for this edge
Definition: MSEdge.h:788
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
Definition: MSEdge.h:504
void setJunctions(MSJunction *from, MSJunction *to)
Definition: MSEdge.h:358
by_id_sorter()
constructor
Definition: MSEdge.h:711
std::map< const MSEdge *, std::vector< MSLane * > * > AllowedLanesCont
Suceeding edges (keys) and allowed lanes to reach these edges (values).
Definition: MSEdge.h:84
const int myPriority
the priority of the edge (used during network creation)
Definition: MSEdge.h:820
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
Definition: MSEdge.h:512
void setMaxSpeed(double val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
Definition: MSEdge.cpp:866
std::vector< std::string > myCrossingEdges
The crossed edges id for a crossing edge. On not crossing edges it is empty.
Definition: MSEdge.h:779
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSEdge.h:852
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
const std::set< MSTransportable * > & getPersons() const
Returns this edge&#39;s persons set.
Definition: MSEdge.h:177
Sorts transportables by their positions.
Definition: MSEdge.h:723
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: MSEdge.h:235
const MSJunction * getFromJunction() const
Definition: MSEdge.h:349
const MSEdgeVector & getSuccessors() const
Returns the following edges.
Definition: MSEdge.h:320
long long int SUMOTime
Definition: TraCIDefs.h:52
#define NUMERICAL_EPS
Definition: config.h:152
double getLengthGeometryFactor() const
return shape.length() / myLength
Definition: MSEdge.cpp:854
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:78
MSLane * rightLane(const MSLane *const lane) const
Returns the lane right to the one given, 0 if the given lane is rightmost.
Definition: MSEdge.cpp:275
void markAsRoundabout()
Definition: MSEdge.h:624
Boundary myTazBoundary
The bounding rectangle of incoming or outgoing edges for taz connectors.
Definition: MSEdge.h:865
double getMeanSpeed() const
get the mean speed
Definition: MSEdge.cpp:701
const std::vector< MSLane * > * getAllowedLanesWithDefault(const AllowedLanesCont &c, const MSEdge *dest) const
lookup in map and return 0 if not found
Definition: MSEdge.cpp:308
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
Definition: MSEdge.h:336
MSEdgeVector myPredecessors
The preceeding edges.
Definition: MSEdge.h:785
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
double myEmptyTraveltime
the traveltime on the empty edge (cached value for speedup)
Definition: MSEdge.h:829
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
Definition: MSEdge.cpp:728
static void parseEdgesList(const std::string &desc, ConstMSEdgeVector &into, const std::string &rid)
Parses the given string assuming it contains a list of edge ids divided by spaces.
Definition: MSEdge.cpp:802
bool isFringe() const
return whether this edge is at the fringe of the network
Definition: MSEdge.h:646
vehicles ignoring classes
bool hasLaneChanger() const
Definition: MSEdge.h:632
std::set< int > myFailedInsertionMemory
A cache for the rejected insertion attempts. Used to assure that no further insertion attempts are ma...
Definition: MSEdge.h:776
const MSJunction * getToJunction() const
Definition: MSEdge.h:353
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
Definition: MSEdge.h:792