SUMO - Simulation of Urban MObility
MSEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
21 // A road/street connecting two junctions
22 /****************************************************************************/
23 #ifndef MSEdge_h
24 #define MSEdge_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <vector>
37 #include <map>
38 #include <string>
39 #include <iostream>
40 #include <utils/common/Named.h>
42 #include <utils/common/SUMOTime.h>
44 #include <utils/geom/Boundary.h>
46 #include "MSNet.h"
47 
48 
49 // ===========================================================================
50 // class declarations
51 // ===========================================================================
52 class Boundary;
53 class OutputDevice;
54 class SUMOVehicle;
56 class MSVehicle;
57 class MSLane;
58 class MSLaneChanger;
59 class MSPerson;
60 class MSJunction;
61 class MSEdge;
62 class MSContainer;
63 class MSTransportable;
64 
65 
66 // ===========================================================================
67 // class definitions
68 // ===========================================================================
77 typedef std::vector<MSEdge*> MSEdgeVector;
78 typedef std::vector<const MSEdge*> ConstMSEdgeVector;
79 
80 class MSEdge : public Named, public Parameterised {
81 public:
83  typedef std::map< const MSEdge*, std::vector<MSLane*>* > AllowedLanesCont;
84 
86  typedef std::map< SUMOVehicleClass, AllowedLanesCont > ClassedAllowedLanesCont;
87 
88 
89 public:
101  MSEdge(const std::string& id, int numericalID, const SumoXMLEdgeFunc function,
102  const std::string& streetName, const std::string& edgeType, int priority);
103 
104 
106  virtual ~MSEdge();
107 
108 
114  void initialize(const std::vector<MSLane*>* lanes);
115 
116 
119  void recalcCache();
120 
121 
123  void closeBuilding();
124 
126  void buildLaneChanger();
127 
128  /* @brief returns whether initizliaing a lane change is permitted on this edge
129  * @note Has to be called after all sucessors and predecessors have been set (after closeBuilding())
130  */
131  bool allowsLaneChanging();
132 
135 
142  MSLane* leftLane(const MSLane* const lane) const;
143 
144 
151  MSLane* rightLane(const MSLane* const lane) const;
152 
153 
160  MSLane* parallelLane(const MSLane* const lane, int offset) const;
161 
162 
167  const std::vector<MSLane*>& getLanes() const {
168  return *myLanes;
169  }
170 
176  inline const std::set<MSTransportable*>& getPersons() const {
177  return myPersons;
178  }
179 
184  std::vector<MSTransportable*> getSortedPersons(SUMOTime timestep, bool includeRiding = false) const;
185 
186 
191  std::vector<MSTransportable*> getSortedContainers(SUMOTime timestep, bool includeRiding = false) const;
192 
201  const std::vector<MSLane*>* allowedLanes(const MSEdge& destination,
202  SUMOVehicleClass vclass = SVC_IGNORING) const;
203 
204 
212  const std::vector<MSLane*>* allowedLanes(SUMOVehicleClass vclass = SVC_IGNORING) const;
214 
215 
216 
219 
224  inline SumoXMLEdgeFunc getFunction() const {
225  return myFunction;
226  }
227 
229  inline bool isInternal() const {
230  return myFunction == EDGEFUNC_INTERNAL;
231  }
232 
234  inline bool isCrossing() const {
235  return myFunction == EDGEFUNC_CROSSING;
236  }
237 
238 
241 
243  inline const MSEdge* getMyOppositeSuperposableEdge() const {
245  }
246 
248  inline bool isWalkingArea() const {
250  }
251 
252  inline bool isTazConnector() const {
253  return myFunction == EDGEFUNC_CONNECTOR;
254  }
255 
259  inline int getNumericalID() const {
260  return myNumericalID;
261  }
262 
263 
266  const std::string& getStreetName() const {
267  return myStreetName;
268  }
269 
272  const std::string& getEdgeType() const {
273  return myEdgeType;
274  }
275 
278  int getPriority() const {
279  return myPriority;
280  }
282 
286  void setCrossingEdges(const std::vector<std::string>& crossingEdges) {
287  myCrossingEdges.clear();
288  myCrossingEdges.insert(myCrossingEdges.begin(), crossingEdges.begin(), crossingEdges.end());
289  }
290 
294  const std::vector<std::string>& getCrossingEdges() const {
295  return myCrossingEdges;
296  }
297 
298 
301 
307  void addSuccessor(MSEdge* edge);
308 
312  int getNumSuccessors() const {
313  return (int) mySuccessors.size();
314  }
315 
316 
319  const MSEdgeVector& getSuccessors() const {
320  return mySuccessors;
321  }
322 
323 
328  const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const;
329 
330 
335  int getNumPredecessors() const {
336  return (int) myPredecessors.size();
337  }
338 
339 
343  const MSEdgeVector& getPredecessors() const {
344  return myPredecessors;
345  }
346 
347 
348  const MSJunction* getFromJunction() const {
349  return myFromJunction;
350  }
351 
352  const MSJunction* getToJunction() const {
353  return myToJunction;
354  }
355 
356 
357  void setJunctions(MSJunction* from, MSJunction* to) {
358  myFromJunction = from;
359  myToJunction = to;
360  }
362 
363 
364 
367 
371  bool isVaporizing() const {
372  return myVaporizationRequests > 0;
373  }
374 
375 
386 
387 
399 
400 
409  double getCurrentTravelTime(const double minSpeed = NUMERICAL_EPS) const;
410 
411 
413  inline double getMinimumTravelTime(const SUMOVehicle* const veh) const {
415  return 0;
416  } else if (veh != 0) {
417  return getLength() / getVehicleMaxSpeed(veh);
418  } else {
419  return getLength() / getSpeedLimit();
420  }
421  }
422 
423 
431  static inline double getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, double time) {
432  return MSNet::getInstance()->getTravelTime(edge, veh, time);
433  }
434 
437  double getRoutingSpeed() const;
438 
439 
442 
462  bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false, const bool forceCheck = false) const;
463 
464 
484  MSLane* getFreeLane(const std::vector<MSLane*>* allowed, const SUMOVehicleClass vclass, double departPos) const;
485 
486 
497  MSLane* getDepartLane(MSVehicle& veh) const;
498 
499 
505  }
506 
507 
511  inline void setLastFailedInsertionTime(SUMOTime time) const {
513  }
515 
516 
518  virtual void changeLanes(SUMOTime t);
519 
520 
522  const MSEdge* getInternalFollowingEdge(const MSEdge* followerAfterInternal) const;
523 
524 
526  double getInternalFollowingLengthTo(const MSEdge* followerAfterInternal) const;
527 
529  const MSEdge* getNormalBefore() const;
530 
532  inline bool prohibits(const SUMOVehicle* const vehicle) const {
533  if (vehicle == 0) {
534  return false;
535  }
536  const SUMOVehicleClass svc = vehicle->getVClass();
537  return (myCombinedPermissions & svc) != svc;
538  }
539 
541  return myCombinedPermissions;
542  }
543 
547  double getWidth() const {
548  return myWidth;
549  }
550 
552  const std::vector<double> getSubLaneSides() const {
553  return mySublaneSides;
554  }
555 
556  void rebuildAllowedLanes();
557 
558 
563  double getDistanceTo(const MSEdge* other) const;
564 
565 
569  inline double getLength() const {
570  return myLength;
571  }
572 
573 
578  double getSpeedLimit() const;
579 
581  double getLengthGeometryFactor() const;
582 
586  void setMaxSpeed(double val) const;
587 
593  double getVehicleMaxSpeed(const SUMOVehicle* const veh) const;
594 
595  virtual void addPerson(MSTransportable* p) const {
596  myPersons.insert(p);
597  }
598 
599  virtual void removePerson(MSTransportable* p) const {
600  std::set<MSTransportable*>::iterator i = myPersons.find(p);
601  if (i != myPersons.end()) {
602  myPersons.erase(i);
603  }
604  }
605 
607  virtual void addContainer(MSTransportable* container) const {
608  myContainers.insert(container);
609  }
610 
612  virtual void removeContainer(MSTransportable* container) const {
613  std::set<MSTransportable*>::iterator i = myContainers.find(container);
614  if (i != myContainers.end()) {
615  myContainers.erase(i);
616  }
617  }
618 
619  inline bool isRoundabout() const {
620  return myAmRoundabout;
621  }
622 
624  myAmRoundabout = true;
625  }
626 
627  void markDelayed() const {
628  myAmDelayed = true;
629  }
630 
631  bool hasLaneChanger() const {
632  return myLaneChanger != 0;
633  }
634 
636  bool canChangeToOpposite();
637 
639  double getMeanSpeed() const;
640 
642  bool hasMinorLink() const;
643 
645  bool isFringe() const {
646  return myAmFringe;
647  }
648 
650  virtual void lock() const {}
651 
653  virtual void unlock() const {};
654 
658  static bool dictionary(const std::string& id, MSEdge* edge);
659 
661  static MSEdge* dictionary(const std::string& id);
662 
664  static int dictSize();
665 
667  static const MSEdgeVector& getAllEdges();
668 
670  static void clear();
671 
673  static void insertIDs(std::vector<std::string>& into);
674 
675 
676 public:
679 
688  static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into,
689  const std::string& rid);
690 
691 
698  static void parseEdgesList(const std::vector<std::string>& desc, ConstMSEdgeVector& into,
699  const std::string& rid);
701 
702 
703 protected:
707  class by_id_sorter {
708  public:
710  explicit by_id_sorter() { }
711 
713  int operator()(const MSEdge* const e1, const MSEdge* const e2) const {
714  return e1->getID() < e2->getID();
715  }
716 
717  };
718 
723  public:
725  explicit transportable_by_position_sorter(SUMOTime timestep): myTime(timestep) { }
726 
728  int operator()(const MSTransportable* const c1, const MSTransportable* const c2) const;
729  private:
731  };
732 
733 
742  const std::vector<MSLane*>* allowedLanes(const MSEdge* destination,
743  SUMOVehicleClass vclass = SVC_IGNORING) const;
744 
745 
747  const std::vector<MSLane*>* getAllowedLanesWithDefault(const AllowedLanesCont& c, const MSEdge* dest) const;
748 
749 
751  double getDepartPosBound(const MSVehicle& veh, bool upper = true) const;
752 
753 protected:
755  const int myNumericalID;
756 
758  const std::vector<MSLane*>* myLanes;
759 
762 
765 
768 
771 
775  mutable std::set<int> myFailedInsertionMemory;
776 
778  std::vector<std::string> myCrossingEdges;
779 
782 
785 
789 
791  mutable std::set<MSTransportable*> myPersons;
792 
794  mutable std::set<MSTransportable*> myContainers;
795 
798 
800  AllowedLanesCont myAllowed;
801 
803  // @note: this map is filled on demand
804  mutable ClassedAllowedLanesCont myClassedAllowed;
805 
811 
813  std::string myStreetName;
814 
816  std::string myEdgeType;
817 
819  const int myPriority;
820 
822  double myWidth;
823 
825  double myLength;
826 
829 
831  mutable bool myAmDelayed;
832 
835 
838 
840  std::vector<double> mySublaneSides;
841 
844 
846  typedef std::map< std::string, MSEdge* > DictType;
847 
851  static DictType myDict;
852 
858 
859 
861  mutable std::map<SUMOVehicleClass, MSEdgeVector> myClassesSuccessorMap;
862 
865 
866 private:
867 
870 
872  MSEdge(const MSEdge&);
873 
875  MSEdge& operator=(const MSEdge&);
876 
877  bool isSuperposable(const MSEdge* other);
878 };
879 
880 
881 #endif
882 
883 /****************************************************************************/
884 
const SumoXMLEdgeFunc myFunction
the purpose of the edge
Definition: MSEdge.h:764
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
Definition: MSEdge.h:831
double getDepartPosBound(const MSVehicle &veh, bool upper=true) const
return upper bound for the depart position on this edge
Definition: MSEdge.cpp:423
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
Definition: MSEdge.h:335
const std::vector< double > getSubLaneSides() const
Returns the right side offsets of this edge&#39;s sublanes.
Definition: MSEdge.h:552
bool allowsLaneChanging()
Definition: MSEdge.cpp:223
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:530
std::set< MSTransportable * > myContainers
Containers on the edge.
Definition: MSEdge.h:794
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:793
Sorts edges by their ids.
Definition: MSEdge.h:707
int getPriority() const
Returns the priority of the edge.
Definition: MSEdge.h:278
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:913
MSEdge(const std::string &id, int numericalID, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
Definition: MSEdge.cpp:70
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:280
double getLengthGeometryFactor() const
return shape.length() / myLength
Definition: MSEdge.cpp:853
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:771
virtual void unlock() const
release exclusive access to the mesoscopic state
Definition: MSEdge.h:653
void recalcCache()
Recalculates the cached values.
Definition: MSEdge.cpp:128
const MSEdgeVector & getPredecessors() const
Definition: MSEdge.h:343
The base class for an intersection.
Definition: MSJunction.h:64
static MSEdgeVector myEdges
Static list of edges.
Definition: MSEdge.h:856
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
Definition: MSEdge.h:286
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
Definition: MSEdge.h:804
void closeBuilding()
Definition: MSEdge.cpp:159
virtual ~MSEdge()
Destructor.
Definition: MSEdge.cpp:91
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:295
bool isRoundabout() const
Definition: MSEdge.h:619
const std::vector< MSLane * > & getLanes() const
Returns this edge&#39;s lanes.
Definition: MSEdge.h:167
const MSEdge * myOppositingSuperposableEdge
the oppositing superposble edge
Definition: MSEdge.h:869
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
std::string myEdgeType
the type of the edge (optionally used during network creation)
Definition: MSEdge.h:816
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
Definition: MSEdge.h:294
double getMeanSpeed() const
get the mean speed
Definition: MSEdge.cpp:700
transportable_by_position_sorter(SUMOTime timestep)
constructor
Definition: MSEdge.h:725
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:744
std::vector< double > mySublaneSides
the right side for each sublane on this edge
Definition: MSEdge.h:840
const int myNumericalID
This edge&#39;s numerical id.
Definition: MSEdge.h:755
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
Definition: MSEdge.cpp:378
void initialize(const std::vector< MSLane *> *lanes)
Initialize the edge.
Definition: MSEdge.cpp:107
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
const std::string & getID() const
Returns the id.
Definition: Named.h:65
int myVaporizationRequests
Vaporizer counter.
Definition: MSEdge.h:767
double getLength() const
return the length of the edge
Definition: MSEdge.h:569
const MSJunction * getToJunction() const
Definition: MSEdge.h:352
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge&#39;s persons sorted by pos.
Definition: MSEdge.cpp:876
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
Definition: MSEdge.cpp:385
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:259
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:846
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
bool hasLaneChanger() const
Definition: MSEdge.h:631
std::map< std::string, MSEdge *> DictType
definition of the static dictionary type
Definition: MSEdge.h:846
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
Definition: MSEdge.h:371
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
Definition: MSEdge.h:312
const std::string & getEdgeType() const
Returns the type of the edge.
Definition: MSEdge.h:272
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
Definition: MSEdge.h:713
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
Definition: MSEdge.cpp:727
void checkAndRegisterBiDirEdge()
check and register the opposite superposable edge if any
Definition: MSEdge.cpp:985
MSEdge & operator=(const MSEdge &)
assignment operator.
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:54
A road/street connecting two junctions.
Definition: MSEdge.h:80
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle&#39;s access class.
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
Definition: MSEdge.h:770
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition: MSEdge.h:861
void rebuildAllowedLanes()
Definition: MSEdge.cpp:246
double myLength
the length of the edge (cached value for speedup)
Definition: MSEdge.h:825
Representation of a vehicle.
Definition: SUMOVehicle.h:66
static double getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition: MSEdge.h:431
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:150
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
Definition: MSEdge.h:800
bool hasMinorLink() const
whether any lane has a minor link
Definition: MSEdge.cpp:972
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:86
static void clear()
Clears the dictionary.
Definition: MSEdge.cpp:783
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
Definition: MSEdge.h:807
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:595
const std::set< MSTransportable * > & getPersons() const
Returns this edge&#39;s persons set.
Definition: MSEdge.h:176
MSEdgeVector mySuccessors
The succeeding edges.
Definition: MSEdge.h:781
double getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:413
MSJunction * myToJunction
Definition: MSEdge.h:788
MSLaneChanger * myLaneChanger
This member will do the lane-change.
Definition: MSEdge.h:761
double getRoutingSpeed() const
Returns the averaged speed used by the routing device.
Definition: MSEdge.cpp:737
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:268
const MSEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself ...
Definition: MSEdge.cpp:690
bool myAmFringe
whether this edge is at the network fringe
Definition: MSEdge.h:837
const MSEdge * getMyOppositeSuperposableEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition: MSEdge.h:243
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Definition: MSEdge.cpp:467
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:599
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
Definition: MSEdge.h:503
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:758
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: MSEdge.h:234
bool isFringe() const
return whether this edge is at the fringe of the network
Definition: MSEdge.h:645
bool isInternal() const
return whether this edge is an internal edge
Definition: MSEdge.h:229
An upper class for objects with additional parameters.
Definition: Parameterised.h:50
bool isSuperposable(const MSEdge *other)
Definition: MSEdge.cpp:1003
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
Definition: MSEdge.h:612
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
Definition: MSEdge.cpp:964
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:266
Base class for objects which have an id.
Definition: Named.h:45
const MSEdge * getInternalFollowingEdge(const MSEdge *followerAfterInternal) const
Definition: MSEdge.cpp:656
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
Definition: MSEdge.cpp:858
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
Definition: MSEdge.h:809
void markDelayed() const
Definition: MSEdge.h:627
void buildLaneChanger()
Has to be called after all sucessors and predecessors have been set (after closeBuilding()) ...
Definition: MSEdge.cpp:205
Structure representing possible vehicle parameter.
bool prohibits(const SUMOVehicle *const vehicle) const
Returns whether the vehicle (class) is not allowed on the edge.
Definition: MSEdge.h:532
bool isTazConnector() const
Definition: MSEdge.h:252
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:607
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:777
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
Definition: MSEdge.cpp:646
const MSJunction * getFromJunction() const
Definition: MSEdge.h:348
bool myAmRoundabout
whether this edge belongs to a roundabout
Definition: MSEdge.h:834
double myWidth
Edge width [m].
Definition: MSEdge.h:822
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:813
MSJunction * myFromJunction
the junctions for this edge
Definition: MSEdge.h:787
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:676
const MSEdgeVector & getSuccessors() const
Returns the following edges.
Definition: MSEdge.h:319
void setMaxSpeed(double val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
Definition: MSEdge.cpp:865
void setJunctions(MSJunction *from, MSJunction *to)
Definition: MSEdge.h:357
virtual void lock() const
grant exclusive access to the mesoscopic state
Definition: MSEdge.h:650
by_id_sorter()
constructor
Definition: MSEdge.h:710
std::map< const MSEdge *, std::vector< MSLane * > *> AllowedLanesCont
Suceeding edges (keys) and allowed lanes to reach these edges (values).
Definition: MSEdge.h:83
const int myPriority
the priority of the edge (used during network creation)
Definition: MSEdge.h:819
bool isWalkingArea() const
return whether this edge is walking area
Definition: MSEdge.h:248
std::vector< std::string > myCrossingEdges
The crossed edges id for a crossing edge. On not crossing edges it is empty.
Definition: MSEdge.h:778
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSEdge.h:851
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
Sorts transportables by their positions.
Definition: MSEdge.h:722
double getDistanceTo(const MSEdge *other) const
optimistic air distance heuristic for use in routing
Definition: MSEdge.cpp:831
long long int SUMOTime
Definition: TraCIDefs.h:51
#define NUMERICAL_EPS
Definition: config.h:151
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:77
SVCPermissions getPermissions() const
Definition: MSEdge.h:540
void markAsRoundabout()
Definition: MSEdge.h:623
Boundary myTazBoundary
The bounding rectangle of incoming or outgoing edges for taz connectors.
Definition: MSEdge.h:864
MSEdgeVector myPredecessors
The preceeding edges.
Definition: MSEdge.h:784
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep, bool includeRiding=false) const
Returns this edge&#39;s containers sorted by pos.
Definition: MSEdge.cpp:894
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
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:274
double myEmptyTraveltime
the traveltime on the empty edge (cached value for speedup)
Definition: MSEdge.h:828
MSLane * getFreeLane(const std::vector< MSLane *> *allowed, const SUMOVehicleClass vclass, double departPos) const
Finds the emptiest lane allowing the vehicle class.
Definition: MSEdge.cpp:392
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:801
const std::vector< MSLane * > * getAllowedLanesWithDefault(const AllowedLanesCont &c, const MSEdge *dest) const
lookup in map and return 0 if not found
Definition: MSEdge.cpp:307
SumoXMLEdgeFunc getFunction() const
Returns the edge type (SumoXMLEdgeFunc)
Definition: MSEdge.h:224
vehicles ignoring classes
std::set< int > myFailedInsertionMemory
A cache for the rejected insertion attempts. Used to assure that no further insertion attempts are ma...
Definition: MSEdge.h:775
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
Definition: MSEdge.h:791
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
Definition: MSEdge.h:511
double getWidth() const
Returns the edges&#39;s width (sum over all lanes)
Definition: MSEdge.h:547