SUMO - Simulation of Urban MObility
MSLane.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 /****************************************************************************/
24 // Representation of a lane in the micro simulation
25 /****************************************************************************/
26 #ifndef MSLane_h
27 #define MSLane_h
28 
29 
30 // ===========================================================================
31 // included modules
32 // ===========================================================================
33 #ifdef _MSC_VER
34 #include <windows_config.h>
35 #else
36 #include <config.h>
37 #endif
38 
39 #include <vector>
40 #include <deque>
41 #include <cassert>
42 #include <utils/common/Named.h>
48 #include "MSLinkCont.h"
49 #include "MSLeaderInfo.h"
50 #include "MSMoveReminder.h"
51 #include <libsumo/Helper.h>
52 
53 
54 // ===========================================================================
55 // class declarations
56 // ===========================================================================
57 class MSEdge;
58 class MSVehicle;
59 class MSLaneChanger;
60 class MSLink;
61 class MSVehicleTransfer;
62 class MSVehicleControl;
63 class OutputDevice;
64 class MSLeaderInfo;
65 
66 
67 // ===========================================================================
68 // class definitions
69 // ===========================================================================
77 class MSLane : public Named, public Parameterised {
78 public:
80  friend class MSLaneChanger;
81  friend class MSLaneChangerSublane;
82 
83  friend class MSXMLRawOut;
84 
85  friend class MSQueueExport;
86  friend class AnyVehicleIterator;
87 
89  typedef std::vector<MSVehicle*> VehCont;
90 
93  struct VehPosition : public std::binary_function < const MSVehicle*, double, bool > {
95  bool operator()(const MSVehicle* cmp, double pos) const;
96  };
97 
98  // TODO: Better documentation
104  public:
106  const MSLane* lane,
107  int i1,
108  int i2,
109  const int i1End,
110  const int i2End,
111  bool downstream = true) :
112  myLane(lane),
113  myI1(i1),
114  myI2(i2),
115  myI1End(i1End),
116  myI2End(i2End),
117  myDownstream(downstream),
118  myDirection(downstream ? 1 : -1) {
119  }
120 
121  bool operator== (AnyVehicleIterator const& other) const {
122  return (myI1 == other.myI1
123  && myI2 == other.myI2
124  && myI1End == other.myI1End
125  && myI2End == other.myI2End);
126  }
127 
128  bool operator!= (AnyVehicleIterator const& other) const {
129  return !(*this == other);
130  }
131 
133  return **this;
134  }
135 
136  const MSVehicle* operator*();
137 
138  AnyVehicleIterator& operator++();
139 
140  private:
141  bool nextIsMyVehicles() const;
142 
144  const MSLane* myLane;
146  int myI1;
148  int myI2;
150  int myI1End;
152  int myI2End;
157 
158  };
159 
160 
161 public:
170  };
171 
186  MSLane(const std::string& id, double maxSpeed, double length, MSEdge* const edge,
187  int numericalID, const PositionVector& shape, double width,
188  SVCPermissions permissions, int index, bool isRampAccel);
189 
190 
192  virtual ~MSLane();
193 
194 
195 
198 
206  void addLink(MSLink* link);
207 
212  void addNeigh(const std::string& id);
214 
215 
216 
219 
226  virtual void addMoveReminder(MSMoveReminder* rem);
227 
228 
232  inline const std::vector< MSMoveReminder* >& getMoveReminders() const {
233  return myMoveReminders;
234  }
236 
237 
238 
241 
257  bool insertVehicle(MSVehicle& v);
258 
259 
278  bool isInsertionSuccess(MSVehicle* vehicle, double speed, double pos, double posLat,
279  bool recheckNextLanes,
280  MSMoveReminder::Notification notification);
281 
282  // XXX: Documentation?
283  bool checkFailure(const MSVehicle* aVehicle, double& speed, double& dist, const double nspeed, const bool patchSpeed, const std::string errorMsg) const;
284 
288  bool lastInsertion(MSVehicle& veh, double mspeed, double posLat, bool patchSpeed);
289 
297  bool freeInsertion(MSVehicle& veh, double speed, double posLat,
299 
300 
310  void forceVehicleInsertion(MSVehicle* veh, double pos, MSMoveReminder::Notification notification, double posLat = 0);
312 
313 
314 
318 
325  virtual double setPartialOccupation(MSVehicle* v);
326 
330  virtual void resetPartialOccupation(MSVehicle* v);
331 
334  virtual void setManeuverReservation(MSVehicle* v);
335 
339  virtual void resetManeuverReservation(MSVehicle* v);
340 
351  const MSLeaderInfo& getLastVehicleInformation(const MSVehicle* ego, double latOffset, double minPos = 0, bool allowCached = true) const;
352 
354  const MSLeaderInfo& getFirstVehicleInformation(const MSVehicle* ego, double latOffset, bool onlyFrontOnLane, double maxPos = std::numeric_limits<double>::max(), bool allowCached = true) const;
355 
357 
360 
365  int getVehicleNumber() const {
366  return (int)myVehicles.size();
367  }
368 
374  return (int)myVehicles.size() + (int)myPartialVehicles.size();
375  }
376 
382  return (int)myPartialVehicles.size();
383  }
384 
385 
392  virtual const VehCont& getVehiclesSecure() const {
393  return myVehicles;
394  }
395 
396 
399  return AnyVehicleIterator(this, 0, 0, (int)myVehicles.size(), (int)myPartialVehicles.size(), true);
400  }
401 
404  return AnyVehicleIterator(this, (int)myVehicles.size(), (int)myPartialVehicles.size(), (int)myVehicles.size(), (int)myPartialVehicles.size(), true);
405  }
406 
409  return AnyVehicleIterator(this, (int)myVehicles.size() - 1, (int)myPartialVehicles.size() - 1, -1, -1, false);
410  }
411 
414  return AnyVehicleIterator(this, -1, -1, -1, -1, false);
415  }
416 
419  virtual void releaseVehicles() const { }
421 
422 
423 
426 
427 
431  inline int getNumericalID() const {
432  return myNumericalID;
433  }
434 
435 
439  inline const PositionVector& getShape() const {
440  return myShape;
441  }
442 
444  inline double getLengthGeometryFactor() const {
445  return myLengthGeometryFactor;
446  }
447 
449  inline bool isAccelLane() const {
450  return myIsRampAccel;
451  }
452 
453  /* @brief fit the given lane position to a visibly suitable geometry position
454  * (lane length might differ from geometry length) */
455  inline double interpolateLanePosToGeometryPos(double lanePos) const {
456  return lanePos * myLengthGeometryFactor;
457  }
458 
459  /* @brief fit the given lane position to a visibly suitable geometry position
460  * and return the coordinates */
461  inline const Position geometryPositionAtOffset(double offset, double lateralOffset = 0) const {
462  return myShape.positionAtOffset(interpolateLanePosToGeometryPos(offset), lateralOffset);
463  }
464 
465  /* @brief fit the given geomtry position to a valid lane position
466  * (lane length might differ from geometry length) */
467  inline double interpolateGeometryPosToLanePos(double geometryPos) const {
468  return geometryPos / myLengthGeometryFactor;
469  }
470 
475  inline double getVehicleMaxSpeed(const SUMOVehicle* const veh) const {
476  if (myRestrictions != 0) {
477  std::map<SUMOVehicleClass, double>::const_iterator r = myRestrictions->find(veh->getVClass());
478  if (r != myRestrictions->end()) {
479  return MIN2(veh->getMaxSpeed(), r->second * veh->getChosenSpeedFactor());
480  }
481  }
482  return MIN2(veh->getMaxSpeed(), myMaxSpeed * veh->getChosenSpeedFactor());
483  }
484 
485 
489  inline double getSpeedLimit() const {
490  return myMaxSpeed;
491  }
492 
493 
497  inline double getLength() const {
498  return myLength;
499  }
500 
501 
506  return myPermissions;
507  }
508 
509 
513  double getWidth() const {
514  return myWidth;
515  }
516 
520  int getIndex() const {
521  return myIndex;
522  }
524 
526  int getCrossingIndex() const;
527 
528 
531 
539  virtual void planMovements(const SUMOTime t);
540 
549  void updateLeaderInfo(const MSVehicle* veh, VehCont::reverse_iterator& vehPart, VehCont::reverse_iterator& vehRes, MSLeaderInfo& ahead) const;
550 
561  virtual bool executeMovements(SUMOTime t, std::vector<MSLane*>& lanesWithVehiclesToIntegrate);
562 
564  virtual bool integrateNewVehicle(SUMOTime t);
566 
567 
568 
570  virtual void detectCollisions(SUMOTime timestep, const std::string& stage);
571 
572 
575  virtual bool appropriate(const MSVehicle* veh);
576 
577 
579  const MSLinkCont& getLinkCont() const;
580 
582  MSLink* getLinkTo(const MSLane*) const;
583 
585  MSLink* getEntryLink() const;
586 
587 
589  bool empty() const {
590  assert(myVehBuffer.size() == 0);
591  return myVehicles.empty();
592  }
593 
597  void setMaxSpeed(double val);
598 
602  void setLength(double val);
603 
607  MSEdge& getEdge() const {
608  return *myEdge;
609  }
610 
611 
615  const MSEdge* getNextNormal() const;
616 
617 
623  const MSLane* getFirstInternalInConnection(double& offset) const;
624 
625 
628 
639  static bool dictionary(const std::string& id, MSLane* lane);
640 
641 
648  static MSLane* dictionary(const std::string& id);
649 
650 
652  static void clear();
653 
654 
658  static int dictSize() {
659  return (int)myDict.size();
660  }
661 
662 
666  static void insertIDs(std::vector<std::string>& into);
667 
668 
673  template<class RTREE>
674  static void fill(RTREE& into);
676 
677 
678 
679  // XXX: succLink does not exist... Documentation?
684  static MSLinkCont::const_iterator succLinkSec(const SUMOVehicle& veh,
685  int nRouteSuccs,
686  const MSLane& succLinkSource,
687  const std::vector<MSLane*>& conts);
688 
689 
692  bool isLinkEnd(MSLinkCont::const_iterator& i) const;
693 
696  bool isLinkEnd(MSLinkCont::iterator& i);
697 
700  bool isEmpty() const;
701 
703  bool isInternal() const;
704 
706  MSVehicle* getLastFullVehicle() const;
707 
710 
712  MSVehicle* getLastAnyVehicle() const;
713 
715  MSVehicle* getFirstAnyVehicle() const;
716 
717  /* @brief remove the vehicle from this lane
718  * @param[notify] whether moveReminders of the vehicle shall be triggered
719  */
720  virtual MSVehicle* removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify = true);
721 
722  void leftByLaneChange(MSVehicle* v);
724 
728  MSLane* getParallelLane(int offset) const;
729 
730 
735  void setPermissions(SVCPermissions permissions, long transientID);
736  void resetPermissions(long transientID);
737 
738 
739  inline bool allowsVehicleClass(SUMOVehicleClass vclass) const {
740  return (myPermissions & vclass) == vclass;
741  }
742 
743  void addIncomingLane(MSLane* lane, MSLink* viaLink);
744 
745 
748  double length;
750  };
751 
752  const std::vector<IncomingLaneInfo>& getIncomingLanes() const {
753  return myIncomingLanes;
754  }
755 
756 
757  void addApproachingLane(MSLane* lane, bool warnMultiCon);
758  bool isApproachedFrom(MSEdge* const edge);
759  bool isApproachedFrom(MSEdge* const edge, MSLane* const lane);
760 
761 
762 
764  MSLeaderDistanceInfo getFollowersOnConsecutive(const MSVehicle* ego, double backOffset,
765  bool allSublanes, double searchDist = -1, bool ignoreMinorLinks = false) const;
766 
768  double getMissingRearGap(const MSVehicle* leader, double backOffset, double leaderSpeed) const;
769 
782  std::pair<MSVehicle* const, double> getLeader(const MSVehicle* veh, const double vehPos, const std::vector<MSLane*>& bestLaneConts, double dist = -1, bool checkTmpVehicles = false) const;
783 
806  std::pair<MSVehicle* const, double> getLeaderOnConsecutive(double dist, double seen,
807  double speed, const MSVehicle& veh, const std::vector<MSLane*>& bestLaneConts) const;
808 
810  void getLeadersOnConsecutive(double dist, double seen, double speed, const MSVehicle* ego,
811  const std::vector<MSLane*>& bestLaneConts, MSLeaderDistanceInfo& result) const;
812 
830  std::pair<MSVehicle* const, double> getCriticalLeader(double dist, double seen, double speed, const MSVehicle& veh) const;
831 
832  /* @brief return the partial vehicle closest behind ego or 0
833  * if no such vehicle exists */
834  MSVehicle* getPartialBehind(const MSVehicle* ego) const;
835 
838 
843 
846  MSLane* getLogicalPredecessorLane(const MSEdge& fromEdge) const;
847 
848 
855 
856 
863 
866 
868  std::vector<const MSLane*> getOutgoingLanes() const;
869 
871 
872 
876  double getMeanSpeed() const;
877 
881  double getWaitingSeconds() const;
882 
883 
887  double getBruttoOccupancy() const;
888 
889 
893  double getNettoOccupancy() const;
894 
895 
899  inline double getBruttoVehLenSum() const {
901  }
902 
903 
907  double getCO2Emissions() const;
908 
909 
913  double getCOEmissions() const;
914 
915 
919  double getPMxEmissions() const;
920 
921 
925  double getNOxEmissions() const;
926 
927 
931  double getHCEmissions() const;
932 
933 
937  double getFuelConsumption() const;
938 
939 
943  double getElectricityConsumption() const;
944 
945 
949  double getHarmonoise_NoiseEmissions() const;
951 
952  void setRightSideOnEdge(double value, int rightmostSublane) {
953  myRightSideOnEdge = value;
954  myRightmostSublane = rightmostSublane;
955  }
956 
958  void initRestrictions();
959 
960  double getRightSideOnEdge() const {
961  return myRightSideOnEdge;
962  }
963 
964  int getRightmostSublane() const {
965  return myRightmostSublane;
966  }
967 
968  double getCenterOnEdge() const {
969  return myRightSideOnEdge + 0.5 * myWidth;
970  }
971 
973  void sortPartialVehicles();
974 
977 
979  MSLane* getOpposite() const;
980 
982  double getOppositePos(double pos) const;
983 
984  /* @brief find leader for a vehicle depending the relative driving direction
985  * @param[in] ego The ego vehicle
986  * @param[in] dist The look-ahead distance when looking at consecutive lanes
987  * @param[in] oppositeDir Whether the lane has the opposite driving direction of ego
988  * @return the leader vehicle and it's gap to ego
989  */
990  std::pair<MSVehicle* const, double> getOppositeLeader(const MSVehicle* ego, double dist, bool oppositeDir) const;
991 
992  /* @brief find follower for a vehicle that is located on the opposite of this lane
993  * @param[in] ego The ego vehicle
994  * @return the follower vehicle and it's gap to ego
995  */
996  std::pair<MSVehicle* const, double> getOppositeFollower(const MSVehicle* ego) const;
997 
998 
1006  std::pair<MSVehicle* const, double> getFollower(const MSVehicle* ego, double egoPos, double dist, bool ignoreMinorLinks) const;
1007 
1008 
1010  void addParking(MSVehicle* veh);
1011 
1013  virtual void removeParking(MSVehicle* veh);
1014 
1016  const std::set<const MSVehicle*>& getParkingVehicles() const {
1017  return myParkingVehicles;
1018  }
1019 
1021  virtual bool isSelected() const {
1022  return false;
1023  }
1024 
1027 
1035  void saveState(OutputDevice& out);
1036 
1048  void loadState(std::vector<std::string>& vehIDs, MSVehicleControl& vc);
1050 
1051 
1059  void visit(const LaneStoringVisitor& cont) const {
1060  cont.add(this);
1061  }
1062 
1063  static void initCollisionOptions(const OptionsCont& oc);
1064 
1065  static bool teleportOnCollision() {
1067  }
1068 
1070  return myCollisionAction;
1071  }
1072 
1073  static const long CHANGE_PERMISSIONS_PERMANENT = 0;
1074  static const long CHANGE_PERMISSIONS_GUI = 1;
1075 
1076 protected:
1078  virtual void swapAfterLaneChange(SUMOTime t);
1079 
1091  virtual void incorporateVehicle(MSVehicle* veh, double pos, double speed, double posLat,
1092  const MSLane::VehCont::iterator& at,
1094 
1096  void detectPedestrianJunctionCollision(const MSVehicle* collider, const PositionVector& colliderBoundary, const MSLane* foeLane,
1097  SUMOTime timestep, const std::string& stage);
1098 
1100  bool detectCollisionBetween(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim,
1101  std::set<const MSVehicle*, ComparatorIdLess>& toRemove,
1102  std::set<const MSVehicle*>& toTeleport) const;
1103 
1105  void handleCollisionBetween(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim,
1106  double gap, double latGap,
1107  std::set<const MSVehicle*, ComparatorIdLess>& toRemove,
1108  std::set<const MSVehicle*>& toTeleport) const;
1109 
1111  double getMaximumBrakeDist() const;
1112 
1113  /* @brief determine depart speed and whether it may be patched
1114  * @param[in] veh The departing vehicle
1115  * @param[out] whether the speed may be patched to account for safety
1116  * @return the depart speed
1117  */
1118  double getDepartSpeed(const MSVehicle& veh, bool& patchSpeed);
1119 
1120  /* @brief determine the lateral depart position
1121  * @param[in] veh The departing vehicle
1122  * @return the lateral depart position
1123  */
1124  double getDepartPosLat(const MSVehicle& veh);
1125 
1128  double safeInsertionSpeed(const MSVehicle* veh, double seen, const MSLeaderInfo& leaders, double speed);
1129 
1131  double basePos(const MSVehicle& veh) const;
1132 
1134  bool checkForPedestrians(const MSVehicle* aVehicle, double& speed, double& dist, double pos, bool patchSpeed) const;
1135 
1138 
1141 
1143  int myIndex;
1144 
1156  VehCont myVehicles;
1157 
1169 
1172  VehCont myTmpVehicles;
1173 
1176  VehCont myVehBuffer;
1177 
1185 
1186  /* @brief list of vehicles that are parking near this lane
1187  * (not necessarily on the road but having reached their stop on this lane)
1188  * */
1189  std::set<const MSVehicle*> myParkingVehicles;
1190 
1192  double myLength;
1193 
1195  const double myWidth;
1196 
1198  MSEdge* const myEdge;
1199 
1201  double myMaxSpeed;
1202 
1205 
1208 
1210  const std::map<SUMOVehicleClass, double>* myRestrictions;
1211 
1213  std::vector<IncomingLaneInfo> myIncomingLanes;
1214 
1217 
1220 
1223 
1226 
1229 
1233 
1235  std::map<MSEdge*, std::vector<MSLane*> > myApproachingLanes;
1236 
1241 
1243 
1248 
1251 
1253  const bool myIsRampAccel;
1254 
1259 
1260  // @brief the ids of neighboring lanes
1261  std::vector<std::string> myNeighs;
1262 
1263  // @brief transient changes in permissions
1264  std::map<long, SVCPermissions> myPermissionChanges;
1265 
1267  typedef std::map< std::string, MSLane* > DictType;
1268 
1270  static DictType myDict;
1271 
1272 private:
1274  std::vector< MSMoveReminder* > myMoveReminders;
1275 
1281 
1287  public:
1289  explicit vehicle_position_sorter(const MSLane* lane) :
1290  myLane(lane) {
1291  }
1292 
1293 
1299  int operator()(MSVehicle* v1, MSVehicle* v2) const;
1300 
1301  const MSLane* myLane;
1302 
1303  };
1304 
1310  public:
1312  explicit vehicle_natural_position_sorter(const MSLane* lane) :
1313  myLane(lane) {
1314  }
1315 
1316 
1322  int operator()(MSVehicle* v1, MSVehicle* v2) const;
1323 
1324  const MSLane* myLane;
1325 
1326  };
1327 
1333  public:
1335  explicit by_connections_to_sorter(const MSEdge* const e);
1336 
1338  int operator()(const MSEdge* const e1, const MSEdge* const e2) const;
1339 
1340  private:
1341  by_connections_to_sorter& operator=(const by_connections_to_sorter&); // just to avoid a compiler warning
1342  private:
1343  const MSEdge* const myEdge;
1344  double myLaneDir;
1345  };
1346 
1347 
1348 
1354  public:
1356  explicit incoming_lane_priority_sorter(const MSLane* targetLane);
1357 
1359  int operator()(const IncomingLaneInfo& lane1, const IncomingLaneInfo& lane2) const;
1360 
1361  private:
1362  incoming_lane_priority_sorter& operator=(const incoming_lane_priority_sorter&); // just to avoid a compiler warning
1363  private:
1364  const MSLane* const myLane;
1365  double myLaneDir;
1366  };
1367 
1368 
1374  public:
1376  explicit outgoing_lane_priority_sorter(const MSLane* sourceLane);
1377 
1379  int operator()(const MSLink* link1, const MSLink* link2) const;
1380 
1381  private:
1382  outgoing_lane_priority_sorter& operator=(const outgoing_lane_priority_sorter&); // just to avoid a compiler warning
1383  private:
1384  const MSLane* const myLane;
1385  double myLaneDir;
1386  };
1387 
1391  class edge_finder {
1392  public:
1393  edge_finder(MSEdge* e) : myEdge(e) {}
1394  bool operator()(const IncomingLaneInfo& ili) const {
1395  return &(ili.lane->getEdge()) == myEdge;
1396  }
1397  private:
1398  edge_finder& operator=(const edge_finder&); // just to avoid a compiler warning
1399  private:
1400  const MSEdge* const myEdge;
1401  };
1402 
1403 private:
1405  MSLane(const MSLane&);
1406 
1408  MSLane& operator=(const MSLane&);
1409 
1410 
1411 };
1412 
1413 
1414 #endif
1415 
1416 /****************************************************************************/
1417 
void detectPedestrianJunctionCollision(const MSVehicle *collider, const PositionVector &colliderBoundary, const MSLane *foeLane, SUMOTime timestep, const std::string &stage)
detect whether a vehicle collids with pedestrians on the junction
Definition: MSLane.cpp:1322
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
Definition: MSLane.h:752
std::pair< MSVehicle *const, double > getFollower(const MSVehicle *ego, double egoPos, double dist, bool ignoreMinorLinks) const
Find follower vehicle for the given ego vehicle (which may be on the opposite direction lane) ...
Definition: MSLane.cpp:3033
double getBruttoOccupancy() const
Returns the brutto (including minGaps) occupancy of this lane during the last step.
Definition: MSLane.cpp:2383
void loadState(std::vector< std::string > &vehIDs, MSVehicleControl &vc)
Loads the state of this segment with the given parameters.
Definition: MSLane.cpp:2745
SVCPermissions myPermissions
The vClass permissions for this lane.
Definition: MSLane.h:1204
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
Definition: MSLane.cpp:2256
VehCont myVehicles
The lane&#39;s vehicles. This container holds all vehicles that have their front (longitudinally) and the...
Definition: MSLane.h:1156
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane&#39;s maximum speed, given a vehicle&#39;s speed limit adaptation.
Definition: MSLane.h:475
saves leader/follower vehicles and their distances relative to an ego vehicle
Definition: MSLeaderInfo.h:135
double getNOxEmissions() const
Returns the sum of last step NOx emissions.
Definition: MSLane.cpp:2478
MSEdge & getEdge() const
Returns the lane&#39;s edge.
Definition: MSLane.h:607
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
MSVehicle * getFirstFullVehicle() const
returns the first vehicle for which this lane is responsible or 0
Definition: MSLane.cpp:1788
void resetPermissions(long transientID)
Definition: MSLane.cpp:3131
MSLane(const std::string &id, double maxSpeed, double length, MSEdge *const edge, int numericalID, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel)
Constructor.
Definition: MSLane.cpp:166
void sortManeuverReservations()
sorts myManeuverReservations
Definition: MSLane.cpp:1750
const MSEdge * getNextNormal() const
Returns the lane&#39;s follower if it is an internal lane, the edge of the lane otherwise.
Definition: MSLane.cpp:1611
static void insertIDs(std::vector< std::string > &into)
Adds the ids of all stored lanes into the given vector.
Definition: MSLane.cpp:1671
void updateLeaderInfo(const MSVehicle *veh, VehCont::reverse_iterator &vehPart, VehCont::reverse_iterator &vehRes, MSLeaderInfo &ahead) const
This updates the MSLeaderInfo argument with respect to the given MSVehicle. All leader-vehicles on th...
Definition: MSLane.cpp:1107
Sorts lanes (IncomingLaneInfos) by their priority or, if this doesn&#39;t apply, wrt. the angle differenc...
Definition: MSLane.h:1353
virtual void removeParking(MSVehicle *veh)
remove parking vehicle. This must be syncrhonized when running with GUI
Definition: MSLane.cpp:2729
std::pair< MSVehicle *const, double > getOppositeLeader(const MSVehicle *ego, double dist, bool oppositeDir) const
Definition: MSLane.cpp:3052
static bool teleportOnCollision()
Definition: MSLane.h:1065
static const long CHANGE_PERMISSIONS_GUI
Definition: MSLane.h:1074
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool checkFailure(const MSVehicle *aVehicle, double &speed, double &dist, const double nspeed, const bool patchSpeed, const std::string errorMsg) const
Definition: MSLane.cpp:564
int myI2
index for myPartialVehicles
Definition: MSLane.h:148
double getFuelConsumption() const
Returns the sum of last step fuel consumption.
Definition: MSLane.cpp:2502
bool isInsertionSuccess(MSVehicle *vehicle, double speed, double pos, double posLat, bool recheckNextLanes, MSMoveReminder::Notification notification)
Tries to insert the given vehicle with the given state (speed and pos)
Definition: MSLane.cpp:582
static void fill(RTREE &into)
Fills the given RTree with lane instances.
Definition: MSLane.cpp:1679
double getMaximumBrakeDist() const
compute maximum braking distance on this lane
Definition: MSLane.cpp:2032
void setMaxSpeed(double val)
Sets a new maximum speed for the lane (used by TraCI and MSCalibrator)
Definition: MSLane.cpp:1919
std::vector< IncomingLaneInfo > myIncomingLanes
All direct predecessor lanes.
Definition: MSLane.h:1213
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
int myI2End
end index for myPartialVehicles
Definition: MSLane.h:152
void addLink(MSLink *link)
Delayed initialization.
Definition: MSLane.cpp:206
MSLane * myCanonicalPredecessorLane
Similar to LogicalPredecessorLane,.
Definition: MSLane.h:1219
int myIndex
The lane index.
Definition: MSLane.h:1143
virtual bool integrateNewVehicle(SUMOTime t)
Insert buffered vehicle into the real lane.
Definition: MSLane.cpp:1715
static double myCollisionMinGapFactor
Definition: MSLane.h:1280
SUMOTime myLeaderInfoTime
time step for which myLeaderInfo was last updated
Definition: MSLane.h:1245
bool operator()(const MSVehicle *cmp, double pos) const
compares vehicle position to the detector position
Definition: MSLane.cpp:2543
AnyVehicleIterator is a structure, which manages the iteration through all vehicles on the lane...
Definition: MSLane.h:103
static SUMOTime myCollisionStopTime
Definition: MSLane.h:1279
Notification
Definition of a vehicle state.
virtual void resetManeuverReservation(MSVehicle *v)
Unregisters a vehicle, which previously registered for maneuvering into this lane.
Definition: MSLane.cpp:272
std::vector< const MSLane * > getOutgoingLanes() const
get the list of outgoing lanes
Definition: MSLane.cpp:2347
virtual MSVehicle * removeVehicle(MSVehicle *remVehicle, MSMoveReminder::Notification notification, bool notify=true)
Definition: MSLane.cpp:1944
double myBruttoVehicleLengthSum
The current length of all vehicles on this lane, including their minGaps.
Definition: MSLane.h:1225
MSVehicle * getFirstAnyVehicle() const
returns the first vehicle that is fully or partially on this lane
Definition: MSLane.cpp:1811
const MSEdge *const myEdge
Definition: MSLane.h:1343
void addIncomingLane(MSLane *lane, MSLink *viaLink)
Definition: MSLane.cpp:1968
double getPMxEmissions() const
Returns the sum of last step PMx emissions.
Definition: MSLane.cpp:2466
void visit(const LaneStoringVisitor &cont) const
Callback for visiting the lane when traversing an RTree.
Definition: MSLane.h:1059
double getLength() const
Returns the lane&#39;s length.
Definition: MSLane.h:497
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
Definition: MSLane.h:392
const PositionVector & getShape() const
Returns this lane&#39;s shape.
Definition: MSLane.h:439
bool isLinkEnd(MSLinkCont::const_iterator &i) const
Definition: MSLane.cpp:1758
static void initCollisionOptions(const OptionsCont &oc)
Definition: MSLane.cpp:3099
Realises dumping the complete network state.
Definition: MSXMLRawOut.h:61
virtual void addMoveReminder(MSMoveReminder *rem)
Add a move-reminder to move-reminder container.
Definition: MSLane.cpp:219
MSLink * getLinkTo(const MSLane *) const
returns the link to the given lane or 0, if it is not connected
Definition: MSLane.cpp:1881
void leftByLaneChange(MSVehicle *v)
Definition: MSLane.cpp:2358
MSLane * getCanonicalPredecessorLane() const
Definition: MSLane.cpp:2295
std::map< long, SVCPermissions > myPermissionChanges
Definition: MSLane.h:1264
void addNeigh(const std::string &id)
Adds a neighbor to this lane.
Definition: MSLane.cpp:212
const std::vector< MSMoveReminder *> & getMoveReminders() const
Return the list of this lane&#39;s move reminders.
Definition: MSLane.h:232
virtual double setPartialOccupation(MSVehicle *v)
Sets the information about a vehicle lapping into this lane.
Definition: MSLane.cpp:229
VehCont myPartialVehicles
The lane&#39;s partial vehicles. This container holds all vehicles that are partially on this lane but wh...
Definition: MSLane.h:1168
static bool myCheckJunctionCollisions
Definition: MSLane.h:1278
virtual void setManeuverReservation(MSVehicle *v)
Registers the lane change intentions (towards this lane) for the given vehicle.
Definition: MSLane.cpp:261
double getWidth() const
Returns the lane&#39;s width.
Definition: MSLane.h:513
int myI1End
end index for myVehicles
Definition: MSLane.h:150
int myDirection
index delta
Definition: MSLane.h:156
PositionVector myShape
The shape of the lane.
Definition: MSLane.h:1140
MSLane * getCanonicalSuccessorLane() const
Definition: MSLane.cpp:2315
std::set< const MSVehicle * > myParkingVehicles
Definition: MSLane.h:1189
void getLeadersOnConsecutive(double dist, double seen, double speed, const MSVehicle *ego, const std::vector< MSLane *> &bestLaneConts, MSLeaderDistanceInfo &result) const
Returns the immediate leaders and the distance to them (as getLeaderOnConsecutive but for the sublane...
Definition: MSLane.cpp:2884
bool myDownstream
iteration direction
Definition: MSLane.h:154
int getVehicleNumberWithPartials() const
Returns the number of vehicles on this lane (including partial occupators)
Definition: MSLane.h:373
Performs lane changing of vehicles.
std::vector< std::string > myNeighs
Definition: MSLane.h:1261
static CollisionAction myCollisionAction
the action to take on collisions
Definition: MSLane.h:1277
int getNumericalID() const
Returns this lane&#39;s numerical id.
Definition: MSLane.h:431
std::map< std::string, MSLane *> DictType
definition of the static dictionary type
Definition: MSLane.h:1267
static CollisionAction getCollisionAction()
Definition: MSLane.h:1069
int getPartialVehicleNumber() const
Returns the number of vehicles partially on this lane (for which this lane is not responsible) ...
Definition: MSLane.h:381
MSLinkCont myLinks
Definition: MSLane.h:1232
virtual void detectCollisions(SUMOTime timestep, const std::string &stage)
Check if vehicles are too close.
Definition: MSLane.cpp:1157
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSLane.h:1270
Sorts lanes (their origin link) by the priority of their noninternal target edges or...
Definition: MSLane.h:1373
bool isInternal() const
Definition: MSLane.cpp:1774
void addApproachingLane(MSLane *lane, bool warnMultiCon)
Definition: MSLane.cpp:1978
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:54
A road/street connecting two junctions.
Definition: MSEdge.h:80
bool insertVehicle(MSVehicle &v)
Tries to insert the given vehicle.
Definition: MSLane.cpp:484
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle&#39;s access class.
double getBruttoVehLenSum() const
Returns the sum of lengths of vehicles, including their minGaps, which were on the lane during the la...
Definition: MSLane.h:899
double myLength
Lane length [m].
Definition: MSLane.h:1192
int getIndex() const
Returns the lane&#39;s index.
Definition: MSLane.h:520
VehCont myTmpVehicles
Container for lane-changing vehicles. After completion of lane-change- process, the containers will b...
Definition: MSLane.h:1172
MSLink * getEntryLink() const
Returns the entry link if this is an internal lane, else 0.
Definition: MSLane.cpp:1902
static int dictSize()
Returns the number of stored lanes.
Definition: MSLane.h:658
int getCrossingIndex() const
return the index of the link to the next crossing if this is walkingArea, else -1 ...
Definition: MSLane.cpp:2372
Export the queueing length in front of a junction (very experimental!)
Definition: MSQueueExport.h:56
virtual void resetPartialOccupation(MSVehicle *v)
Removes the information about a vehicle lapping into this lane.
Definition: MSLane.cpp:242
double getCO2Emissions() const
Returns the sum of last step CO2 emissions.
Definition: MSLane.cpp:2442
const bool myIsRampAccel
whether this lane is an acceleration lane
Definition: MSLane.h:1253
const MSEdge *const myEdge
Definition: MSLane.h:1400
Representation of a vehicle.
Definition: SUMOVehicle.h:66
friend class AnyVehicleIterator
Definition: MSLane.h:86
void setLength(double val)
Sets a new length for the lane (used by TraCI only)
Definition: MSLane.cpp:1926
double interpolateGeometryPosToLanePos(double geometryPos) const
Definition: MSLane.h:467
double basePos(const MSVehicle &veh) const
departure position where the vehicle fits fully onto the lane (if possible)
Definition: MSLane.cpp:559
Sorts vehicles by their position (descending)
Definition: MSLane.h:1286
double myRightSideOnEdge
the combined width of all lanes with lower index on myEdge
Definition: MSLane.h:1256
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:45
double getCenterOnEdge() const
Definition: MSLane.h:968
bool lastInsertion(MSVehicle &veh, double mspeed, double posLat, bool patchSpeed)
inserts vehicle as close as possible to the last vehicle on this lane (or at the end of the lane if t...
Definition: MSLane.cpp:310
SVCPermissions myOriginalPermissions
The original vClass permissions for this lane (before temporary modifications)
Definition: MSLane.h:1207
A list of positions.
void enteredByLaneChange(MSVehicle *v)
Definition: MSLane.cpp:2365
const MSLeaderInfo & getLastVehicleInformation(const MSVehicle *ego, double latOffset, double minPos=0, bool allowCached=true) const
Returns the last vehicles on the lane.
Definition: MSLane.cpp:968
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
Definition: MSLane.h:365
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this lane.
Definition: MSLane.h:1210
bool isEmpty() const
Definition: MSLane.cpp:1769
bool checkForPedestrians(const MSVehicle *aVehicle, double &speed, double &dist, double pos, bool patchSpeed) const
check whether pedestrians on this lane interfere with vehicle insertion
Definition: MSLane.cpp:3146
std::pair< MSVehicle *const, double > getOppositeFollower(const MSVehicle *ego) const
Definition: MSLane.cpp:3075
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
Definition: MSLane.h:505
double safeInsertionSpeed(const MSVehicle *veh, double seen, const MSLeaderInfo &leaders, double speed)
return the maximum safe speed for insertion behind leaders (a negative value indicates that safe inse...
Definition: MSLane.cpp:949
double getSpeedLimit() const
Returns the lane&#39;s maximum allowed speed.
Definition: MSLane.h:489
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
Sorts edges by their angle relative to the given edge (straight comes first)
Definition: MSLane.h:1332
void forceVehicleInsertion(MSVehicle *veh, double pos, MSMoveReminder::Notification notification, double posLat=0)
Inserts the given vehicle at the given position.
Definition: MSLane.cpp:940
void add(const MSLane *const l) const
Adds the given object to the container.
Definition: Helper.cpp:56
T MIN2(T a, T b)
Definition: StdDefs.h:67
MSVehicle * getPartialBehind(const MSVehicle *ego) const
Definition: MSLane.cpp:2974
virtual bool isSelected() const
whether this lane is selected in the GUI
Definition: MSLane.h:1021
AnyVehicleIterator anyVehiclesEnd() const
end iterator for iterating over all vehicles touching this lane in downstream direction ...
Definition: MSLane.h:403
AnyVehicleIterator anyVehiclesBegin() const
begin iterator for iterating over all vehicles touching this lane in downstream direction ...
Definition: MSLane.h:398
LinkState getIncomingLinkState() const
get the state of the link from the logical predecessor to this lane
Definition: MSLane.cpp:2336
virtual bool executeMovements(SUMOTime t, std::vector< MSLane *> &lanesWithVehiclesToIntegrate)
Executes planned vehicle movements with regards to right-of-way.
Definition: MSLane.cpp:1507
std::pair< MSVehicle *const, double > getLeader(const MSVehicle *veh, const double vehPos, const std::vector< MSLane *> &bestLaneConts, double dist=-1, bool checkTmpVehicles=false) const
Returns the immediate leader of veh and the distance to veh starting on this lane.
Definition: MSLane.cpp:2042
CollisionAction
Definition: MSLane.h:165
int myRightmostSublane
the index of the rightmost sublane of this lane on myEdge
Definition: MSLane.h:1258
MSLane * myLogicalPredecessorLane
Definition: MSLane.h:1216
Something on a lane to be noticed about vehicle movement.
MSLane * getOpposite() const
return the opposite direction lane for lane changing or 0
Definition: MSLane.cpp:3012
AnyVehicleIterator anyVehiclesUpstreamBegin() const
begin iterator for iterating over all vehicles touching this lane in upstream direction ...
Definition: MSLane.h:408
virtual void swapAfterLaneChange(SUMOTime t)
moves myTmpVehicles int myVehicles after a lane change procedure
Definition: MSLane.cpp:1933
An upper class for objects with additional parameters.
Definition: Parameterised.h:50
double getHCEmissions() const
Returns the sum of last step HC emissions.
Definition: MSLane.cpp:2490
virtual double getChosenSpeedFactor() const =0
std::map< MSEdge *, std::vector< MSLane * > > myApproachingLanes
All direct internal and direct (disregarding internal predecessors) non-internal predecessor lanes of...
Definition: MSLane.h:1235
std::vector< MSVehicle * > VehCont
Container for vehicles.
Definition: MSLane.h:89
static MSLinkCont::const_iterator succLinkSec(const SUMOVehicle &veh, int nRouteSuccs, const MSLane &succLinkSource, const std::vector< MSLane *> &conts)
Definition: MSLane.cpp:1825
Base class for objects which have an id.
Definition: Named.h:54
int myNumericalID
Unique numerical ID (set on reading by netload)
Definition: MSLane.h:1137
std::vector< MSMoveReminder *> myMoveReminders
This lane&#39;s move reminder.
Definition: MSLane.h:1274
VehCont myManeuverReservations
The vehicles which registered maneuvering into the lane within their current action step...
Definition: MSLane.h:1184
virtual double getMaxSpeed() const =0
Returns the vehicle&#39;s maximum speed.
double getRightSideOnEdge() const
Definition: MSLane.h:960
MSLeaderInfo getPartialBeyond() const
get all vehicles that are inlapping from consecutive edges
Definition: MSLane.cpp:2997
void initRestrictions()
initialized vClass-specific speed limits
Definition: MSLane.cpp:200
double getLengthGeometryFactor() const
return shape.length() / myLength
Definition: MSLane.h:444
int getRightmostSublane() const
Definition: MSLane.h:964
MSVehicle * getLastFullVehicle() const
returns the last vehicle for which this lane is responsible or 0
Definition: MSLane.cpp:1779
void sortPartialVehicles()
sorts myPartialVehicles
Definition: MSLane.cpp:1742
void setPermissions(SVCPermissions permissions, long transientID)
Sets the permissions to the given value. If a transientID is given, the permissions are recored as te...
Definition: MSLane.cpp:3119
bool freeInsertion(MSVehicle &veh, double speed, double posLat, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle on any place.
Definition: MSLane.cpp:345
double getElectricityConsumption() const
Returns the sum of last step electricity consumption.
Definition: MSLane.cpp:2514
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
Definition: MSLane.cpp:1639
The vehicle has departed (was inserted into the network)
double getCOEmissions() const
Returns the sum of last step CO emissions.
Definition: MSLane.cpp:2454
std::pair< MSVehicle *const, double > getLeaderOnConsecutive(double dist, double seen, double speed, const MSVehicle &veh, const std::vector< MSLane *> &bestLaneConts) const
Returns the immediate leader and the distance to him.
Definition: MSLane.cpp:2107
int myI1
index for myVehicles
Definition: MSLane.h:146
double getOppositePos(double pos) const
return the corresponding position on the opposite lane
Definition: MSLane.cpp:3021
bool operator()(const IncomingLaneInfo &ili) const
Definition: MSLane.h:1394
static void clear()
Clears the dictionary.
Definition: MSLane.cpp:1662
const MSLane * getFirstInternalInConnection(double &offset) const
Returns 0 if the lane is not internal. Otherwise the first part of the connection (sequence of intern...
Definition: MSLane.cpp:1621
MSEdge *const myEdge
The lane&#39;s edge, for routing only.
Definition: MSLane.h:1198
const MSVehicle * operator->()
Definition: MSLane.h:132
bool detectCollisionBetween(SUMOTime timestep, const std::string &stage, MSVehicle *collider, MSVehicle *victim, std::set< const MSVehicle *, ComparatorIdLess > &toRemove, std::set< const MSVehicle *> &toTeleport) const
detect whether there is a collision between the two vehicles
Definition: MSLane.cpp:1355
const MSLane * myLane
the lane that is being iterated
Definition: MSLane.h:144
A storage for options typed value containers)
Definition: OptionsCont.h:98
double interpolateLanePosToGeometryPos(double lanePos) const
Definition: MSLane.h:455
MSVehicle * getLastAnyVehicle() const
returns the last vehicle that is fully or partially on this lane
Definition: MSLane.cpp:1797
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
Definition: MSLane.h:461
bool isApproachedFrom(MSEdge *const edge)
Definition: MSLane.cpp:1992
double getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
Definition: MSLane.cpp:2526
std::pair< MSVehicle *const, double > getCriticalLeader(double dist, double seen, double speed, const MSVehicle &veh) const
Returns the most dangerous leader and the distance to him.
Definition: MSLane.cpp:2193
AnyVehicleIterator anyVehiclesUpstreamEnd() const
end iterator for iterating over all vehicles touching this lane in upstream direction ...
Definition: MSLane.h:413
const MSLeaderInfo & getFirstVehicleInformation(const MSVehicle *ego, double latOffset, bool onlyFrontOnLane, double maxPos=std::numeric_limits< double >::max(), bool allowCached=true) const
analogue to getLastVehicleInformation but in the upstream direction
Definition: MSLane.cpp:1021
bool allowsVehicleClass(SUMOVehicleClass vclass) const
Definition: MSLane.h:739
MSLane & operator=(const MSLane &)
invalidated assignment operator
const std::set< const MSVehicle * > & getParkingVehicles() const
retrieve the parking vehicles (see GUIParkingArea)
Definition: MSLane.h:1016
void saveState(OutputDevice &out)
Saves the state of this lane into the given stream.
Definition: MSLane.cpp:2734
MSLeaderInfo myLeaderInfo
leaders on all sublanes as seen by approaching vehicles (cached)
Definition: MSLane.h:1238
MSLane * myCanonicalSuccessorLane
Main successor lane,.
Definition: MSLane.h:1222
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
long long int SUMOTime
Definition: TraCIDefs.h:51
double myNettoVehicleLengthSum
The current length of all vehicles on this lane, excluding their minGaps.
Definition: MSLane.h:1228
double getMeanSpeed() const
Returns the mean speed on this lane.
Definition: MSLane.cpp:2426
MSLeaderInfo myFollowerInfo
followers on all sublanes as seen by vehicles on consecutive lanes (cached)
Definition: MSLane.h:1240
virtual ~MSLane()
Destructor.
Definition: MSLane.cpp:192
void addParking(MSVehicle *veh)
add parking vehicle. This should only used during state loading
Definition: MSLane.cpp:2723
The class responsible for building and deletion of vehicles.
double getMissingRearGap(const MSVehicle *leader, double backOffset, double leaderSpeed) const
return by how much further the leader must be inserted to avoid rear end collisions ...
Definition: MSLane.cpp:2016
const double myLengthGeometryFactor
precomputed myShape.length / myLength
Definition: MSLane.h:1250
MSLeaderInfo myLeaderInfoTmp
Definition: MSLane.h:1242
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
Definition: MSLane.cpp:1874
VehCont myVehBuffer
Buffer for vehicles that moved from their previous lane onto this one. Integrated after all vehicles ...
Definition: MSLane.h:1176
double getDepartPosLat(const MSVehicle &veh)
Definition: MSLane.cpp:460
static const long CHANGE_PERMISSIONS_PERMANENT
Definition: MSLane.h:1073
MSLeaderDistanceInfo getFollowersOnConsecutive(const MSVehicle *ego, double backOffset, bool allSublanes, double searchDist=-1, bool ignoreMinorLinks=false) const
return the sublane followers with the largest missing rear gap among all predecessor lanes (within di...
Definition: MSLane.cpp:2759
AnyVehicleIterator(const MSLane *lane, int i1, int i2, const int i1End, const int i2End, bool downstream=true)
Definition: MSLane.h:105
bool empty() const
Returns true if there is not a single vehicle on the lane.
Definition: MSLane.h:589
SUMOTime myFollowerInfoTime
time step for which myFollowerInfo was last updated
Definition: MSLane.h:1247
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
Definition: MSLane.h:419
void handleCollisionBetween(SUMOTime timestep, const std::string &stage, MSVehicle *collider, MSVehicle *victim, double gap, double latGap, std::set< const MSVehicle *, ComparatorIdLess > &toRemove, std::set< const MSVehicle *> &toTeleport) const
take action upon collision
Definition: MSLane.cpp:1418
double myMaxSpeed
Lane-wide speedlimit [m/s].
Definition: MSLane.h:1201
double getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)...
Definition: MSLane.cpp:2398
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
double getWaitingSeconds() const
Returns the overall waiting time on this lane.
Definition: MSLane.cpp:2413
const double myWidth
Lane width [m].
Definition: MSLane.h:1195
edge_finder(MSEdge *e)
Definition: MSLane.h:1393
void setRightSideOnEdge(double value, int rightmostSublane)
Definition: MSLane.h:952
bool isAccelLane() const
return whether this lane is an acceleration lane
Definition: MSLane.h:449
virtual void incorporateVehicle(MSVehicle *veh, double pos, double speed, double posLat, const MSLane::VehCont::iterator &at, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Inserts the vehicle into this lane, and informs it about entering the network.
Definition: MSLane.cpp:290
virtual bool appropriate(const MSVehicle *veh)
Definition: MSLane.cpp:1697
virtual void planMovements(const SUMOTime t)
Compute safe velocities for all vehicles based on positions and speeds from the last time step...
Definition: MSLane.cpp:1073
MSLane * getParallelLane(int offset) const
Returns the lane with the given offset parallel to this one or 0 if it does not exist.
Definition: MSLane.cpp:1962
vehicle_position_sorter(const MSLane *lane)
Constructor.
Definition: MSLane.h:1289
vehicle_natural_position_sorter(const MSLane *lane)
Constructor.
Definition: MSLane.h:1312
double getDepartSpeed(const MSVehicle &veh, bool &patchSpeed)
Definition: MSLane.cpp:433