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-2016 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 
271  inline int getNumericalID() const {
272  return myNumericalID;
273  }
274 
275 
278  const std::string& getStreetName() const {
279  return myStreetName;
280  }
281 
284  const std::string& getEdgeType() const {
285  return myEdgeType;
286  }
287 
290  int getPriority() const {
291  return myPriority;
292  }
294 
298  void setCrossingEdges(const std::vector<std::string>& crossingEdges) {
299  myCrossingEdges.clear();
300  myCrossingEdges.insert(myCrossingEdges.begin(), crossingEdges.begin(), crossingEdges.end());
301  }
302 
306  const std::vector<std::string>& getCrossingEdges() const {
307  return myCrossingEdges;
308  }
309 
310 
313 
319  void addSuccessor(MSEdge* edge) {
320  mySuccessors.push_back(edge);
321  edge->myPredecessors.push_back(this);
322  }
323 
324 
329  return myPredecessors;
330  }
331 
335  const std::vector<MSEdge*>& getOutgoingEdges() const {
336  return mySuccessors;
337  }
338 
342  int getNumSuccessors() const {
343  return (int) mySuccessors.size();
344  }
345 
346 
349  const MSEdgeVector& getSuccessors() const {
350  return mySuccessors;
351  }
352 
353 
358  const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const;
359 
360 
365  int getNumPredecessors() const {
366  return (int) myPredecessors.size();
367  }
368 
369 
374  const MSEdgeVector& getPredecessors() const {
375  return myPredecessors;
376  }
377 
378 
379  const MSJunction* getFromJunction() const {
380  return myFromJunction;
381  }
382 
383  const MSJunction* getToJunction() const {
384  return myToJunction;
385  }
386 
387 
388  void setJunctions(MSJunction* from, MSJunction* to) {
389  myFromJunction = from;
390  myToJunction = to;
391  }
393 
394 
395 
398 
402  bool isVaporizing() const {
403  return myVaporizationRequests > 0;
404  }
405 
406 
417 
418 
430 
431 
440  SUMOReal getCurrentTravelTime(const SUMOReal minSpeed = NUMERICAL_EPS) const;
441 
442 
444  inline SUMOReal getMinimumTravelTime(const SUMOVehicle* const veh) const {
445  if (veh != 0) {
446  return getLength() / getVehicleMaxSpeed(veh);
447  } else {
448  return getLength() / getSpeedLimit();
449  }
450  }
451 
452 
460  static inline SUMOReal getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, SUMOReal time) {
461  return MSNet::getInstance()->getTravelTime(edge, veh, time);
462  }
463 
466  SUMOReal getRoutingSpeed() const;
467 
468 
471 
488  bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false) const;
489 
490 
505  MSLane* getFreeLane(const std::vector<MSLane*>* allowed, const SUMOVehicleClass vclass) const;
506 
507 
518  MSLane* getDepartLane(MSVehicle& veh) const;
519 
520 
526  }
527 
528 
532  inline void setLastFailedInsertionTime(SUMOTime time) const {
534  }
536 
537 
539  virtual void changeLanes(SUMOTime t);
540 
541 
542 #ifdef HAVE_INTERNAL_LANES
543  const MSEdge* getInternalFollowingEdge(const MSEdge* followerAfterInternal) const;
545 #endif
546 
548  inline bool prohibits(const SUMOVehicle* const vehicle) const {
549  if (vehicle == 0) {
550  return false;
551  }
552  const SUMOVehicleClass svc = vehicle->getVehicleType().getVehicleClass();
553  return (myCombinedPermissions & svc) != svc;
554  }
555 
557  return myCombinedPermissions;
558  }
559 
563  SUMOReal getWidth() const {
564  return myWidth;
565  }
566 
568  const std::vector<SUMOReal> getSubLaneSides() const {
569  return mySublaneSides;
570  }
571 
572  void rebuildAllowedLanes();
573 
574 
579  SUMOReal getDistanceTo(const MSEdge* other) const;
580 
581 
585  inline SUMOReal getLength() const {
586  return myLength;
587  }
588 
589 
594  SUMOReal getSpeedLimit() const;
595 
599  void setMaxSpeed(SUMOReal val) const;
600 
606  SUMOReal getVehicleMaxSpeed(const SUMOVehicle* const veh) const;
607 
608  virtual void addPerson(MSTransportable* p) const {
609  myPersons.insert(p);
610  }
611 
612  virtual void removePerson(MSTransportable* p) const {
613  std::set<MSTransportable*>::iterator i = myPersons.find(p);
614  if (i != myPersons.end()) {
615  myPersons.erase(i);
616  }
617  }
618 
620  virtual void addContainer(MSTransportable* container) const {
621  myContainers.insert(container);
622  }
623 
625  virtual void removeContainer(MSTransportable* container) const {
626  std::set<MSTransportable*>::iterator i = myContainers.find(container);
627  if (i != myContainers.end()) {
628  myContainers.erase(i);
629  }
630  }
631 
632  inline bool isRoundabout() const {
633  return myAmRoundabout;
634  }
635 
637  myAmRoundabout = true;
638  }
639 
640  void markDelayed() const {
641  myAmDelayed = true;
642  }
643 
644  bool hasLaneChanger() const {
645  return myLaneChanger != 0;
646  }
647 
649  bool canChangeToOpposite();
650 
652  SUMOReal getMeanSpeed() const;
653 
655  virtual void lock() const {}
656 
658  virtual void unlock() const {};
659 
663  static bool dictionary(const std::string& id, MSEdge* edge);
664 
666  static MSEdge* dictionary(const std::string& id);
667 
669  static int dictSize();
670 
672  static const MSEdgeVector& getAllEdges();
673 
675  static void clear();
676 
678  static void insertIDs(std::vector<std::string>& into);
679 
680 
681 public:
684 
693  static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into,
694  const std::string& rid);
695 
696 
703  static void parseEdgesList(const std::vector<std::string>& desc, ConstMSEdgeVector& into,
704  const std::string& rid);
706 
707 
708 protected:
712  class by_id_sorter {
713  public:
715  explicit by_id_sorter() { }
716 
718  int operator()(const MSEdge* const e1, const MSEdge* const e2) const {
719  return e1->getID() < e2->getID();
720  }
721 
722  };
723 
728  public:
730  explicit transportable_by_position_sorter(SUMOTime timestep): myTime(timestep) { }
731 
733  int operator()(const MSTransportable* const c1, const MSTransportable* const c2) const;
734  private:
736  };
737 
738 
747  const std::vector<MSLane*>* allowedLanes(const MSEdge* destination,
748  SUMOVehicleClass vclass = SVC_IGNORING) const;
749 
750 
752  const std::vector<MSLane*>* getAllowedLanesWithDefault(const AllowedLanesCont& c, const MSEdge* dest) const;
753 
754 
755 protected:
757  const int myNumericalID;
758 
760  const std::vector<MSLane*>* myLanes;
761 
764 
767 
770 
773 
775  std::vector<std::string> myCrossingEdges;
776 
779 
782 
786 
788  mutable std::set<MSTransportable*> myPersons;
789 
791  mutable std::set<MSTransportable*> myContainers;
792 
795 
797  AllowedLanesCont myAllowed;
798 
800  // @note: this map is filled on demand
801  mutable ClassedAllowedLanesCont myClassedAllowed;
802 
808 
810  std::string myStreetName;
811 
813  std::string myEdgeType;
814 
816  const int myPriority;
817 
820 
823 
826 
828  mutable bool myAmDelayed;
829 
832 
834  std::vector<SUMOReal> mySublaneSides;
835 
838 
840  typedef std::map< std::string, MSEdge* > DictType;
841 
845  static DictType myDict;
846 
852 
853 
855  mutable std::map<SUMOVehicleClass, MSEdgeVector> myClassesSuccessorMap;
856 
857 private:
859  MSEdge(const MSEdge&);
860 
862  MSEdge& operator=(const MSEdge&);
863 
864 };
865 
866 
867 #endif
868 
869 /****************************************************************************/
870 
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
Definition: MSEdge.h:828
bool allowsLaneChanging()
Definition: MSEdge.cpp:229
std::set< MSTransportable * > myContainers
Containers on the edge.
Definition: MSEdge.h:791
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:81
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
Definition: MSEdge.cpp:714
long long int SUMOTime
Definition: SUMOTime.h:43
SUMOReal myLength
the length of the edge (cached value for speedup)
Definition: MSEdge.h:822
SUMOVehicleClass getVehicleClass() const
Get this vehicle type&#39;s vehicle class.
Sorts edges by their ids.
Definition: MSEdge.h:712
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:319
bool insertVehicle(SUMOVehicle &v, SUMOTime time, const bool checkOnly=false) const
Tries to insert the given vehicle into the network.
Definition: MSEdge.cpp:473
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:752
static int dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:693
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:655
void recalcCache()
Recalculates the cached values.
Definition: MSEdge.cpp:136
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:620
The base class for an intersection.
Definition: MSJunction.h:64
static MSEdgeVector myEdges
Static list of edges.
Definition: MSEdge.h:850
const EdgeBasicFunction myFunction
the purpose of the edge
Definition: MSEdge.h:766
int SVCPermissions
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
Definition: MSEdge.h:298
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
Definition: MSEdge.h:801
bool isWalkingArea() const
return whether this edge is walking area
Definition: MSEdge.h:264
void closeBuilding()
Definition: MSEdge.cpp:166
virtual ~MSEdge()
Destructor.
Definition: MSEdge.cpp:94
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:278
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:813
SVCPermissions getPermissions() const
Definition: MSEdge.h:556
transportable_by_position_sorter(SUMOTime timestep)
constructor
Definition: MSEdge.h:730
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:666
const int myNumericalID
This edge&#39;s numerical id.
Definition: MSEdge.h:757
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
Definition: MSEdge.cpp:384
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
Finds the emptiest lane allowing the vehicle class.
Definition: MSEdge.cpp:398
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
int myVaporizationRequests
Vaporizer counter.
Definition: MSEdge.h:769
const MSEdgeVector & getIncomingEdges() const
Returns the list of edges from which this edge may be reached.
Definition: MSEdge.h:328
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:548
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
Definition: MSEdge.cpp:391
const std::vector< SUMOReal > getSubLaneSides() const
Returns the right side offsets of this edge&#39;s sublanes.
Definition: MSEdge.h:568
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:625
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
Definition: MSEdge.h:840
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:772
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition: MSEdge.h:855
void rebuildAllowedLanes()
Definition: MSEdge.cpp:252
SUMOReal getLength() const
return the length of the edge
Definition: MSEdge.h:585
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:612
The edge is a district edge.
Definition: MSEdge.h:99
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:608
Representation of a vehicle.
Definition: SUMOVehicle.h:66
const MSEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of reachable edges.
Definition: MSEdge.h:374
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
Definition: MSEdge.h:797
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:705
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
Definition: MSEdge.h:804
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:778
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:274
MSJunction * myToJunction
Definition: MSEdge.h:785
MSLaneChanger * myLaneChanger
This member will do the lane-change.
Definition: MSEdge.h:763
void markDelayed() const
Definition: MSEdge.h:640
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:632
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
Definition: MSEdge.h:342
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
Definition: MSEdge.h:402
std::vector< SUMOReal > mySublaneSides
the right side for each sublane on this edge
Definition: MSEdge.h:834
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:760
An upper class for objects with additional parameters.
Definition: Parameterised.h:47
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:762
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:284
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
Definition: MSEdge.cpp:850
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Definition: MSEdge.cpp:418
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:795
const std::vector< MSEdge * > & getOutgoingEdges() const
Returns the list of edges that may be reached from this edge.
Definition: MSEdge.h:335
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
Definition: MSEdge.h:806
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:210
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:718
virtual void unlock() const
release exclusive access to the mesoscopic state
Definition: MSEdge.h:658
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:271
int getPriority() const
Returns the priority of the edge.
Definition: MSEdge.h:290
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
Definition: MSEdge.h:306
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:286
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:699
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
Definition: MSEdge.cpp:571
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:825
SUMOReal getMeanSpeed() const
get the mean speed
Definition: MSEdge.cpp:622
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:301
bool myAmRoundabout
whether this edge belongs to a roundabout
Definition: MSEdge.h:831
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:810
MSJunction * myFromJunction
the junctions for this edge
Definition: MSEdge.h:784
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
Definition: MSEdge.h:524
void setJunctions(MSJunction *from, MSJunction *to)
Definition: MSEdge.h:388
by_id_sorter()
constructor
Definition: MSEdge.h:715
SUMOReal getWidth() const
Returns the edges&#39;s width (sum over all lanes)
Definition: MSEdge.h:563
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:816
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
Definition: MSEdge.h:532
std::vector< std::string > myCrossingEdges
The crossed edges id for a crossing edge. On not crossing edges it is empty.
Definition: MSEdge.h:775
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSEdge.h:845
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:659
const std::set< MSTransportable * > & getPersons() const
Returns this edge&#39;s persons set.
Definition: MSEdge.h:201
#define SUMOReal
Definition: config.h:213
Sorts transportables by their positions.
Definition: MSEdge.h:727
SUMOReal getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:444
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: MSEdge.h:259
const MSJunction * getFromJunction() const
Definition: MSEdge.h:379
const MSEdgeVector & getSuccessors() const
Returns the following edges.
Definition: MSEdge.h:349
#define NUMERICAL_EPS
Definition: config.h:160
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
Definition: MSEdge.cpp:769
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:77
SUMOReal myWidth
Edge width [m].
Definition: MSEdge.h:819
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:280
void markAsRoundabout()
Definition: MSEdge.h:636
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:313
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
Definition: MSEdge.h:365
MSEdgeVector myPredecessors
The preceeding edges.
Definition: MSEdge.h:781
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:649
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:722
vehicles ignoring classes
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep) const
Returns this edge&#39;s persons sorted by pos.
Definition: MSEdge.cpp:787
static SUMOReal getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, SUMOReal time)
Returns the travel time for the given edge.
Definition: MSEdge.h:460
bool hasLaneChanger() const
Definition: MSEdge.h:644
void setMaxSpeed(SUMOReal val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
Definition: MSEdge.cpp:776
const MSJunction * getToJunction() const
Definition: MSEdge.h:383
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
Definition: MSEdge.h:788
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle&#39;s type.