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 
150 
153 
160  MSLane* leftLane(const MSLane* const lane) const;
161 
162 
169  MSLane* rightLane(const MSLane* const lane) const;
170 
171 
178  MSLane* parallelLane(const MSLane* const lane, int offset) const;
179 
180 
185  const std::vector<MSLane*>& getLanes() const {
186  return *myLanes;
187  }
188 
194  inline const std::set<MSTransportable*>& getPersons() const {
195  return myPersons;
196  }
197 
202  std::vector<MSTransportable*> getSortedPersons(SUMOTime timestep) const;
203 
204 
209  std::vector<MSTransportable*> getSortedContainers(SUMOTime timestep) const;
210 
219  const std::vector<MSLane*>* allowedLanes(const MSEdge& destination,
220  SUMOVehicleClass vclass = SVC_IGNORING) const;
221 
222 
230  const std::vector<MSLane*>* allowedLanes(SUMOVehicleClass vclass = SVC_IGNORING) const;
232 
233 
234 
237 
243  return myFunction;
244  }
245 
247  inline bool isInternal() const {
249  }
250 
252  inline bool isCrossing() const {
254  }
255 
257  inline bool isWalkingArea() const {
259  }
260 
264  inline int getNumericalID() const {
265  return myNumericalID;
266  }
267 
268 
271  const std::string& getStreetName() const {
272  return myStreetName;
273  }
274 
277  const std::string& getEdgeType() const {
278  return myEdgeType;
279  }
280 
283  int getPriority() const {
284  return myPriority;
285  }
287 
291  void setCrossingEdges(const std::vector<std::string>& crossingEdges) {
292  myCrossingEdges.clear();
293  myCrossingEdges.insert(myCrossingEdges.begin(), crossingEdges.begin(), crossingEdges.end());
294  }
295 
299  const std::vector<std::string>& getCrossingEdges() const {
300  return myCrossingEdges;
301  }
302 
303 
306 
312  void addSuccessor(MSEdge* edge) {
313  mySuccessors.push_back(edge);
314  edge->myPredecessors.push_back(this);
315  }
316 
317 
322  return myPredecessors;
323  }
324 
328  const std::vector<MSEdge*>& getOutgoingEdges() const {
329  return mySuccessors;
330  }
331 
335  unsigned int getNumSuccessors() const {
336  return (unsigned int) mySuccessors.size();
337  }
338 
339 
342  const MSEdgeVector& getSuccessors() const {
343  return mySuccessors;
344  }
345 
346 
351  const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const;
352 
353 
358  unsigned int getNumPredecessors() const {
359  return (unsigned int) myPredecessors.size();
360  }
361 
362 
367  const MSEdgeVector& getPredecessors() const {
368  return myPredecessors;
369  }
370 
371 
372  const MSJunction* getFromJunction() const {
373  return myFromJunction;
374  }
375 
376  const MSJunction* getToJunction() const {
377  return myToJunction;
378  }
379 
380 
381  void setJunctions(MSJunction* from, MSJunction* to) {
382  myFromJunction = from;
383  myToJunction = to;
384  }
386 
387 
388 
391 
395  bool isVaporizing() const {
396  return myVaporizationRequests > 0;
397  }
398 
399 
410 
411 
423 
424 
433  SUMOReal getCurrentTravelTime(const SUMOReal minSpeed = NUMERICAL_EPS) const;
434 
435 
437  inline SUMOReal getMinimumTravelTime(const SUMOVehicle* const veh) const {
438  if (veh != 0) {
439  return getLength() / getVehicleMaxSpeed(veh);
440  } else {
441  return getLength() / getSpeedLimit();
442  }
443  }
444 
445 
453  static inline SUMOReal getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, SUMOReal time) {
454  return MSNet::getInstance()->getTravelTime(edge, veh, time);
455  }
456 
457 
460 
477  bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false) const;
478 
479 
494  MSLane* getFreeLane(const std::vector<MSLane*>* allowed, const SUMOVehicleClass vclass) const;
495 
496 
507  MSLane* getDepartLane(MSVehicle& veh) const;
508 
509 
515  }
516 
517 
521  inline void setLastFailedInsertionTime(SUMOTime time) const {
523  }
525 
526 
528  virtual void changeLanes(SUMOTime t);
529 
530 
531 #ifdef HAVE_INTERNAL_LANES
532  const MSEdge* getInternalFollowingEdge(const MSEdge* followerAfterInternal) const;
534 #endif
535 
537  inline bool prohibits(const SUMOVehicle* const vehicle) const {
538  if (vehicle == 0) {
539  return false;
540  }
541  const SUMOVehicleClass svc = vehicle->getVehicleType().getVehicleClass();
542  return (myCombinedPermissions & svc) != svc;
543  }
544 
546  return myCombinedPermissions;
547  }
548 
549  void rebuildAllowedLanes();
550 
551 
556  SUMOReal getDistanceTo(const MSEdge* other) const;
557 
558 
562  inline SUMOReal getLength() const {
563  return myLength;
564  }
565 
566 
571  SUMOReal getSpeedLimit() const;
572 
576  void setMaxSpeed(SUMOReal val) const;
577 
583  SUMOReal getVehicleMaxSpeed(const SUMOVehicle* const veh) const;
584 
585  virtual void addPerson(MSTransportable* p) const {
586  myPersons.insert(p);
587  }
588 
589  virtual void removePerson(MSTransportable* p) const {
590  std::set<MSTransportable*>::iterator i = myPersons.find(p);
591  if (i != myPersons.end()) {
592  myPersons.erase(i);
593  }
594  }
595 
597  virtual void addContainer(MSTransportable* container) const {
598  myContainers.insert(container);
599  }
600 
602  virtual void removeContainer(MSTransportable* container) const {
603  std::set<MSTransportable*>::iterator i = myContainers.find(container);
604  if (i != myContainers.end()) {
605  myContainers.erase(i);
606  }
607  }
608 
609  inline bool isRoundabout() const {
610  return myAmRoundabout;
611  }
612 
614  myAmRoundabout = true;
615  }
616 
617  void markDelayed() const {
618  myAmDelayed = true;
619  }
620 
622  SUMOReal getMesoMeanSpeed() const;
623 
625  virtual void lock() const {}
626 
628  virtual void unlock() const {};
629 
633  static bool dictionary(const std::string& id, MSEdge* edge);
634 
636  static MSEdge* dictionary(const std::string& id);
637 
639  static size_t dictSize();
640 
642  static const MSEdgeVector& getAllEdges();
643 
645  static void clear();
646 
648  static void insertIDs(std::vector<std::string>& into);
649 
650 
651 public:
654 
663  static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into,
664  const std::string& rid);
665 
666 
673  static void parseEdgesList(const std::vector<std::string>& desc, ConstMSEdgeVector& into,
674  const std::string& rid);
676 
677 
678 protected:
682  class by_id_sorter {
683  public:
685  explicit by_id_sorter() { }
686 
688  int operator()(const MSEdge* const e1, const MSEdge* const e2) const {
689  return e1->getID() < e2->getID();
690  }
691 
692  };
693 
698  public:
700  explicit transportable_by_position_sorter(SUMOTime timestep): myTime(timestep) { }
701 
703  int operator()(const MSTransportable* const c1, const MSTransportable* const c2) const;
704  private:
706  };
707 
708 
717  const std::vector<MSLane*>* allowedLanes(const MSEdge* destination,
718  SUMOVehicleClass vclass = SVC_IGNORING) const;
719 
720 
722  const std::vector<MSLane*>* getAllowedLanesWithDefault(const AllowedLanesCont& c, const MSEdge* dest) const;
723 
724 protected:
726  const int myNumericalID;
727 
729  const std::vector<MSLane*>* myLanes;
730 
733 
736 
739 
742 
744  std::vector<std::string> myCrossingEdges;
745 
748 
751 
755 
757  mutable std::set<MSTransportable*> myPersons;
758 
760  mutable std::set<MSTransportable*> myContainers;
761 
764 
766  AllowedLanesCont myAllowed;
767 
769  // @note: this map is filled on demand
770  mutable ClassedAllowedLanesCont myClassedAllowed;
771 
777 
779  std::string myStreetName;
780 
782  std::string myEdgeType;
783 
785  const int myPriority;
786 
789 
792 
794  mutable bool myAmDelayed;
795 
798 
801 
803  typedef std::map< std::string, MSEdge* > DictType;
804 
808  static DictType myDict;
809 
815 
816 
818  mutable std::map<SUMOVehicleClass, MSEdgeVector> myClassesSuccessorMap;
819 
820 private:
822  MSEdge(const MSEdge&);
823 
825  MSEdge& operator=(const MSEdge&);
826 
827 };
828 
829 
830 #endif
831 
832 /****************************************************************************/
833 
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
Definition: MSEdge.h:794
std::set< MSTransportable * > myContainers
Containers on the edge.
Definition: MSEdge.h:760
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
Definition: MSEdge.cpp:626
long long int SUMOTime
Definition: SUMOTime.h:43
SUMOReal myLength
the length of the edge (cached value for speedup)
Definition: MSEdge.h:788
SUMOVehicleClass getVehicleClass() const
Get this vehicle type&#39;s vehicle class.
Sorts edges by their ids.
Definition: MSEdge.h:682
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:312
bool insertVehicle(SUMOVehicle &v, SUMOTime time, const bool checkOnly=false) const
Tries to insert the given vehicle into the network.
Definition: MSEdge.cpp:393
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:664
void initialize(const std::vector< MSLane * > *lanes)
Initialize the edge.
Definition: MSEdge.cpp:107
const std::vector< MSLane * > & getLanes() const
Returns this edge&#39;s lanes.
Definition: MSEdge.h:185
unsigned int getNumPredecessors() const
Returns the number of edges this edge is connected to.
Definition: MSEdge.h:358
virtual void lock() const
grant exclusive access to the mesoscopic state
Definition: MSEdge.h:625
void recalcCache()
Recalculates the cached values.
Definition: MSEdge.cpp:122
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:597
The base class for an intersection.
Definition: MSJunction.h:64
static MSEdgeVector myEdges
Static list of edges.
Definition: MSEdge.h:813
const EdgeBasicFunction myFunction
the purpose of the edge
Definition: MSEdge.h:735
int SVCPermissions
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
Definition: MSEdge.h:291
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
Definition: MSEdge.h:770
bool isWalkingArea() const
return whether this edge is walking area
Definition: MSEdge.h:257
void closeBuilding()
Definition: MSEdge.cpp:129
virtual ~MSEdge()
Destructor.
Definition: MSEdge.cpp:91
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:271
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:160
std::string myEdgeType
the type of the edge (optionally used during network creation)
Definition: MSEdge.h:782
SVCPermissions getPermissions() const
Definition: MSEdge.h:545
transportable_by_position_sorter(SUMOTime timestep)
constructor
Definition: MSEdge.h:700
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:578
const int myNumericalID
This edge&#39;s numerical id.
Definition: MSEdge.h:726
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
Definition: MSEdge.cpp:304
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
Finds the emptiest lane allowing the vehicle class.
Definition: MSEdge.cpp:318
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
int myVaporizationRequests
Vaporizer counter.
Definition: MSEdge.h:738
const MSEdgeVector & getIncomingEdges() const
Returns the list of edges from which this edge may be reached.
Definition: MSEdge.h:321
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:537
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
Definition: MSEdge.cpp:311
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:602
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
Definition: MSEdge.h:803
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:65
A road/street connecting two junctions.
Definition: MSEdge.h:80
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
Definition: MSEdge.h:741
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition: MSEdge.h:818
void rebuildAllowedLanes()
Definition: MSEdge.cpp:172
SUMOReal getLength() const
return the length of the edge
Definition: MSEdge.h:562
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:589
The edge is a district edge.
Definition: MSEdge.h:99
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:585
Representation of a vehicle.
Definition: SUMOVehicle.h:65
const MSEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of reachable edges.
Definition: MSEdge.h:367
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
Definition: MSEdge.h:766
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:617
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
Definition: MSEdge.h:773
static SUMOReal getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:142
MSEdgeVector mySuccessors
The succeeding edges.
Definition: MSEdge.h:747
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:194
MSJunction * myToJunction
Definition: MSEdge.h:754
MSLaneChanger * myLaneChanger
This member will do the lane-change.
Definition: MSEdge.h:732
void markDelayed() const
Definition: MSEdge.h:617
MSEdge(const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
Definition: MSEdge.cpp:73
bool isRoundabout() const
Definition: MSEdge.h:609
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
Definition: MSEdge.h:395
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:729
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:674
bool isInternal() const
return whether this edge is an internal edge
Definition: MSEdge.h:247
const std::string & getEdgeType() const
Returns the type of the edge.
Definition: MSEdge.h:277
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Definition: MSEdge.cpp:338
Base class for objects which have an id.
Definition: Named.h:45
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep) const
Returns this edge&#39;s containers sorted by pos.
Definition: MSEdge.cpp:707
SUMOReal getMesoMeanSpeed() const
get the mean speed for mesoscopic simulation
Definition: MSEdge.cpp:542
const std::vector< MSEdge * > & getOutgoingEdges() const
Returns the list of edges that may be reached from this edge.
Definition: MSEdge.h:328
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
Definition: MSEdge.h:775
The edge is a pedestrian walking area (a special type of internal edge)
Definition: MSEdge.h:103
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Definition: MSEdge.h:242
Structure representing possible vehicle parameter.
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
Definition: MSEdge.h:688
virtual void unlock() const
release exclusive access to the mesoscopic state
Definition: MSEdge.h:628
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:264
int getPriority() const
Returns the priority of the edge.
Definition: MSEdge.h:283
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
Definition: MSEdge.h:299
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:206
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:611
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
Definition: MSEdge.cpp:491
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:791
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:221
bool myAmRoundabout
whether this edge belongs to a roundabout
Definition: MSEdge.h:797
The edge is a pedestrian crossing (a special type of internal edge)
Definition: MSEdge.h:101
static size_t dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:605
std::string myStreetName
the real-world name of this edge (need not be unique)
Definition: MSEdge.h:779
MSJunction * myFromJunction
the junctions for this edge
Definition: MSEdge.h:753
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
Definition: MSEdge.h:513
void setJunctions(MSJunction *from, MSJunction *to)
Definition: MSEdge.h:381
by_id_sorter()
constructor
Definition: MSEdge.h:685
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:785
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
Definition: MSEdge.h:521
std::vector< std::string > myCrossingEdges
The crossed edges id for a crossing edge. On not crossing edges it is empty.
Definition: MSEdge.h:744
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSEdge.h:808
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:194
#define SUMOReal
Definition: config.h:213
Sorts transportables by their positions.
Definition: MSEdge.h:697
SUMOReal getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:437
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: MSEdge.h:252
unsigned int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
Definition: MSEdge.h:335
const MSJunction * getFromJunction() const
Definition: MSEdge.h:372
const MSEdgeVector & getSuccessors() const
Returns the following edges.
Definition: MSEdge.h:342
#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:681
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.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:200
void markAsRoundabout()
Definition: MSEdge.h:613
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:233
MSEdgeVector myPredecessors
The preceeding edges.
Definition: MSEdge.h:750
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
Definition: MSEdge.cpp:559
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:634
vehicles ignoring classes
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep) const
Returns this edge&#39;s persons sorted by pos.
Definition: MSEdge.cpp:699
static SUMOReal getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, SUMOReal time)
Returns the travel time for the given edge.
Definition: MSEdge.h:453
void setMaxSpeed(SUMOReal val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
Definition: MSEdge.cpp:688
const MSJunction * getToJunction() const
Definition: MSEdge.h:376
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
Definition: MSEdge.h:757
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle&#39;s type.