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>
48 #include "MSNet.h"
49 #include "MSVehicleType.h"
50 
51 
52 // ===========================================================================
53 // class declarations
54 // ===========================================================================
55 class MSLaneChanger;
56 class OutputDevice;
57 class SUMOVehicle;
59 class MSVehicle;
60 class MSLane;
61 class MSPerson;
62 class MSJunction;
63 class MSEdge;
64 class MSContainer;
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:
104  };
105 
106 
108  typedef std::map< const MSEdge*, std::vector<MSLane*>* > AllowedLanesCont;
109 
111  typedef std::map< SUMOVehicleClass, AllowedLanesCont > ClassedAllowedLanesCont;
112 
113 
114 public:
126  MSEdge(const std::string& id, int numericalID, const EdgeBasicFunction function,
127  const std::string& streetName, const std::string& edgeType, int priority);
128 
129 
131  virtual ~MSEdge();
132 
133 
139  void initialize(const std::vector<MSLane*>* lanes);
140 
141 
144  void recalcCache();
145 
146 
148  void closeBuilding();
149 
151  void buildLaneChanger();
152 
153  /* @brief returns whether initizliaing a lane change is permitted on this edge
154  * @note Has to be called after all sucessors and predecessors have been set (after closeBuilding())
155  */
156  bool allowsLaneChanging();
157 
160 
167  MSLane* leftLane(const MSLane* const lane) const;
168 
169 
176  MSLane* rightLane(const MSLane* const lane) const;
177 
178 
185  MSLane* parallelLane(const MSLane* const lane, int offset) const;
186 
187 
192  const std::vector<MSLane*>& getLanes() const {
193  return *myLanes;
194  }
195 
201  inline const std::set<MSTransportable*>& getPersons() const {
202  return myPersons;
203  }
204 
209  std::vector<MSTransportable*> getSortedPersons(SUMOTime timestep) const;
210 
211 
216  std::vector<MSTransportable*> getSortedContainers(SUMOTime timestep) const;
217 
226  const std::vector<MSLane*>* allowedLanes(const MSEdge& destination,
227  SUMOVehicleClass vclass = SVC_IGNORING) const;
228 
229 
237  const std::vector<MSLane*>* allowedLanes(SUMOVehicleClass vclass = SVC_IGNORING) const;
239 
240 
241 
244 
250  return myFunction;
251  }
252 
254  inline bool isInternal() const {
256  }
257 
259  inline bool isCrossing() const {
261  }
262 
264  inline bool isWalkingArea() const {
266  }
267 
268  inline bool isTaz() const {
270  }
271 
275  inline int getNumericalID() const {
276  return myNumericalID;
277  }
278 
279 
282  const std::string& getStreetName() const {
283  return myStreetName;
284  }
285 
288  const std::string& getEdgeType() const {
289  return myEdgeType;
290  }
291 
294  int getPriority() const {
295  return myPriority;
296  }
298 
302  void setCrossingEdges(const std::vector<std::string>& crossingEdges) {
303  myCrossingEdges.clear();
304  myCrossingEdges.insert(myCrossingEdges.begin(), crossingEdges.begin(), crossingEdges.end());
305  }
306 
310  const std::vector<std::string>& getCrossingEdges() const {
311  return myCrossingEdges;
312  }
313 
314 
317 
323  void addSuccessor(MSEdge* edge) {
324  mySuccessors.push_back(edge);
325  edge->myPredecessors.push_back(this);
326  }
327 
328 
332  int getNumSuccessors() const {
333  return (int) mySuccessors.size();
334  }
335 
336 
339  const MSEdgeVector& getSuccessors() const {
340  return mySuccessors;
341  }
342 
343 
348  const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const;
349 
350 
355  int getNumPredecessors() const {
356  return (int) myPredecessors.size();
357  }
358 
359 
364  const MSEdgeVector& getPredecessors() const {
365  return myPredecessors;
366  }
367 
368 
369  const MSJunction* getFromJunction() const {
370  return myFromJunction;
371  }
372 
373  const MSJunction* getToJunction() const {
374  return myToJunction;
375  }
376 
377 
378  void setJunctions(MSJunction* from, MSJunction* to) {
379  myFromJunction = from;
380  myToJunction = to;
381  }
383 
384 
385 
388 
392  bool isVaporizing() const {
393  return myVaporizationRequests > 0;
394  }
395 
396 
407 
408 
420 
421 
430  SUMOReal getCurrentTravelTime(const SUMOReal minSpeed = NUMERICAL_EPS) const;
431 
432 
434  inline SUMOReal getMinimumTravelTime(const SUMOVehicle* const veh) const {
436  return 0;
437  } else if (veh != 0) {
438  return getLength() / getVehicleMaxSpeed(veh);
439  } else {
440  return getLength() / getSpeedLimit();
441  }
442  }
443 
444 
452  static inline SUMOReal getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, SUMOReal time) {
453  return MSNet::getInstance()->getTravelTime(edge, veh, time);
454  }
455 
458  SUMOReal getRoutingSpeed() const;
459 
460 
463 
483  bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false, const bool forceCheck = false) const;
484 
485 
500  MSLane* getFreeLane(const std::vector<MSLane*>* allowed, const SUMOVehicleClass vclass) const;
501 
502 
513  MSLane* getDepartLane(MSVehicle& veh) const;
514 
515 
521  }
522 
523 
527  inline void setLastFailedInsertionTime(SUMOTime time) const {
529  }
531 
532 
534  virtual void changeLanes(SUMOTime t);
535 
536 
537 #ifdef HAVE_INTERNAL_LANES
538  const MSEdge* getInternalFollowingEdge(const MSEdge* followerAfterInternal) const;
540 #endif
541 
543  inline bool prohibits(const SUMOVehicle* const vehicle) const {
544  if (vehicle == 0) {
545  return false;
546  }
547  const SUMOVehicleClass svc = vehicle->getVehicleType().getVehicleClass();
548  return (myCombinedPermissions & svc) != svc;
549  }
550 
552  return myCombinedPermissions;
553  }
554 
558  SUMOReal getWidth() const {
559  return myWidth;
560  }
561 
563  const std::vector<SUMOReal> getSubLaneSides() const {
564  return mySublaneSides;
565  }
566 
567  void rebuildAllowedLanes();
568 
569 
574  SUMOReal getDistanceTo(const MSEdge* other) const;
575 
576 
580  inline SUMOReal getLength() const {
581  return myLength;
582  }
583 
584 
589  SUMOReal getSpeedLimit() const;
590 
594  void setMaxSpeed(SUMOReal val) const;
595 
601  SUMOReal getVehicleMaxSpeed(const SUMOVehicle* const veh) const;
602 
603  virtual void addPerson(MSTransportable* p) const {
604  myPersons.insert(p);
605  }
606 
607  virtual void removePerson(MSTransportable* p) const {
608  std::set<MSTransportable*>::iterator i = myPersons.find(p);
609  if (i != myPersons.end()) {
610  myPersons.erase(i);
611  }
612  }
613 
615  virtual void addContainer(MSTransportable* container) const {
616  myContainers.insert(container);
617  }
618 
620  virtual void removeContainer(MSTransportable* container) const {
621  std::set<MSTransportable*>::iterator i = myContainers.find(container);
622  if (i != myContainers.end()) {
623  myContainers.erase(i);
624  }
625  }
626 
627  inline bool isRoundabout() const {
628  return myAmRoundabout;
629  }
630 
632  myAmRoundabout = true;
633  }
634 
635  void markDelayed() const {
636  myAmDelayed = true;
637  }
638 
639  bool hasLaneChanger() const {
640  return myLaneChanger != 0;
641  }
642 
644  bool canChangeToOpposite();
645 
647  SUMOReal getMeanSpeed() const;
648 
650  bool hasMinorLink() const;
651 
653  virtual void lock() const {}
654 
656  virtual void unlock() const {};
657 
661  static bool dictionary(const std::string& id, MSEdge* edge);
662 
664  static MSEdge* dictionary(const std::string& id);
665 
667  static int dictSize();
668 
670  static const MSEdgeVector& getAllEdges();
671 
673  static void clear();
674 
676  static void insertIDs(std::vector<std::string>& into);
677 
678 
679 public:
682 
691  static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into,
692  const std::string& rid);
693 
694 
701  static void parseEdgesList(const std::vector<std::string>& desc, ConstMSEdgeVector& into,
702  const std::string& rid);
704 
705 
706 protected:
710  class by_id_sorter {
711  public:
713  explicit by_id_sorter() { }
714 
716  int operator()(const MSEdge* const e1, const MSEdge* const e2) const {
717  return e1->getID() < e2->getID();
718  }
719 
720  };
721 
726  public:
728  explicit transportable_by_position_sorter(SUMOTime timestep): myTime(timestep) { }
729 
731  int operator()(const MSTransportable* const c1, const MSTransportable* const c2) const;
732  private:
734  };
735 
736 
745  const std::vector<MSLane*>* allowedLanes(const MSEdge* destination,
746  SUMOVehicleClass vclass = SVC_IGNORING) const;
747 
748 
750  const std::vector<MSLane*>* getAllowedLanesWithDefault(const AllowedLanesCont& c, const MSEdge* dest) const;
751 
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 
823 
826 
829 
831  mutable bool myAmDelayed;
832 
835 
837  std::vector<SUMOReal> mySublaneSides;
838 
841 
843  typedef std::map< std::string, MSEdge* > DictType;
844 
848  static DictType myDict;
849 
855 
856 
858  mutable std::map<SUMOVehicleClass, MSEdgeVector> myClassesSuccessorMap;
859 
860 private:
862  MSEdge(const MSEdge&);
863 
865  MSEdge& operator=(const MSEdge&);
866 
867 };
868 
869 
870 #endif
871 
872 /****************************************************************************/
873 
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
Definition: MSEdge.h:831
bool allowsLaneChanging()
Definition: MSEdge.cpp:227
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:741
long long int SUMOTime
Definition: SUMOTime.h:43
SUMOReal myLength
the length of the edge (cached value for speedup)
Definition: MSEdge.h:825
SUMOVehicleClass getVehicleClass() const
Get this vehicle type&#39;s vehicle class.
Sorts edges by their ids.
Definition: MSEdge.h:710
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.h:323
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
SUMOReal getDistanceTo(const MSEdge *other) const
optimistic air distance heuristic for use in routing
Definition: MSEdge.cpp:779
static int dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:720
void initialize(const std::vector< MSLane * > *lanes)
Initialize the edge.
Definition: MSEdge.cpp:110
const std::vector< MSLane * > & getLanes() const
Returns this edge&#39;s lanes.
Definition: MSEdge.h:192
virtual void lock() const
grant exclusive access to the mesoscopic state
Definition: MSEdge.h:653
void recalcCache()
Recalculates the cached values.
Definition: MSEdge.cpp:133
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:615
The base class for an intersection.
Definition: MSJunction.h:64
static MSEdgeVector myEdges
Static list of edges.
Definition: MSEdge.h:853
const EdgeBasicFunction myFunction
the purpose of the edge
Definition: MSEdge.h:764
int SVCPermissions
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
Definition: MSEdge.h:302
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
Definition: MSEdge.h:804
bool isWalkingArea() const
return whether this edge is walking area
Definition: MSEdge.h:264
void closeBuilding()
Definition: MSEdge.cpp:164
virtual ~MSEdge()
Destructor.
Definition: MSEdge.cpp:94
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:282
The edge is a macroscopic connector (source/sink)
Definition: MSEdge.h:95
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:159
std::string myEdgeType
the type of the edge (optionally used during network creation)
Definition: MSEdge.h:816
SVCPermissions getPermissions() const
Definition: MSEdge.h:551
transportable_by_position_sorter(SUMOTime timestep)
constructor
Definition: MSEdge.h:728
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:693
const int myNumericalID
This edge&#39;s numerical id.
Definition: MSEdge.h:755
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
Definition: MSEdge.cpp:382
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
Finds the emptiest lane allowing the vehicle class.
Definition: MSEdge.cpp:396
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
bool hasMinorLink() const
whether any lane has a minor link
Definition: MSEdge.cpp:885
int myVaporizationRequests
Vaporizer counter.
Definition: MSEdge.h:767
EdgeBasicFunction
Defines possible edge types.
Definition: MSEdge.h:89
bool prohibits(const SUMOVehicle *const vehicle) const
Returns whether the vehicle (class) is not allowed on the edge.
Definition: MSEdge.h:543
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
Definition: MSEdge.cpp:389
const std::vector< SUMOReal > getSubLaneSides() const
Returns the right side offsets of this edge&#39;s sublanes.
Definition: MSEdge.h:563
The purpose of the edge is not known.
Definition: MSEdge.h:91
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
Definition: MSEdge.h:620
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
Definition: MSEdge.h:843
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:80
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:858
void rebuildAllowedLanes()
Definition: MSEdge.cpp:250
SUMOReal getLength() const
return the length of the edge
Definition: MSEdge.h:580
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:607
bool isTaz() const
Definition: MSEdge.h:268
The edge is a district edge.
Definition: MSEdge.h:99
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:603
Representation of a vehicle.
Definition: SUMOVehicle.h:67
const MSEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of reachable edges.
Definition: MSEdge.h:364
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
Definition: MSEdge.h:800
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:111
static void clear()
Clears the dictionary.
Definition: MSEdge.cpp:732
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
Definition: MSEdge.h:807
static SUMOReal getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:141
MSEdgeVector mySuccessors
The succeeding edges.
Definition: MSEdge.h:781
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:272
MSJunction * myToJunction
Definition: MSEdge.h:788
MSLaneChanger * myLaneChanger
This member will do the lane-change.
Definition: MSEdge.h:761
void markDelayed() const
Definition: MSEdge.h:635
MSEdge(const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
Definition: MSEdge.cpp:75
bool isRoundabout() const
Definition: MSEdge.h:627
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
Definition: MSEdge.h:332
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
Definition: MSEdge.h:392
std::vector< SUMOReal > mySublaneSides
the right side for each sublane on this edge
Definition: MSEdge.h:837
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:471
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
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle&#39;s type.
An upper class for objects with additional parameters.
Definition: Parameterised.h:51
SUMOReal getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
Definition: MSEdge.cpp:789
bool isInternal() const
return whether this edge is an internal edge
Definition: MSEdge.h:254
const std::string & getEdgeType() const
Returns the type of the edge.
Definition: MSEdge.h:288
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
Definition: MSEdge.cpp:877
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Definition: MSEdge.cpp:416
Base class for objects which have an id.
Definition: Named.h:46
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep) const
Returns this edge&#39;s containers sorted by pos.
Definition: MSEdge.cpp:822
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
Definition: MSEdge.h:809
The edge is a pedestrian walking area (a special type of internal edge)
Definition: MSEdge.h:103
void buildLaneChanger()
Has to be called after all sucessors and predecessors have been set (after closeBuilding()) ...
Definition: MSEdge.cpp:209
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Definition: MSEdge.h:249
Structure representing possible vehicle parameter.
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
Definition: MSEdge.h:716
virtual void unlock() const
release exclusive access to the mesoscopic state
Definition: MSEdge.h:656
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:275
int getPriority() const
Returns the priority of the edge.
Definition: MSEdge.h:294
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
Definition: MSEdge.h:310
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:284
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:726
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
Definition: MSEdge.cpp:598
The edge is a normal street.
Definition: MSEdge.h:93
SUMOReal myEmptyTraveltime
the traveltime on the empty edge (cached value for speedup)
Definition: MSEdge.h:828
SUMOReal getMeanSpeed() const
get the mean speed
Definition: MSEdge.cpp:649
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:299
bool myAmRoundabout
whether this edge belongs to a roundabout
Definition: MSEdge.h:834
The edge is a pedestrian crossing (a special type of internal edge)
Definition: MSEdge.h:101
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
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
Definition: MSEdge.h:519
void setJunctions(MSJunction *from, MSJunction *to)
Definition: MSEdge.h:378
by_id_sorter()
constructor
Definition: MSEdge.h:713
SUMOReal getWidth() const
Returns the edges&#39;s width (sum over all lanes)
Definition: MSEdge.h:558
std::map< const MSEdge *, std::vector< MSLane * > * > AllowedLanesCont
Suceeding edges (keys) and allowed lanes to reach these edges (values).
Definition: MSEdge.h:108
const int myPriority
the priority of the edge (used during network creation)
Definition: MSEdge.h:819
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
Definition: MSEdge.h:527
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:848
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
SUMOReal getRoutingSpeed() const
Returns the averaged speed used by the routing device.
Definition: MSEdge.cpp:686
const std::set< MSTransportable * > & getPersons() const
Returns this edge&#39;s persons set.
Definition: MSEdge.h:201
#define SUMOReal
Definition: config.h:208
Sorts transportables by their positions.
Definition: MSEdge.h:725
SUMOReal getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:434
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: MSEdge.h:259
const MSJunction * getFromJunction() const
Definition: MSEdge.h:369
const MSEdgeVector & getSuccessors() const
Returns the following edges.
Definition: MSEdge.h:339
#define NUMERICAL_EPS
Definition: config.h:158
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
Definition: MSEdge.cpp:796
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:77
SUMOReal myWidth
Edge width [m].
Definition: MSEdge.h:822
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:278
void markAsRoundabout()
Definition: MSEdge.h:631
The edge is an internal edge.
Definition: MSEdge.h:97
const std::vector< MSLane * > * getAllowedLanesWithDefault(const AllowedLanesCont &c, const MSEdge *dest) const
lookup in map and return 0 if not found
Definition: MSEdge.cpp:311
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
Definition: MSEdge.h:355
MSEdgeVector myPredecessors
The preceeding edges.
Definition: MSEdge.h:784
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
Definition: MSEdge.cpp:676
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:749
vehicles ignoring classes
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep) const
Returns this edge&#39;s persons sorted by pos.
Definition: MSEdge.cpp:814
static SUMOReal getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, SUMOReal time)
Returns the travel time for the given edge.
Definition: MSEdge.h:452
bool hasLaneChanger() const
Definition: MSEdge.h:639
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
void setMaxSpeed(SUMOReal val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
Definition: MSEdge.cpp:803
const MSJunction * getToJunction() const
Definition: MSEdge.h:373
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
Definition: MSEdge.h:791