Eclipse SUMO - Simulation of Urban MObility
MSVehicle.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
24 // Representation of a vehicle in the micro simulation
25 /****************************************************************************/
26 #ifndef MSVehicle_h
27 #define MSVehicle_h
28 
29 
30 // ===========================================================================
31 // included modules
32 // ===========================================================================
33 #include <config.h>
34 
35 #include <list>
36 #include <deque>
37 #include <map>
38 #include <set>
39 #include <string>
40 #include <vector>
41 #include <memory>
42 #include "MSGlobals.h"
43 #include "MSVehicleType.h"
44 #include "MSBaseVehicle.h"
45 #include "MSLink.h"
46 #include "MSLane.h"
47 #include "MSNet.h"
48 
49 #define INVALID_SPEED 299792458 + 1 // nothing can go faster than the speed of light! Refs. #2577
50 
51 // ===========================================================================
52 // class declarations
53 // ===========================================================================
54 class SUMOSAXAttributes;
55 class MSMoveReminder;
56 class MSLaneChanger;
57 class MSVehicleTransfer;
59 class MSStoppingPlace;
60 class MSChargingStation;
61 class MSParkingArea;
62 class MSPerson;
63 class MSDevice;
65 class OutputDevice;
66 class Position;
67 class MSContainer;
68 class MSJunction;
69 class MSLeaderInfo;
72 
73 // ===========================================================================
74 // class definitions
75 // ===========================================================================
80 class MSVehicle : public MSBaseVehicle {
81 public:
82 
84  friend class MSLaneChanger;
85  friend class MSLaneChangerSublane;
86 
90  class State {
92  friend class MSVehicle;
93  friend class MSLaneChanger;
94  friend class MSLaneChangerSublane;
95 
96  public:
98  State(double pos, double speed, double posLat, double backPos);
99 
101  State(const State& state);
102 
104  State& operator=(const State& state);
105 
107  bool operator!=(const State& state);
108 
110  double pos() const {
111  return myPos;
112  }
113 
115  double speed() const {
116  return mySpeed;
117  };
118 
120  double posLat() const {
121  return myPosLat;
122  }
123 
125  double backPos() const {
126  return myBackPos;
127  }
128 
130  double lastCoveredDist() const {
131  return myLastCoveredDist;
132  }
133 
134 
135  private:
137  double myPos;
138 
140  double mySpeed;
141 
143  double myPosLat;
144 
146  // if the vehicle occupies multiple lanes, this is the position relative
147  // to the lane occupied by its back
148  double myBackPos;
149 
152 
158 
159  };
160 
161 
166  friend class MSVehicle;
167 
168  typedef std::list<std::pair<SUMOTime, SUMOTime> > waitingIntervalList;
169 
170  public:
173 
176 
179 
181  bool operator!=(const WaitingTimeCollector& wt) const;
182 
185 
186  // return the waiting time within the last memory millisecs
187  SUMOTime cumulatedWaitingTime(SUMOTime memory = -1) const;
188 
189  // process time passing for dt millisecs
190  void passTime(SUMOTime dt, bool waiting);
191 
192  // maximal memory time stored
194  return myMemorySize;
195  }
196 
197  // maximal memory time stored
198  const waitingIntervalList& getWaitingIntervals() const {
199  return myWaitingIntervals;
200  }
201 
202  private:
205 
209  waitingIntervalList myWaitingIntervals;
210 
212  void appendWaitingTime(SUMOTime dt);
213  };
214 
215 
228  };
229 
237  MSVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
238  MSVehicleType* type, const double speedFactor);
239 
241  virtual ~MSVehicle();
242 
243 
245 
246 
256 
257 
258 
260 
261 
265  bool hasArrived() const;
266 
277  bool replaceRoute(const MSRoute* route, const std::string& info, bool onInit = false, int offset = 0, bool addStops = true, bool removeStops = true);
278 
279 
280  int getRoutePosition() const;
281  void resetRoutePosition(int index, DepartLaneDefinition departLaneProcedure);
282 
291 
292 
294 
295 
313  void workOnMoveReminders(double oldPos, double newPos, double newSpeed);
315 
316 
322  bool checkActionStep(const SUMOTime t);
323 
329  void resetActionOffset(const SUMOTime timeUntilNextAction = 0);
330 
331 
341  void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength);
342 
343 
361  void planMove(const SUMOTime t, const MSLeaderInfo& ahead, const double lengthsInFront);
362 
365  void setApproachingForAllLinks(const SUMOTime t);
366 
367 
380  bool executeMove();
381 
388  double getDeltaPos(const double accel) const;
389 
390 
392 
393 
397  double getPositionOnLane() const {
398  return myState.myPos;
399  }
400 
404  double getLastStepDist() const {
405  return myState.lastCoveredDist();
406  }
407 
411  double getPositionOnLane(const MSLane* lane) const;
412 
421  double getBackPositionOnLane(const MSLane* lane) const;
422 
426  double getBackPositionOnLane() const {
428  }
429 
434  double getLateralPositionOnLane() const {
435  return myState.myPosLat;
436  }
437 
442  double getRightSideOnLane() const;
443 
447  double lateralDistanceToLane(const int offset) const;
448 
450  double getLateralOverlap() const;
451  double getLateralOverlap(double posLat) const;
452 
458  double getRightSideOnEdge(const MSLane* lane = 0) const;
459 
465  double getCenterOnEdge(const MSLane* lane = 0) const;
466 
472  double getLatOffset(const MSLane* lane) const;
473 
477  double getSpeed() const {
478  return myState.mySpeed;
479  }
480 
481 
485  double getPreviousSpeed() const {
486  return myState.myPreviousSpeed;
487  }
488 
489 
494  double getAcceleration() const {
495  return myAcceleration;
496  }
497 
499  double getCurrentApparentDecel() const;
500 
506  return myType->getActionStepLength();
507  }
508 
513  double getActionStepLengthSecs() const {
515  }
516 
517 
522  return myLastActionTime;
523  }
524 
526 
527 
528 
530 
531 
535  double getSlope() const;
536 
537 
545  Position getPosition(const double offset = 0) const;
546 
547 
555  Position getPositionAlongBestLanes(double offset) const;
556 
557 
561  MSLane* getLane() const {
562  return myLane;
563  }
564 
565 
570  double
572  if (myLane != 0) {
573  return myLane->getVehicleMaxSpeed(this);
574  } else {
575  return myType->getMaxSpeed();
576  }
577  }
578 
579 
583  inline bool isOnRoad() const {
584  return myAmOnNet;
585  }
586 
587 
591  inline bool isActive() const {
592  return myActionStep;
593  }
594 
598  inline bool isActionStep(SUMOTime t) const {
599  return (t - myLastActionTime) % getActionStepLength() == 0;
600 // return t%getActionStepLength() == 0; // synchronized actions for all vehicles with identical actionsteplengths
601  }
602 
603 
607  bool isFrontOnLane(const MSLane* lane) const;
608 
609 
616  const MSEdge* getRerouteOrigin() const;
617 
618 
626  return myWaitingTime;
627  }
628 
639  return TIME2STEPS(myTimeLoss);
640  }
641 
642 
649  }
650 
657  double getWaitingSeconds() const {
658  return STEPS2TIME(myWaitingTime);
659  }
660 
661 
669  }
670 
673  double getTimeLossSeconds() const {
674  return myTimeLoss;
675  }
676 
677 
681  double getAngle() const {
682  return myAngle;
683  }
684 
685 
690  return Position(std::cos(myAngle) * myState.speed(), std::sin(myAngle) * myState.speed());
691  }
693 
695  double computeAngle() const;
696 
698  void setAngle(double angle, bool straightenFurther = false);
699 
706  void setActionStepLength(double actionStepLength, bool resetActionOffset = true);
707 
709  static bool overlap(const MSVehicle* veh1, const MSVehicle* veh2) {
710  if (veh1->myState.myPos < veh2->myState.myPos) {
711  return veh2->myState.myPos - veh2->getVehicleType().getLengthWithGap() < veh1->myState.myPos;
712  }
713  return veh1->myState.myPos - veh1->getVehicleType().getLengthWithGap() < veh2->myState.myPos;
714  }
715 
718  bool congested() const {
719  return myState.mySpeed < double(60) / double(3.6);
720  }
721 
722 
734  void activateReminders(const MSMoveReminder::Notification reason, const MSLane* enteredLane = 0);
735 
742  bool enterLaneAtMove(MSLane* enteredLane, bool onTeleporting = false);
743 
744 
745 
754  void enterLaneAtInsertion(MSLane* enteredLane, double pos, double speed, double posLat,
755  MSMoveReminder::Notification notification);
756 
761  void setTentativeLaneAndPosition(MSLane* lane, double pos, double posLat = 0);
762 
767  void enterLaneAtLaneChange(MSLane* enteredLane);
768 
769 
771  void leaveLane(const MSMoveReminder::Notification reason, const MSLane* approachedLane = 0);
772 
779  void updateDriveItems();
780 
784  const std::pair<double, LinkDirection>& getNextTurn() {
785  return myNextTurn;
786  }
787 
788 
791 
792  const std::vector<MSLane*>& getFurtherLanes() const {
793  return myFurtherLanes;
794  }
795 
796  const std::vector<double>& getFurtherLanesPosLat() const {
797  return myFurtherLanesPosLat;
798  }
799 
800 
802  bool onFurtherEdge(const MSEdge* edge) const;
803 
806 
807  //
811  struct LaneQ {
815  double length;
819  double occupation;
826  /* @brief Longest sequence of (normal-edge) lanes that can be followed without a lane change
827  * The 'length' attribute is the sum of these lane lengths
828  * (There may be alternative sequences that have equal length)
829  * It is the 'best' in the strategic sense of reducing required lane-changes
830  */
831  std::vector<MSLane*> bestContinuations;
832  };
833 
837  const std::vector<LaneQ>& getBestLanes() const;
838 
856  void updateBestLanes(bool forceRebuild = false, const MSLane* startLane = 0);
857 
858 
862  const std::vector<MSLane*>& getBestLanesContinuation() const;
863 
864 
868  const std::vector<MSLane*>& getBestLanesContinuation(const MSLane* const l) const;
869 
870  /* @brief returns the current signed offset from the lane that is most
871  * suited for continuing the current route (in the strategic sense of reducing lane-changes)
872  * - 0 if the vehicle is one it's best lane
873  * - negative if the vehicle should change to the right
874  * - positive if the vehicle should change to the left
875  */
876  int getBestLaneOffset() const;
877 
879  void adaptBestLanesOccupation(int laneIndex, double density);
880 
882 
884  void fixPosition();
885 
886 
894  inline const MSCFModel& getCarFollowModel() const {
895  return myType->getCarFollowModel();
896  }
897 
904  std::shared_ptr<MSSimpleDriverState> getDriverState() const;
905 
906 
912  return myCFVariables;
913  }
914 
916 
917 
921  class Stop {
922  public:
923  Stop(const SUMOVehicleParameter::Stop& par) : pars(par) {}
927  const MSLane* lane;
941  bool triggered;
945  bool reached;
955  bool collision;
956 
958  void write(OutputDevice& dev) const;
959 
961  double getEndPos(const SUMOVehicle& veh) const;
962 
964  std::string getDescription() const;
965  private:
967  Stop& operator=(const Stop& src);
968 
969  };
970 
971 
978  bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0, bool collision = false,
979  MSRouteIterator* searchStart = 0);
980 
983  bool replaceParkingArea(MSParkingArea* parkingArea, std::string& errorMsg);
984 
988 
991 
995  bool hasStops() const {
996  return !myStops.empty();
997  }
998 
1001  inline bool hasDriverState() const {
1002  return myDriverState != nullptr;
1003  }
1004 
1008  bool isStopped() const;
1009 
1012 
1014  bool stopsAt(MSStoppingPlace* stop) const;
1015 
1018  bool willStop() const;
1019 
1021  bool isStoppedOnLane() const;
1022 
1024  bool keepStopping(bool afterProcessing = false) const;
1025 
1029  SUMOTime collisionStopTime() const;
1030 
1034  bool isParking() const;
1035 
1039  bool isRemoteControlled() const;
1040 
1044  bool wasRemoteControlled(SUMOTime lookBack = DELTA_T) const;
1045 
1047  double nextStopDist() const {
1048  return myStopDist;
1049  }
1050 
1054  bool isStoppedTriggered() const;
1055 
1058  bool isStoppedInRange(const double pos, const double tolerance) const;
1060 
1061  int getLaneIndex() const;
1062 
1072  double getDistanceToPosition(double destPos, const MSEdge* destEdge) const;
1073 
1074 
1082  double processNextStop(double currentVelocity);
1083 
1091  std::pair<const MSVehicle* const, double> getLeader(double dist = 0) const;
1092 
1099  double getTimeGapOnLane() const;
1100 
1102 
1103 
1107  double getCO2Emissions() const;
1108 
1109 
1113  double getCOEmissions() const;
1114 
1115 
1119  double getHCEmissions() const;
1120 
1121 
1125  double getNOxEmissions() const;
1126 
1127 
1131  double getPMxEmissions() const;
1132 
1133 
1137  double getFuelConsumption() const;
1138 
1139 
1143  double getElectricityConsumption() const;
1144 
1145 
1149  double getHarmonoise_NoiseEmissions() const;
1151 
1152 
1153 
1155 
1156 
1160  void addPerson(MSTransportable* person);
1161 
1163 
1164 
1168  void addContainer(MSTransportable* container);
1169 
1172 
1176  enum Signalling {
1207  };
1208 
1209 
1215  LC_NEVER = 0, // lcModel shall never trigger changes at this level
1216  LC_NOCONFLICT = 1, // lcModel may trigger changes if not in conflict with TraCI request
1217  LC_ALWAYS = 2 // lcModel may always trigger changes of this level regardless of requests
1218  };
1219 
1220 
1223  LCP_ALWAYS = 0, // change regardless of blockers, adapt own speed and speed of blockers
1224  LCP_NOOVERLAP = 1, // change unless overlapping with blockers, adapt own speed and speed of blockers
1225  LCP_URGENT = 2, // change if not blocked, adapt own speed and speed of blockers
1226  LCP_OPPORTUNISTIC = 3 // change if not blocked
1227  };
1228 
1229 
1233  void switchOnSignal(int signal) {
1234  mySignals |= signal;
1235  }
1236 
1237 
1241  void switchOffSignal(int signal) {
1242  mySignals &= ~signal;
1243  }
1244 
1245 
1249  int getSignals() const {
1250  return mySignals;
1251  }
1252 
1253 
1258  bool signalSet(int which) const {
1259  return (mySignals & which) != 0;
1260  }
1262 
1263 
1265  bool unsafeLinkAhead(const MSLane* lane) const;
1266 
1268  bool passingMinor() const;
1269 
1270 
1271 
1279  double getSpeedWithoutTraciInfluence() const;
1280 
1285  bool rerouteParkingArea(const std::string& parkingAreaID, std::string& errorMsg);
1286 
1299  bool addTraciStop(MSLane* const lane, const double startPos, const double endPos, const SUMOTime duration, const SUMOTime until,
1300  const bool parking, const bool triggered, const bool containerTriggered, std::string& errorMsg);
1301 
1313  bool addTraciStopAtStoppingPlace(const std::string& stopId, const SUMOTime duration, const SUMOTime until, const bool parking,
1314  const bool triggered, const bool containerTriggered, const SumoXMLTag stoppingPlaceType, std::string& errorMsg);
1315 
1320  Stop& getNextStop();
1321 
1326  std::list<Stop> getMyStops();
1327 
1332  bool resumeFromStopping();
1333 
1334 
1336  double updateFurtherLanes(std::vector<MSLane*>& furtherLanes,
1337  std::vector<double>& furtherLanesPosLat,
1338  const std::vector<MSLane*>& passedLanes);
1339 
1342 
1345 
1358  class Influencer {
1359  private:
1360 
1370  void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& info = "");
1371  };
1372 
1373 
1376  GapControlState();
1377  virtual ~GapControlState();
1379  static void init();
1381  static void cleanup();
1383  void activate(double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel, const MSVehicle* refVeh);
1385  void deactivate();
1387  double tauOriginal;
1389  double tauCurrent;
1391  double tauTarget;
1400  double changeRate;
1402  double maxDecel;
1406  bool active;
1414  double timeHeadwayIncrement, spaceHeadwayIncrement;
1415 
1417  static std::map<const MSVehicle*, GapControlState*> refVehMap;
1418 
1419  private:
1421  };
1422  public:
1424  Influencer();
1425 
1427  ~Influencer();
1428 
1430  static void init();
1432  static void cleanup();
1433 
1437  void setSpeedTimeLine(const std::vector<std::pair<SUMOTime, double> >& speedTimeLine);
1438 
1441  void activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, MSVehicle* refVeh = nullptr);
1442 
1445  void deactivateGapController();
1446 
1450  void setLaneTimeLine(const std::vector<std::pair<SUMOTime, int> >& laneTimeLine);
1451 
1455  void adaptLaneTimeLine(int indexShift);
1456 
1460  void setSublaneChange(double latDist);
1461 
1463  int getSpeedMode() const;
1464 
1466  int getLaneChangeMode() const;
1467 
1469  int getRoutingMode() const {
1470  return myRoutingMode;
1471  }
1472  SUMOTime getLaneTimeLineDuration();
1473 
1474  SUMOTime getLaneTimeLineEnd();
1475 
1487  double influenceSpeed(SUMOTime currentTime, double speed, double vSafe, double vMin, double vMax);
1488 
1501  double gapControlSpeed(SUMOTime currentTime, const SUMOVehicle* veh, double speed, double vSafe, double vMin, double vMax);
1502 
1510  int influenceChangeDecision(const SUMOTime currentTime, const MSEdge& currentEdge, const int currentLaneIndex, int state);
1511 
1512 
1518  double changeRequestRemainingSeconds(const SUMOTime currentTime) const;
1519 
1523  inline bool getRespectJunctionPriority() const {
1524  return myRespectJunctionPriority;
1525  }
1526 
1527 
1531  inline bool getEmergencyBrakeRedLight() const {
1532  return myEmergencyBrakeRedLight;
1533  }
1534 
1535 
1537  bool considerSafeVelocity() const {
1538  return myConsiderSafeVelocity;
1539  }
1540 
1544  void setSpeedMode(int speedMode);
1545 
1549  void setLaneChangeMode(int value);
1550 
1554  void setRoutingMode(int value) {
1555  myRoutingMode = value;
1556  }
1557 
1561  double getOriginalSpeed() const;
1562 
1563  void setRemoteControlled(Position xyPos, MSLane* l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector& route, SUMOTime t);
1564 
1566  return myLastRemoteAccess;
1567  }
1568 
1569  void postProcessRemoteControl(MSVehicle* v);
1570 
1572  double implicitSpeedRemote(const MSVehicle* veh, double oldSpeed);
1573 
1575  double implicitDeltaPosRemote(const MSVehicle* veh);
1576 
1577  bool isRemoteControlled() const;
1578 
1579  bool isRemoteAffected(SUMOTime t) const;
1580 
1581  void setSignals(int signals) {
1582  myTraCISignals = signals;
1583  }
1584 
1585  int getSignals() const {
1586  return myTraCISignals;
1587  }
1588 
1589  double getLatDist() const {
1590  return myLatDist;
1591  }
1592 
1593  void resetLatDist() {
1594  myLatDist = 0.;
1595  }
1596 
1597  bool ignoreOverlap() const {
1598  return myTraciLaneChangePriority == LCP_ALWAYS;
1599  }
1600 
1601  SUMOAbstractRouter<MSEdge, SUMOVehicle>& getRouterTT() const;
1602 
1603  private:
1605  std::vector<std::pair<SUMOTime, double> > mySpeedTimeLine;
1606 
1608  std::vector<std::pair<SUMOTime, int> > myLaneTimeLine;
1609 
1611  std::shared_ptr<GapControlState> myGapControlState;
1612 
1615 
1617  double myLatDist;
1618 
1621 
1624 
1627 
1630 
1633 
1636 
1639  double myRemotePos;
1645 
1647 
1648  LaneChangeMode myStrategicLC;
1659  TraciLaneChangePriority myTraciLaneChangePriority;
1661 
1662  // @brief the signals set via TraCI
1664 
1667 
1668  };
1669 
1670 
1677 
1678  const Influencer* getInfluencer() const;
1679 
1680  bool hasInfluencer() const {
1681  return myInfluencer != nullptr;
1682  }
1683 
1685  int influenceChangeDecision(int state);
1686 
1688  void setRemoteState(Position xyPos);
1689 
1691  double basePos(const MSEdge* edge) const;
1692 
1694  double getSafeFollowSpeed(const std::pair<const MSVehicle*, double> leaderInfo,
1695  const double seen, const MSLane* const lane, double distToCrossing) const;
1696 
1698  static int nextLinkPriority(const std::vector<MSLane*>& conts);
1699 
1701  bool isLeader(const MSLink* link, const MSVehicle* veh) const;
1702 
1703  // @brief get the position of the back bumper;
1704  const Position getBackPosition() const;
1705 
1707 
1708 
1710  void saveState(OutputDevice& out);
1711 
1714  void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset);
1716 
1717 protected:
1718 
1719  double getSpaceTillLastStanding(const MSLane* l, bool& foundStopped) const;
1720 
1723 
1739  void adaptLaneEntering2MoveReminder(const MSLane& enteredLane);
1741 
1742 
1750  void processLinkApproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist);
1751 
1752 
1761  void processLaneAdvances(std::vector<MSLane*>& passedLanes, bool& moved, std::string& emergencyReason);
1762 
1763 
1771  double processTraCISpeedControl(double vSafe, double vNext);
1772 
1773 
1780  void removePassedDriveItems();
1781 
1784  void updateWaitingTime(double vNext);
1785 
1788  void updateTimeLoss(double vNext);
1789 
1791  bool canReverse(double speedThreshold = SUMO_const_haltingSpeed) const;
1792 
1795  void setBrakingSignals(double vNext) ;
1796 
1799  void setBlinkerInformation();
1800 
1803  void setEmergencyBlueLight(SUMOTime currentTime);
1804 
1806  void updateOccupancyAndCurrentBestLane(const MSLane* startLane);
1807 
1811  const ConstMSEdgeVector getStopEdges(double& firstPos, double& lastPos) const;
1812 
1814  std::vector<std::pair<int, double> > getStopIndices() const;
1815 
1817  double getBrakeGap() const;
1818 
1820  Position validatePosition(Position result, double offset = 0) const;
1821 
1823  virtual void drawOutsideNetwork(bool /*add*/) {};
1824 
1828 
1830  double myTimeLoss;
1831 
1834 
1837 
1843 
1844 
1845 
1848 
1850 
1853 
1854  /* @brief Complex data structure for keeping and updating LaneQ:
1855  * Each element of the outer vector corresponds to an upcoming edge on the vehicles route
1856  * The first element corresponds to the current edge and is returned in getBestLanes()
1857  * The other elements are only used as a temporary structure in updateBestLanes();
1858  */
1859  std::vector<std::vector<LaneQ> > myBestLanes;
1860 
1861  /* @brief iterator to speed up retrieval of the current lane's LaneQ in getBestLaneOffset() and getBestLanesContinuation()
1862  * This is updated in updateOccupancyAndCurrentBestLane()
1863  */
1864  std::vector<LaneQ>::iterator myCurrentLaneInBestLanes;
1865 
1866  static std::vector<MSLane*> myEmptyLaneVector;
1867 
1869  std::list<Stop> myStops;
1870 
1873 
1876  std::pair<double, LinkDirection> myNextTurn;
1877 
1879  std::vector<MSLane*> myFurtherLanes;
1881  std::vector<double> myFurtherLanesPosLat;
1882 
1885 
1888 
1891 
1894 
1896 
1898  double myAngle;
1899 
1901  double myStopDist;
1902 
1905 
1907 
1912 
1913 protected:
1914 
1920  double myVLinkPass;
1921  double myVLinkWait;
1927  double myDistance;
1928  double accelV;
1931 
1932  DriveProcessItem(MSLink* link, double vPass, double vWait, bool setRequest,
1933  SUMOTime arrivalTime, double arrivalSpeed,
1934  SUMOTime arrivalTimeBraking, double arrivalSpeedBraking,
1935  double distance,
1936  double leaveSpeed = -1.) :
1937  myLink(link), myVLinkPass(vPass), myVLinkWait(vWait), mySetRequest(setRequest),
1938  myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed),
1939  myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking),
1940  myDistance(distance),
1941  accelV(leaveSpeed), hadStoppedVehicle(false), availableSpace(0) {
1942  assert(vWait >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
1943  assert(vPass >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
1944  };
1945 
1946 
1948  DriveProcessItem(double vWait, double distance, double _availableSpace = 0) :
1949  myLink(0), myVLinkPass(vWait), myVLinkWait(vWait), mySetRequest(false),
1950  myArrivalTime(0), myArrivalSpeed(0),
1951  myArrivalTimeBraking(0), myArrivalSpeedBraking(0),
1952  myDistance(distance),
1953  accelV(-1), hadStoppedVehicle(false), availableSpace(_availableSpace) {
1954  assert(vWait >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
1955  };
1956 
1957 
1958  inline void adaptLeaveSpeed(const double v) {
1959  if (accelV < 0) {
1960  accelV = v;
1961  } else {
1962  accelV = MIN2(accelV, v);
1963  }
1964  }
1965  inline double getLeaveSpeed() const {
1966  return accelV < 0 ? myVLinkPass : accelV;
1967  }
1968  };
1969 
1971  // TODO: Consider making LFLinkLanes a std::deque for efficient front removal (needs refactoring in checkRewindLinkLanes()...)
1972  typedef std::vector< DriveProcessItem > DriveItemVector;
1973 
1975  DriveItemVector myLFLinkLanes;
1976 
1978  DriveItemVector myLFLinkLanesPrev;
1979 
1985  DriveItemVector::iterator myNextDriveItem;
1986 
1988  void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector& lfLinks, double& myStopDist, std::pair<double, LinkDirection>& myNextTurn) const;
1989 
1991  void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector& lfLinks) const;
1992 
1994  void removeApproachingInformation(const DriveItemVector& lfLinks) const;
1995 
1996 
1998  inline double estimateLeaveSpeed(const MSLink* const link, const double vLinkPass) const {
1999  // estimate leave speed for passing time computation
2000  // l=linkLength, a=accel, t=continuousTime, v=vLeave
2001  // l=v*t + 0.5*a*t^2, solve for t and multiply with a, then add v
2002  return MIN2(link->getViaLaneOrLane()->getVehicleMaxSpeed(this),
2004  }
2005 
2006 
2007  /* @brief adapt safe velocity in accordance to a moving obstacle:
2008  * - a leader vehicle
2009  * - a vehicle or pedestrian that crosses this vehicles path on an upcoming intersection
2010  * @param[in] leaderInfo The leading vehicle and the (virtual) distance to it
2011  * @param[in] seen the distance to the end of the current lane
2012  * @param[in] lastLink the lastLink index
2013  * @param[in] lane The current Lane the vehicle is on
2014  * @param[in,out] the safe velocity for driving
2015  * @param[in,out] the safe velocity for arriving at the next link
2016  * @param[in] distToCrossing The distance to the crossing point with the current leader where relevant or -1
2017  */
2018  void adaptToLeader(const std::pair<const MSVehicle*, double> leaderInfo,
2019  const double seen, DriveProcessItem* const lastLink,
2020  const MSLane* const lane, double& v, double& vLinkPass,
2021  double distToCrossing = -1) const;
2022 
2023  /* @brief adapt safe velocity in accordance to multiple vehicles ahead:
2024  * @param[in] ahead The leader information according to the current lateral-resolution
2025  * @param[in] latOffset the lateral offset for locating the ego vehicle on the given lane
2026  * @param[in] seen the distance to the end of the current lane
2027  * @param[in] lastLink the lastLink index
2028  * @param[in] lane The current Lane the vehicle is on
2029  * @param[in,out] the safe velocity for driving
2030  * @param[in,out] the safe velocity for arriving at the next link
2031  */
2032  void adaptToLeaders(const MSLeaderInfo& ahead,
2033  double latOffset,
2034  const double seen, DriveProcessItem* const lastLink,
2035  const MSLane* const lane, double& v, double& vLinkPass) const;
2036 
2038  void checkLinkLeader(const MSLink* link, const MSLane* lane, double seen,
2039  DriveProcessItem* const lastLink, double& v, double& vLinkPass, double& vLinkWait, bool& setRequest,
2040  bool isShadowLink = false) const;
2041 
2043  void checkLinkLeaderCurrentAndParallel(const MSLink* link, const MSLane* lane, double seen,
2044  DriveProcessItem* const lastLink, double& v, double& vLinkPass, double& vLinkWait, bool& setRequest) const;
2045 
2046 
2047  // @brief return the lane on which the back of this vehicle resides
2048  const MSLane* getBackLane() const;
2049 
2057  void updateState(double vNext);
2058 
2059 
2061  bool keepClear(const MSLink* link) const;
2062 
2064  bool ignoreRed(const MSLink* link, bool canBrake) const;
2065 
2066 
2068  bool haveValidStopEdges() const;
2069 
2070 private:
2071  /* @brief The vehicle's knowledge about edge efforts/travel times; @see MSEdgeWeightsStorage
2072  * @note member is initialized on first access */
2074 
2077 
2080 
2081 private:
2083  MSVehicle();
2084 
2086  MSVehicle(const MSVehicle&);
2087 
2089  MSVehicle& operator=(const MSVehicle&);
2090 
2092 
2093 };
2094 
2095 
2096 #endif
2097 
2098 /****************************************************************************/
2099 
double myPos
the stored position
Definition: MSVehicle.h:137
int getRoutePosition() const
Definition: MSVehicle.cpp:1180
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
Definition: MSVehicle.h:1523
void adaptToLeader(const std::pair< const MSVehicle *, double > leaderInfo, const double seen, DriveProcessItem *const lastLink, const MSLane *const lane, double &v, double &vLinkPass, double distToCrossing=-1) const
Definition: MSVehicle.cpp:2726
double myLatDist
The requested lateral change.
Definition: MSVehicle.h:1617
A lane area vehicles can halt at.
Definition: MSParkingArea.h:59
SUMOTime myJunctionConflictEntryTime
Definition: MSVehicle.h:1911
void adaptToLeaders(const MSLeaderInfo &ahead, double latOffset, const double seen, DriveProcessItem *const lastLink, const MSLane *const lane, double &v, double &vLinkPass) const
Definition: MSVehicle.cpp:2677
const MSLane * myLastBestLanesInternalLane
Definition: MSVehicle.h:1852
Drive process items represent bounds on the safe velocity corresponding to the upcoming links...
Definition: MSVehicle.h:1918
double getLengthWithGap() const
Get vehicle&#39;s length including the minimum gap [m].
double computeAngle() const
compute the current vehicle angle
Definition: MSVehicle.cpp:1450
DriveItemVector myLFLinkLanesPrev
planned speeds from the previous step for un-registering from junctions after the new container is fi...
Definition: MSVehicle.h:1978
double getFuelConsumption() const
Returns fuel consumption of the current state.
Definition: MSVehicle.cpp:5130
double getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs...
Definition: MSVehicle.h:667
int getSignals() const
Definition: MSVehicle.h:1585
SumoXMLTag
Numbers representing SUMO-XML - element names.
double getNOxEmissions() const
Returns NOx emission of the current state.
Definition: MSVehicle.cpp:5118
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Definition: MSVehicle.cpp:4395
bool ignoreRed(const MSLink *link, bool canBrake) const
decide whether a red (or yellow light) may be ignore
Definition: MSVehicle.cpp:5884
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
Definition: MSVehicle.h:168
double myAngle
the angle in radians (
Definition: MSVehicle.h:1898
double maxDecel
Maximal deceleration to be applied due to the adapted headway.
Definition: MSVehicle.h:1402
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
long long int SUMOTime
Definition: SUMOTime.h:35
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle&#39;s car following model variables.
Definition: MSVehicle.h:911
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:567
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
Definition: MSVehicle.cpp:5860
double getElectricityConsumption() const
Returns electricity consumption of the current state.
Definition: MSVehicle.cpp:5136
double getPreviousSpeed() const
Returns the vehicle&#39;s speed before the previous time step.
Definition: MSVehicle.h:485
double backPos() const
back Position of this state
Definition: MSVehicle.h:125
double getAngle() const
Returns the vehicle&#39;s direction in radians.
Definition: MSVehicle.h:681
static GapControlVehStateListener vehStateListener
Definition: MSVehicle.h:1420
MSEdgeWeightsStorage * myEdgeWeights
Definition: MSVehicle.h:2073
PositionVector getBoundingPoly() const
get bounding polygon
Definition: MSVehicle.cpp:5503
static int nextLinkPriority(const std::vector< MSLane *> &conts)
get a numerical value for the priority of the upcoming link
Definition: MSVehicle.cpp:4949
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:625
const MSEdge * myLastBestLanesEdge
Definition: MSVehicle.h:1851
A static instance of this class in GapControlState deactivates gap control for vehicles whose referen...
Definition: MSVehicle.h:1363
LaneChangeMode
modes for resolving conflicts between external control (traci) and vehicle control over lane changing...
Definition: MSVehicle.h:1214
void enterLaneAtInsertion(MSLane *enteredLane, double pos, double speed, double posLat, MSMoveReminder::Notification notification)
Update when the vehicle enters a new lane in the emit step.
Definition: MSVehicle.cpp:4499
MSAbstractLaneChangeModel * myLaneChangeModel
Definition: MSVehicle.h:1849
bool myAmOnNet
Whether the vehicle is on the network (not parking, teleported, vaporized, or arrived) ...
Definition: MSVehicle.h:1887
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:657
LaneChangeMode myRightDriveLC
changing to the rightmost lane
Definition: MSVehicle.h:1655
std::vector< std::vector< LaneQ > > myBestLanes
Definition: MSVehicle.h:1859
std::vector< MSLane * > myFurtherLanes
The information into which lanes the vehicle laps into.
Definition: MSVehicle.h:1879
double getCurrentApparentDecel() const
get apparent deceleration based on vType parameters and current acceleration
Definition: MSVehicle.cpp:6135
Position getVelocityVector() const
Returns the vehicle&#39;s direction in radians.
Definition: MSVehicle.h:689
State myState
This Vehicles driving state (pos and speed)
Definition: MSVehicle.h:1833
bool haveValidStopEdges() const
check whether all stop.edge MSRouteIterators are valid and in order
Definition: MSVehicle.cpp:6081
double myOriginalSpeed
The velocity before influence.
Definition: MSVehicle.h:1614
Stop & getNextStop()
Definition: MSVehicle.cpp:5807
A lane area vehicles can halt at.
bool replaceParkingArea(MSParkingArea *parkingArea, std::string &errorMsg)
replace the current parking area stop with a new stop with merge duration
Definition: MSVehicle.cpp:1690
DriveItemVector myLFLinkLanes
container for the planned speeds in the current step
Definition: MSVehicle.h:1975
bool resumeFromStopping()
Definition: MSVehicle.cpp:5756
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition) ...
Definition: MSVehicle.h:1890
MSLane * getLane() const
Returns the lane the vehicle is on.
Definition: MSVehicle.h:561
int bestLaneOffset
The (signed) number of lanes to be crossed to get to the lane which allows to continue the drive...
Definition: MSVehicle.h:823
double myTimeLoss
the time loss in seconds due to driving with less than maximum speed
Definition: MSVehicle.h:1830
void setBlinkerInformation()
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5165
SUMOTime myLastActionTime
Action offset (actions are taken at time myActionOffset + N*getActionStepLength()) Initialized to 0...
Definition: MSVehicle.h:1842
void addContainer(MSTransportable *container)
Adds a container.
Definition: MSVehicle.cpp:5156
SUMOTime getMemorySize() const
Definition: MSVehicle.h:193
SUMOTime remainingStopDuration() const
Returns the remaining stop duration for a stopped vehicle or 0.
Definition: MSVehicle.cpp:1778
SUMOTime myJunctionEntryTimeNeverYield
Definition: MSVehicle.h:1910
std::pair< const MSVehicle *const, double > getLeader(double dist=0) const
Returns the leader of the vehicle looking for a fixed distance.
Definition: MSVehicle.cpp:5059
const SUMOVehicleParameter::Stop pars
The stop parameter.
Definition: MSVehicle.h:937
int myRoutingMode
routing mode (see TraCIConstants.h)
Definition: MSVehicle.h:1666
SUMOTime duration
The stopping duration.
Definition: MSVehicle.h:939
The front lights are on (no visualisation)
Definition: MSVehicle.h:1188
Signalling
Some boolean values which describe the state of some vehicle parts.
Definition: MSVehicle.h:1176
MSDevice_DriverState * myDriverState
This vehicle&#39;s driver state.
Definition: MSVehicle.h:1836
void updateTimeLoss(double vNext)
Updates the vehicle&#39;s time loss.
Definition: MSVehicle.cpp:3466
bool onFurtherEdge(const MSEdge *edge) const
whether this vehicle has its back (and no its front) on the given edge
Definition: MSVehicle.cpp:5539
std::list< Stop > getMyStops()
Definition: MSVehicle.cpp:5812
The base class for an intersection.
Definition: MSJunction.h:61
void planMove(const SUMOTime t, const MSLeaderInfo &ahead, const double lengthsInFront)
Compute safe velocities for the upcoming lanes based on positions and speeds from the last time step...
Definition: MSVehicle.cpp:2135
The car-following model abstraction.
Definition: MSCFModel.h:57
MSParkingArea * parkingarea
(Optional) parkingArea if one is assigned to the stop
Definition: MSVehicle.h:933
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
Definition: MSVehicle.h:929
double getPositionOnLane() const
Get the vehicle&#39;s position along the lane.
Definition: MSVehicle.h:397
bool triggered
whether an arriving person lets the vehicle continue
Definition: MSVehicle.h:941
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
Definition: MSVehicle.h:1626
double myPosLat
the stored lateral position
Definition: MSVehicle.h:143
int getBestLaneOffset() const
Definition: MSVehicle.cpp:5016
bool reached
Information whether the stop has been reached.
Definition: MSVehicle.h:945
The high beam lights are on (no visualisation)
Definition: MSVehicle.h:1192
Notification
Definition of a vehicle state.
Changes the wished vehicle speed / lanes.
Definition: MSVehicle.h:1358
double lateralDistanceToLane(const int offset) const
Get the minimal lateral distance required to move fully onto the lane at given offset.
Definition: MSVehicle.cpp:5366
bool addTraciStopAtStoppingPlace(const std::string &stopId, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, const SumoXMLTag stoppingPlaceType, std::string &errorMsg)
Definition: MSVehicle.cpp:5676
bool myRespectJunctionPriority
Whether the junction priority rules are respected.
Definition: MSVehicle.h:1632
bool gapAttained
Whether the desired gap was attained during the current activity phase (induces the remaining duratio...
Definition: MSVehicle.h:1408
double getLeaveSpeed() const
Definition: MSVehicle.h:1965
bool stopsAt(MSStoppingPlace *stop) const
Returns whether the vehicle stops at the given stopping place.
Definition: MSVehicle.cpp:2066
State & operator=(const State &state)
Assignment operator.
Definition: MSVehicle.cpp:145
The backwards driving lights are on (no visualisation)
Definition: MSVehicle.h:1194
vehicle doesn&#39;t want to change
Definition: MSVehicle.h:221
TraciLaneChangePriority
modes for prioritizing traci lane change requests
Definition: MSVehicle.h:1222
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, double &myStopDist, std::pair< double, LinkDirection > &myNextTurn) const
Definition: MSVehicle.cpp:2195
SUMOTime DELTA_T
Definition: SUMOTime.cpp:35
SUMOTime getLastActionTime() const
Returns the time of the vehicle&#39;s last action point.
Definition: MSVehicle.h:521
double tauCurrent
Current, interpolated value for the desired time headway.
Definition: MSVehicle.h:1389
PositionVector getBoundingBox() const
get bounding rectangle
Definition: MSVehicle.cpp:5487
bool isStoppedOnLane() const
Definition: MSVehicle.cpp:1762
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MSVehicle.cpp:1280
bool addStop(const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0, bool collision=false, MSRouteIterator *searchStart=0)
Adds a stop.
Definition: MSVehicle.cpp:1524
bool checkActionStep(const SUMOTime t)
Returns whether the vehicle is supposed to take action in the current simulation step Updates myActio...
Definition: MSVehicle.cpp:2100
double getRightSideOnLane() const
Get the vehicle&#39;s lateral position on the lane:
Definition: MSVehicle.cpp:5250
void adaptBestLanesOccupation(int laneIndex, double density)
update occupation from MSLaneChanger
Definition: MSVehicle.cpp:5026
WaitingTimeCollector myWaitingTimeCollector
Definition: MSVehicle.h:1827
static std::map< const MSVehicle *, GapControlState * > refVehMap
stores reference vehicles currently in use by a gapController
Definition: MSVehicle.h:1417
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
Definition: MSVehicle.cpp:3664
double getSafeFollowSpeed(const std::pair< const MSVehicle *, double > leaderInfo, const double seen, const MSLane *const lane, double distToCrossing) const
compute safe speed for following the given leader
Definition: MSVehicle.cpp:2889
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:73
SUMOTime myMemorySize
the maximal memory to store
Definition: MSVehicle.h:204
Container for state and parameters of the gap control.
Definition: MSVehicle.h:1375
int getSignals() const
Returns the signals.
Definition: MSVehicle.h:1249
double lastCoveredDist() const
previous Speed of this state
Definition: MSVehicle.h:130
#define TIME2STEPS(x)
Definition: SUMOTime.h:59
double myLastCoveredDist
Definition: MSVehicle.h:157
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:52
bool myHaveToWaitOnNextLink
Definition: MSVehicle.h:1895
A storage for edge travel times and efforts.
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
Definition: MSVehicle.h:951
double addGapCurrent
Current, interpolated value for the desired space headway.
Definition: MSVehicle.h:1393
double nextOccupation
As occupation, but without the first lane.
Definition: MSVehicle.h:821
double length
The overall length which may be driven when using this lane without a lane change.
Definition: MSVehicle.h:815
bool rerouteParkingArea(const std::string &parkingAreaID, std::string &errorMsg)
Definition: MSVehicle.cpp:5549
bool wasRemoteControlled(SUMOTime lookBack=DELTA_T) const
Returns the information whether the vehicle is fully controlled via TraCI within the lookBack time...
Definition: MSVehicle.cpp:5866
void processLinkApproaches(double &vSafe, double &vSafeMin, double &vSafeMinDist)
This method iterates through the driveprocess items for the vehicle and adapts the given in/out param...
Definition: MSVehicle.cpp:2943
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge) ...
Definition: MSVehicle.cpp:1069
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
Definition: MSVehicle.cpp:4448
double tauOriginal
Original value for the desired headway (will be reset after duration has expired) ...
Definition: MSVehicle.h:1387
Position getPositionAlongBestLanes(double offset) const
Return the (x,y)-position, which the vehicle would reach if it continued along its best continuation ...
Definition: MSVehicle.cpp:1313
double getBrakeGap() const
get distance for coming to a stop (used for rerouting checks)
Definition: MSVehicle.cpp:2082
std::vector< std::pair< int, double > > getStopIndices() const
return list of route indices for the remaining stops
Definition: MSVehicle.cpp:2055
const ConstMSEdgeVector getStopEdges(double &firstPos, double &lastPos) const
Returns the list of still pending stop edges also returns the first and last stop position...
Definition: MSVehicle.cpp:2029
double getDeltaPos(const double accel) const
calculates the distance covered in the next integration step given an acceleration and assuming the c...
Definition: MSVehicle.cpp:2921
The car-following model and parameter.
Definition: MSVehicleType.h:66
void checkLinkLeader(const MSLink *link, const MSLane *lane, double seen, DriveProcessItem *const lastLink, double &v, double &vLinkPass, double &vLinkWait, bool &setRequest, bool isShadowLink=false) const
checks for link leaders on the given link
Definition: MSVehicle.cpp:2778
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: MSVehicle.h:943
MSAbstractLaneChangeModel & getLaneChangeModel()
Definition: MSVehicle.cpp:4609
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
Definition: MSVehicle.h:2076
std::shared_ptr< MSSimpleDriverState > getDriverState() const
Returns the vehicle driver&#39;s state.
Definition: MSVehicle.cpp:6129
Performs lane changing of vehicles.
bool canReverse(double speedThreshold=SUMO_const_haltingSpeed) const
whether the vehicle is a train that can reverse its direction at the current point in its route ...
Definition: MSVehicle.cpp:3478
bool isFrontOnLane(const MSLane *lane) const
Returns the information whether the front of the vehicle is on the given lane.
Definition: MSVehicle.cpp:4082
int getLaneIndex() const
Definition: MSVehicle.cpp:5233
double getBackPositionOnLane() const
Get the vehicle&#39;s position relative to its current lane.
Definition: MSVehicle.h:426
bool isLeader(const MSLink *link, const MSVehicle *veh) const
whether the given vehicle must be followed at the given junction
Definition: MSVehicle.cpp:5944
Right blinker lights are switched on.
Definition: MSVehicle.h:1180
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation...
Definition: MSVehicle.h:571
bool replaceRoute(const MSRoute *route, const std::string &info, bool onInit=false, int offset=0, bool addStops=true, bool removeStops=true)
Replaces the current route by the given one.
Definition: MSVehicle.cpp:1078
double getMaxAccel() const
Get the vehicle type&#39;s maximum acceleration [m/s^2].
Definition: MSCFModel.h:210
bool willStop() const
Returns whether the vehicle will stop on the current edge.
Definition: MSVehicle.cpp:1757
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
Definition: MSVehicle.h:1608
std::vector< double > myFurtherLanesPosLat
lateral positions on further lanes
Definition: MSVehicle.h:1881
bool signalSet(int which) const
Returns whether the given signal is on.
Definition: MSVehicle.h:1258
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
Definition: MSVehicle.h:1531
bool operator!=(const State &state)
Operator !=.
Definition: MSVehicle.cpp:157
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:48
double getDistanceToPosition(double destPos, const MSEdge *destEdge) const
Definition: MSVehicle.cpp:5042
A road/street connecting two junctions.
Definition: MSEdge.h:76
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
Definition: MSVehicle.h:583
void leaveLane(const MSMoveReminder::Notification reason, const MSLane *approachedLane=0)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
Definition: MSVehicle.cpp:4559
double getLatOffset(const MSLane *lane) const
Get the offset that that must be added to interpret myState.myPosLat for the given lane...
Definition: MSVehicle.cpp:5294
bool hasDriverState() const
Whether this vehicle is equipped with a MSDriverState.
Definition: MSVehicle.h:1001
MSLane * lane
The described lane.
Definition: MSVehicle.h:813
const MSCFModel & getCarFollowModel() const
Returns the vehicle&#39;s car following model definition.
Definition: MSVehicle.h:894
double getCO2Emissions() const
Returns CO2 emission of the current state.
Definition: MSVehicle.cpp:5100
SUMOTime getAccumulatedWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
Definition: MSVehicle.h:647
Left blinker lights are switched on.
Definition: MSVehicle.h:1182
void resetRoutePosition(int index, DepartLaneDefinition departLaneProcedure)
Definition: MSVehicle.cpp:1186
double getActionStepLengthSecs() const
Returns the vehicle&#39;s action step length in secs, i.e. the interval between two action points...
Definition: MSVehicle.h:513
The wipers are on.
Definition: MSVehicle.h:1196
void setAngle(double angle, bool straightenFurther=false)
Set a custom vehicle angle in rad, optionally updates furtherLanePosLat.
Definition: MSVehicle.cpp:1410
DepartLaneDefinition
Possible ways to choose a lane on depart.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type&#39;s car following model definition (const version)
Position validatePosition(Position result, double offset=0) const
ensure that a vehicle-relative position is not invalid
Definition: MSVehicle.cpp:1376
vehicle want&#39;s to change to right lane
Definition: MSVehicle.h:225
void updateState(double vNext)
updates the vehicles state, given a next value for its speed. This value can be negative in case of t...
Definition: MSVehicle.cpp:3850
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it&#39;s primary lane ...
Definition: MSVehicle.cpp:5416
double updateFurtherLanes(std::vector< MSLane *> &furtherLanes, std::vector< double > &furtherLanesPosLat, const std::vector< MSLane *> &passedLanes)
update a vector of further lanes and return the new backPos
Definition: MSVehicle.cpp:3922
SUMOTime lastUpdate
Time of the last update of the gap control.
Definition: MSVehicle.h:1412
Representation of a vehicle.
Definition: SUMOVehicle.h:61
SUMOTime myLastRemoteAccess
Definition: MSVehicle.h:1644
Stores the waiting intervals over the previous seconds (memory is to be specified in ms...
Definition: MSVehicle.h:165
Encapsulated SAX-Attributes.
SUMOTime myCollisionImmunity
amount of time for which the vehicle is immune from collisions
Definition: MSVehicle.h:1904
void adaptLeaveSpeed(const double v)
Definition: MSVehicle.h:1958
bool isStoppedInRange(const double pos, const double tolerance) const
return whether the given position is within range of the current stop
Definition: MSVehicle.cpp:1806
ChangeRequest
Requests set via TraCI.
Definition: MSVehicle.h:219
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
SUMOTime getActionStepLength() const
Returns the vehicle&#39;s action step length in millisecs, i.e. the interval between two action points...
Definition: MSVehicle.h:505
MSRouteIterator edge
The edge in the route to stop at.
Definition: MSVehicle.h:925
double posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
Definition: MSVehicle.h:120
A list of positions.
double getTimeLossSeconds() const
Returns the time loss in seconds.
Definition: MSVehicle.h:673
void updateBestLanes(bool forceRebuild=false, const MSLane *startLane=0)
computes the best lanes to use in order to continue the route
Definition: MSVehicle.cpp:4627
int getRoutingMode() const
return the current routing mode
Definition: MSVehicle.h:1469
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
Definition: MSVehicle.cpp:4987
Position myCachedPosition
Definition: MSVehicle.h:1906
bool active
Whether the gap control is active.
Definition: MSVehicle.h:1406
double getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
Definition: MSVehicle.cpp:4088
double getCenterOnEdge(const MSLane *lane=0) const
Get the vehicle&#39;s lateral position on the edge of the given lane (or its current edge if lane == 0) ...
Definition: MSVehicle.cpp:5262
double currentLength
The length which may be driven on this lane.
Definition: MSVehicle.h:817
const std::pair< double, LinkDirection > & getNextTurn()
Get the distance and direction of the next upcoming turn for the vehicle (within its look-ahead range...
Definition: MSVehicle.h:784
std::shared_ptr< GapControlState > myGapControlState
The gap control state.
Definition: MSVehicle.h:1611
const std::vector< MSLane * > & getFurtherLanes() const
Definition: MSVehicle.h:792
std::list< Stop > myStops
The vehicle&#39;s list of stops.
Definition: MSVehicle.h:1869
ConstMSEdgeVector::const_iterator MSRouteIterator
Definition: MSRoute.h:58
bool collision
Whether this stop was triggered by a collision.
Definition: MSVehicle.h:955
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
Definition: MSVehicle.h:1629
#define STEPS2TIME(x)
Definition: SUMOTime.h:57
MSLane * myLane
The lane the vehicle is on.
Definition: MSVehicle.h:1847
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition) ...
Definition: MSVehicle.h:1893
Blinker lights on both sides are switched on.
Definition: MSVehicle.h:1184
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
Definition: MSVehicle.h:995
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
Definition: MSVehicle.h:2079
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
Definition: MSVehicle.h:1864
bool keepClear(const MSLink *link) const
decide whether the given link must be kept clear
Definition: MSVehicle.cpp:5872
double getMaxSpeed() const
Get vehicle&#39;s maximum speed [m/s].
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
Definition: MSVehicle.cpp:5142
bool considerSafeVelocity() const
Returns whether safe velocities shall be considered.
Definition: MSVehicle.h:1537
T MIN2(T a, T b)
Definition: StdDefs.h:74
void resetActionOffset(const SUMOTime timeUntilNextAction=0)
Resets the action offset for the vehicle.
Definition: MSVehicle.cpp:2110
double timeHeadwayIncrement
cache storage for the headway increments of the current operation
Definition: MSVehicle.h:1414
SUMOTime getActionStepLength() const
Returns this type&#39;s default action step length.
The brake lights are on.
Definition: MSVehicle.h:1186
A blue emergency light is on.
Definition: MSVehicle.h:1202
A structure representing the best lanes for continuing the current route starting at &#39;lane&#39;...
Definition: MSVehicle.h:811
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
Definition: MSVehicle.cpp:6058
Everything is switched off.
Definition: MSVehicle.h:1178
MSParkingArea * getCurrentParkingArea()
get the current parking area stop or nullptr
Definition: MSVehicle.cpp:1741
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
Definition: MSVehicle.cpp:1055
double myStopDist
distance to the next stop or doubleMax if there is none
Definition: MSVehicle.h:1901
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
Definition: MSVehicle.cpp:1800
bool hasInfluencer() const
Definition: MSVehicle.h:1680
SUMOTime collisionStopTime() const
Returns the remaining time a vehicle needs to stop due to a collision. A negative value indicates tha...
Definition: MSVehicle.cpp:1787
Something on a lane to be noticed about vehicle movement.
double basePos(const MSEdge *edge) const
departure position where the vehicle fits fully onto the edge (if possible)
Definition: MSVehicle.cpp:2088
double myAcceleration
The current acceleration after dawdling in m/s.
Definition: MSVehicle.h:1872
void fixPosition()
repair errors in vehicle position after changing between internal edges
Definition: MSVehicle.cpp:5034
bool myActionStep
The flag myActionStep indicates whether the current time step is an action point for the vehicle...
Definition: MSVehicle.h:1839
double myPreviousSpeed
the speed at the begin of the previous time step
Definition: MSVehicle.h:151
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
Definition: MSVehicle.h:1823
One of the left doors is opened.
Definition: MSVehicle.h:1198
double changeRate
Rate by which the current time and space headways are changed towards the target value. (A rate of one corresponds to reaching the target value within one second)
Definition: MSVehicle.h:1400
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
Definition: MSVehicle.h:1653
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
Definition: MSVehicle.h:1651
const MSLane * lane
The lane to stop at.
Definition: MSVehicle.h:927
void setApproachingForAllLinks(const SUMOTime t)
Register junction approaches for all link items in the current plan.
Definition: MSVehicle.cpp:4315
bool allowsContinuation
Whether this lane allows to continue the drive.
Definition: MSVehicle.h:825
const waitingIntervalList & getWaitingIntervals() const
Definition: MSVehicle.h:198
Container that holds the vehicles driving state (position+speed).
Definition: MSVehicle.h:90
void saveState(OutputDevice &out)
Saves the states of a vehicle.
Definition: MSVehicle.cpp:6033
DriveProcessItem(MSLink *link, double vPass, double vWait, bool setRequest, SUMOTime arrivalTime, double arrivalSpeed, SUMOTime arrivalTimeBraking, double arrivalSpeedBraking, double distance, double leaveSpeed=-1.)
Definition: MSVehicle.h:1932
void processLaneAdvances(std::vector< MSLane *> &passedLanes, bool &moved, std::string &emergencyReason)
This method checks if the vehicle has advanced over one or several lanes along its route and triggers...
Definition: MSVehicle.cpp:3531
double getLateralPositionOnLane() const
Get the vehicle&#39;s lateral position on the lane.
Definition: MSVehicle.h:434
void setRoutingMode(int value)
Sets routing behavior.
Definition: MSVehicle.h:1554
Definition of vehicle stop (position and duration)
void setBrakingSignals(double vNext)
sets the braking lights on/off
Definition: MSVehicle.cpp:3435
void setActionStepLength(double actionStepLength, bool resetActionOffset=true)
Sets the action steplength of the vehicle.
Definition: MSVehicle.cpp:1433
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
Definition: MSVehicle.h:1635
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
double getCOEmissions() const
Returns CO emission of the current state.
Definition: MSVehicle.cpp:5106
void removePassedDriveItems()
Erase passed drive items from myLFLinkLanes (and unregister approaching information for corresponding...
Definition: MSVehicle.cpp:3227
virtual void drawOutsideNetwork(bool)
register vehicle for drawing while outside the network
Definition: MSVehicle.h:1823
int numExpectedContainer
The number of still expected containers.
Definition: MSVehicle.h:949
const std::vector< double > & getFurtherLanesPosLat() const
Definition: MSVehicle.h:796
Abstract in-vehicle / in-person device.
Definition: MSDevice.h:64
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
Definition: MSVehicle.cpp:4965
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5219
double remainingDuration
Remaining duration for keeping the target headway.
Definition: MSVehicle.h:1397
bool addTraciStop(MSLane *const lane, const double startPos, const double endPos, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, std::string &errorMsg)
Definition: MSVehicle.cpp:5623
vehicle want&#39;s to change to left lane
Definition: MSVehicle.h:223
int numExpectedPerson
The number of still expected persons.
Definition: MSVehicle.h:947
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Definition: MSVehicle.cpp:5817
Structure representing possible vehicle parameter.
DriveItemVector::iterator myNextDriveItem
iterator pointing to the next item in myLFLinkLanes
Definition: MSVehicle.h:1985
LaneChangeMode mySublaneLC
changing to the prefered lateral alignment
Definition: MSVehicle.h:1657
double occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
Definition: MSVehicle.h:819
std::pair< double, LinkDirection > myNextTurn
the upcoming turn for the vehicle
Definition: MSVehicle.h:1876
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
Definition: MSVehicle.cpp:1767
const MSVehicleType & getVehicleType() const
Returns the vehicle&#39;s type definition.
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
Definition: MSVehicle.cpp:1819
void setTentativeLaneAndPosition(MSLane *lane, double pos, double posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
Definition: MSVehicle.cpp:5240
bool isActive() const
Returns whether the current simulation step is an action point for the vehicle.
Definition: MSVehicle.h:591
void removeApproachingInformation(const DriveItemVector &lfLinks) const
unregister approach from all upcoming links
Definition: MSVehicle.cpp:5422
std::vector< std::pair< SUMOTime, double > > mySpeedTimeLine
The velocity time line to apply.
Definition: MSVehicle.h:1605
MSVehicleType * myType
This vehicle&#39;s type.
void workOnMoveReminders(double oldPos, double newPos, double newSpeed)
Processes active move reminder.
Definition: MSVehicle.cpp:1218
void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector &lfLinks) const
runs heuristic for keeping the intersection clear in case of downstream jamming
Definition: MSVehicle.cpp:4111
int mySignals
State of things of the vehicle that can be on or off.
Definition: MSVehicle.h:1884
double addGapTarget
Target value for the desired space headway.
Definition: MSVehicle.h:1395
ConstMSEdgeVector myRemoteRoute
Definition: MSVehicle.h:1643
std::vector< MSLane * > bestContinuations
Definition: MSVehicle.h:831
MSStoppingPlace * chargingStation
(Optional) charging station if one is assigned to the stop
Definition: MSVehicle.h:935
const MSVehicle * referenceVeh
reference vehicle for the gap - if it is null, the current leader on the ego&#39;s lane is used as a refe...
Definition: MSVehicle.h:1404
void setRemoteState(Position xyPos)
sets position outside the road network
Definition: MSVehicle.cpp:5854
void checkLinkLeaderCurrentAndParallel(const MSLink *link, const MSLane *lane, double seen, DriveProcessItem *const lastLink, double &v, double &vLinkPass, double &vLinkWait, bool &setRequest) const
checks for link leaders of the current link as well as the parallel link (if there is one) ...
Definition: MSVehicle.cpp:2762
double getAcceleration() const
Returns the vehicle&#39;s acceleration in m/s (this is computed as the last step&#39;s mean acceleration in c...
Definition: MSVehicle.h:494
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
Definition: MSVehicle.h:931
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
Definition: MSVehicle.cpp:1397
double getPMxEmissions() const
Returns PMx emission of the current state.
Definition: MSVehicle.cpp:5124
friend class MSVehicle
vehicle sets states directly
Definition: MSVehicle.h:92
double getActionStepLengthSecs() const
Returns this type&#39;s default action step length in seconds.
double tauTarget
Target value for the desired time headway.
Definition: MSVehicle.h:1391
void activateReminders(const MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
"Activates" all current move reminder
Definition: MSVehicle.cpp:4362
void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength)
Process an updated action step length value (only affects the vehicle&#39;s action offset, The actionStepLength is stored in the (singular) vtype)
Definition: MSVehicle.cpp:2116
DriveProcessItem(double vWait, double distance, double _availableSpace=0)
constructor if the link shall not be passed
Definition: MSVehicle.h:1948
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
Definition: MSVehicle.cpp:195
Stop(const SUMOVehicleParameter::Stop &par)
Definition: MSVehicle.h:923
const MSLane * getBackLane() const
Definition: MSVehicle.cpp:3912
double processTraCISpeedControl(double vSafe, double vNext)
Check for speed advices from the traci client and adjust the speed vNext in the current (euler) / aft...
Definition: MSVehicle.cpp:3199
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
Definition: StdDefs.h:61
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
Definition: MSVehicle.cpp:5089
waitingIntervalList myWaitingIntervals
Definition: MSVehicle.h:209
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
Definition: MSGlobals.h:109
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during planMove() and executeMove.
Definition: MSVehicle.h:1972
void updateWaitingTime(double vNext)
Updates the vehicle&#39;s waiting time counters (accumulated and consecutive)
Definition: MSVehicle.cpp:3454
void setSignals(int signals)
Definition: MSVehicle.h:1581
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle&#39;s internal edge travel times/efforts container.
Definition: MSVehicle.cpp:1196
double estimateSpeedAfterDistance(const double dist, const double v, const double accel) const
Definition: MSCFModel.cpp:703
vehicle want&#39;s to keep the current lane
Definition: MSVehicle.h:227
double getLastStepDist() const
Get the distance the vehicle covered in the previous timestep.
Definition: MSVehicle.h:404
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
double speed() const
Speed of this state.
Definition: MSVehicle.h:115
void switchOffSignal(int signal)
Switches the given signal off.
Definition: MSVehicle.h:1241
static bool gSemiImplicitEulerUpdate
Definition: MSGlobals.h:56
void switchOnSignal(int signal)
Switches the given signal on.
Definition: MSVehicle.h:1233
double getSlope() const
Returns the slope of the road at vehicle&#39;s position.
Definition: MSVehicle.cpp:1269
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
Definition: MSVehicle.cpp:5928
void addPerson(MSTransportable *person)
Adds a passenger.
Definition: MSVehicle.cpp:5148
static std::vector< MSLane * > myEmptyLaneVector
Definition: MSVehicle.h:1866
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
Definition: MSVehicle.h:709
bool isActionStep(SUMOTime t) const
Returns whether the next simulation step will be an action point for the vehicle. ...
Definition: MSVehicle.h:598
bool unsafeLinkAhead(const MSLane *lane) const
whether the vehicle may safely move to the given lane with regard to upcoming links ...
Definition: MSVehicle.cpp:5434
MSEdgeWeightsStorage & _getWeightsStorage() const
Definition: MSVehicle.cpp:1208
The ToC Device controls transition of control between automated and manual driving.
double getHCEmissions() const
Returns HC emission of the current state.
Definition: MSVehicle.cpp:5112
const MSVehicle * prevLeader
The last recognized leader.
Definition: MSVehicle.h:1410
virtual ~MSVehicle()
Destructor.
Definition: MSVehicle.cpp:1033
bool isStopped() const
Returns whether the vehicle is at a stop.
Definition: MSVehicle.cpp:1751
bool ignoreOverlap() const
Definition: MSVehicle.h:1597
MSParkingArea * getNextParkingArea()
get the upcoming parking area stop or nullptr
Definition: MSVehicle.cpp:1727
const Position getBackPosition() const
Definition: MSVehicle.cpp:1495
double getRightSideOnEdge(const MSLane *lane=0) const
Get the vehicle&#39;s lateral position on the edge of the given lane (or its current edge if lane == 0) ...
Definition: MSVehicle.cpp:5256
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
Definition: MSVehicle.cpp:4621
SUMOTime getTimeLoss() const
Returns the SUMOTime lost (speed was lesser maximum speed)
Definition: MSVehicle.h:638
bool isParking() const
Returns whether the vehicle is parking.
Definition: MSVehicle.cpp:1793
double getSpeed() const
Returns the vehicle&#39;s current speed.
Definition: MSVehicle.h:477
State(double pos, double speed, double posLat, double backPos)
Constructor.
Definition: MSVehicle.cpp:167
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
Definition: MSVehicle.h:1620
double estimateLeaveSpeed(const MSLink *const link, const double vLinkPass) const
estimate leaving speed when accelerating across a link
Definition: MSVehicle.h:1998
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
Definition: MSVehicle.cpp:5841
double getLatDist() const
Definition: MSVehicle.h:1589
SUMOTime getLastAccessTimeStep() const
Definition: MSVehicle.h:1565
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Definition: MSVehicle.h:953
Provides an interface to an error whose fluctuation is controlled via the driver&#39;s &#39;awareness&#39;...
A red emergency light is on.
Definition: MSVehicle.h:1204
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the lane&#39;s maximum speed, given a vehicle&#39;s speed limit adaptation.
Definition: MSLane.h:519
double myBackPos
the stored back position
Definition: MSVehicle.h:148
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle&#39;s entering of a new lane.
Definition: MSVehicle.cpp:1247
SUMOTime myJunctionEntryTime
time at which the current junction was entered
Definition: MSVehicle.h:1909
One of the right doors is opened.
Definition: MSVehicle.h:1200
Interface for lane-change models.
double mySpeed
the stored speed (should be >=0 at any time)
Definition: MSVehicle.h:140
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
Definition: MSVehicle.h:1623
The fog lights are on (no visualisation)
Definition: MSVehicle.h:1190
double nextStopDist() const
return the distance to the next stop or doubleMax if there is none.
Definition: MSVehicle.h:1047
double getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
Definition: MSVehicle.cpp:5832
Definition of vehicle stop (position and duration)
Definition: MSVehicle.h:921
A yellow emergency light is on.
Definition: MSVehicle.h:1206
double pos() const
Position of this state.
Definition: MSVehicle.h:110
void updateDriveItems()
Check whether the drive items (myLFLinkLanes) are up to date, and update them if required.
Definition: MSVehicle.cpp:3281
bool congested() const
Definition: MSVehicle.h:718