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
199  return myWaitingIntervals;
200  }
201 
202  private:
205 
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;
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  }
1473 
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 {
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 
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 {
1599  }
1600 
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 
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),
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 
1976 
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 
MSVehicle::Influencer::GapControlState::remainingDuration
double remainingDuration
Remaining duration for keeping the target headway.
Definition: MSVehicle.h:1397
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
MSVehicle::processNextStop
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
Definition: MSVehicle.cpp:1819
MSVehicle::Influencer::myTraCISignals
int myTraCISignals
Definition: MSVehicle.h:1663
MSVehicle::Influencer::cleanup
static void cleanup()
Static cleanup.
Definition: MSVehicle.cpp:382
MSVehicle::LC_ALWAYS
Definition: MSVehicle.h:1217
MSVehicle::VEH_SIGNAL_NONE
Everything is switched off.
Definition: MSVehicle.h:1178
MSVehicle::updateBestLanes
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
MSVehicle::Influencer::GapControlState::lastUpdate
SUMOTime lastUpdate
Time of the last update of the gap control.
Definition: MSVehicle.h:1412
MSVehicle::REQUEST_RIGHT
vehicle want's to change to right lane
Definition: MSVehicle.h:225
MSVehicle::getCenterOnEdge
double getCenterOnEdge(const MSLane *lane=0) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0)
Definition: MSVehicle.cpp:5262
MSVehicle::getSpeedWithoutTraciInfluence
double getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
Definition: MSVehicle.cpp:5832
MSVehicle::collisionStopTime
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
MSVehicle::VEH_SIGNAL_BLINKER_LEFT
Left blinker lights are switched on.
Definition: MSVehicle.h:1182
MSVehicle::LaneQ::bestLaneOffset
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
MSVehicle::Stop::busstop
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
Definition: MSVehicle.h:929
MSVehicle::Stop::Stop
Stop(const SUMOVehicleParameter::Stop &par)
Definition: MSVehicle.h:923
MSVehicle::getBestLaneOffset
int getBestLaneOffset() const
Definition: MSVehicle.cpp:5016
MSVehicle::getPreviousSpeed
double getPreviousSpeed() const
Returns the vehicle's speed before the previous time step.
Definition: MSVehicle.h:485
MSVehicle::Influencer::getLastAccessTimeStep
SUMOTime getLastAccessTimeStep() const
Definition: MSVehicle.h:1565
MSVehicle::VEH_SIGNAL_EMERGENCY_RED
A red emergency light is on.
Definition: MSVehicle.h:1204
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:60
MSCFModel::getMaxAccel
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
Definition: MSCFModel.h:210
MSVehicle::haveValidStopEdges
bool haveValidStopEdges() const
check whether all stop.edge MSRouteIterators are valid and in order
Definition: MSVehicle.cpp:6081
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:74
MSVehicle::hasArrived
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge)
Definition: MSVehicle.cpp:1069
MSVehicle::Stop::numExpectedPerson
int numExpectedPerson
The number of still expected persons.
Definition: MSVehicle.h:947
MSVehicle::myAmRegisteredAsWaitingForPerson
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition)
Definition: MSVehicle.h:1890
MSVehicleType::getActionStepLength
SUMOTime getActionStepLength() const
Returns this type's default action step length.
Definition: MSVehicleType.h:218
MSParkingArea
A lane area vehicles can halt at.
Definition: MSParkingArea.h:59
MSVehicle::Influencer
Changes the wished vehicle speed / lanes.
Definition: MSVehicle.h:1358
MSVehicle::operator=
MSVehicle & operator=(const MSVehicle &)
invalidated assignment operator
MSVehicle::myFurtherLanes
std::vector< MSLane * > myFurtherLanes
The information into which lanes the vehicle laps into.
Definition: MSVehicle.h:1879
MSVehicle::myStopDist
double myStopDist
distance to the next stop or doubleMax if there is none
Definition: MSVehicle.h:1901
MSVehicle::Influencer::influenceSpeed
double influenceSpeed(SUMOTime currentTime, double speed, double vSafe, double vMin, double vMax)
Applies stored velocity information on the speed to use.
Definition: MSVehicle.cpp:470
MSVehicle::Stop::reached
bool reached
Information whether the stop has been reached.
Definition: MSVehicle.h:945
MSVehicle::getMyStops
std::list< Stop > getMyStops()
Definition: MSVehicle.cpp:5812
MSVehicle::getBestLanes
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
Definition: MSVehicle.cpp:4621
MSVehicle::enterLaneAtMove
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Definition: MSVehicle.cpp:4395
MSNet.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
MSVehicle::isStopped
bool isStopped() const
Returns whether the vehicle is at a stop.
Definition: MSVehicle.cpp:1751
MSVehicle::isActive
bool isActive() const
Returns whether the current simulation step is an action point for the vehicle.
Definition: MSVehicle.h:591
MSVehicle::wasRemoteControlled
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
MSVehicle::myCollisionImmunity
SUMOTime myCollisionImmunity
amount of time for which the vehicle is immune from collisions
Definition: MSVehicle.h:1904
MSVehicle::Stop::parkingarea
MSParkingArea * parkingarea
(Optional) parkingArea if one is assigned to the stop
Definition: MSVehicle.h:933
MSVehicle::executeMove
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
Definition: MSVehicle.cpp:3664
MSLaneChanger
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:48
MSVehicle::myLFLinkLanesPrev
DriveItemVector myLFLinkLanesPrev
planned speeds from the previous step for un-registering from junctions after the new container is fi...
Definition: MSVehicle.h:1978
MSVehicle::DriveProcessItem::DriveProcessItem
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
MSVehicle::isOnRoad
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
Definition: MSVehicle.h:583
MSVehicle::isRemoteControlled
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
Definition: MSVehicle.cpp:5860
MSVehicle::Stop::duration
SUMOTime duration
The stopping duration.
Definition: MSVehicle.h:939
MSJunction
The base class for an intersection.
Definition: MSJunction.h:61
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
MSVehicle::Influencer::mySpeedGainLC
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
Definition: MSVehicle.h:1653
MSVehicle::Stop::operator=
Stop & operator=(const Stop &src)
Invalidated assignment operator.
MSVehicle::mySignals
int mySignals
State of things of the vehicle that can be on or off.
Definition: MSVehicle.h:1884
MSVehicle::VEH_SIGNAL_BLINKER_RIGHT
Right blinker lights are switched on.
Definition: MSVehicle.h:1180
DELTA_T
SUMOTime DELTA_T
Definition: SUMOTime.cpp:35
MSVehicle::influenceChangeDecision
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
Definition: MSVehicle.cpp:5841
MSVehicle::setTentativeLaneAndPosition
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
MSVehicle::hasInfluencer
bool hasInfluencer() const
Definition: MSVehicle.h:1680
MSVehicle::REQUEST_HOLD
vehicle want's to keep the current lane
Definition: MSVehicle.h:227
MSRouteIterator
ConstMSEdgeVector::const_iterator MSRouteIterator
Definition: MSRoute.h:58
MSVehicle::VEH_SIGNAL_FOGLIGHT
The fog lights are on (no visualisation)
Definition: MSVehicle.h:1190
MSVehicle::LC_NEVER
Definition: MSVehicle.h:1215
MSVehicle::WaitingTimeCollector::passTime
void passTime(SUMOTime dt, bool waiting)
Definition: MSVehicle.cpp:216
MSVehicle::updateOccupancyAndCurrentBestLane
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
Definition: MSVehicle.cpp:4965
MSVehicle::getAccumulatedWaitingTime
SUMOTime getAccumulatedWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
Definition: MSVehicle.h:647
MSVehicle::WaitingTimeCollector::waitingIntervalList
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
Definition: MSVehicle.h:168
MSVehicle::DriveProcessItem::myVLinkPass
double myVLinkPass
Definition: MSVehicle.h:1920
MSVehicle::getLatOffset
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
MSVehicle::myLastBestLanesEdge
const MSEdge * myLastBestLanesEdge
Definition: MSVehicle.h:1851
MSVehicle::State::operator!=
bool operator!=(const State &state)
Operator !=.
Definition: MSVehicle.cpp:157
MSVehicle::getBoundingBox
PositionVector getBoundingBox() const
get bounding rectangle
Definition: MSVehicle.cpp:5487
MSVehicle::LaneQ::length
double length
The overall length which may be driven when using this lane without a lane change.
Definition: MSVehicle.h:815
MSVehicle::DriveProcessItem::availableSpace
double availableSpace
Definition: MSVehicle.h:1930
MSVehicle::State::myBackPos
double myBackPos
the stored back position
Definition: MSVehicle.h:148
MSNet::VehicleStateListener
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:567
MSVehicle::getBrakeGap
double getBrakeGap() const
get distance for coming to a stop (used for rerouting checks)
Definition: MSVehicle.cpp:2082
MSVehicle::getTimeLossSeconds
double getTimeLossSeconds() const
Returns the time loss in seconds.
Definition: MSVehicle.h:673
MSVehicle::DriveProcessItem::myLink
MSLink * myLink
Definition: MSVehicle.h:1919
MSVehicle::getBackPosition
const Position getBackPosition() const
Definition: MSVehicle.cpp:1495
MSVehicle::Influencer::myTraciLaneChangePriority
TraciLaneChangePriority myTraciLaneChangePriority
flags for determining the priority of traci lane change requests
Definition: MSVehicle.h:1660
MSVehicle::VEH_SIGNAL_HIGHBEAM
The high beam lights are on (no visualisation)
Definition: MSVehicle.h:1192
MSSimpleDriverState
Provides an interface to an error whose fluctuation is controlled via the driver's 'awareness',...
Definition: MSDriverState.h:103
MSPerson
Definition: MSPerson.h:64
MSVehicle::LCP_ALWAYS
Definition: MSVehicle.h:1223
MSVehicle::Influencer::setLaneTimeLine
void setLaneTimeLine(const std::vector< std::pair< SUMOTime, int > > &laneTimeLine)
Sets a new lane timeline.
Definition: MSVehicle.cpp:408
MSVehicle::addTraciStopAtStoppingPlace
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
MSVehicle::isParking
bool isParking() const
Returns whether the vehicle is parking.
Definition: MSVehicle.cpp:1793
MSVehicle::getBackPositionOnLane
double getBackPositionOnLane() const
Get the vehicle's position relative to its current lane.
Definition: MSVehicle.h:426
MSVehicle::Influencer::GapControlState::maxDecel
double maxDecel
Maximal deceleration to be applied due to the adapted headway.
Definition: MSVehicle.h:1402
MSVehicle::State
Container that holds the vehicles driving state (position+speed).
Definition: MSVehicle.h:90
MSVehicle::getActionStepLength
SUMOTime getActionStepLength() const
Returns the vehicle's action step length in millisecs, i.e. the interval between two action points.
Definition: MSVehicle.h:505
MSVehicle::stopsAt
bool stopsAt(MSStoppingPlace *stop) const
Returns whether the vehicle stops at the given stopping place.
Definition: MSVehicle.cpp:2066
MSVehicle::addPerson
void addPerson(MSTransportable *person)
Adds a passenger.
Definition: MSVehicle.cpp:5148
MSVehicle::LaneQ
A structure representing the best lanes for continuing the current route starting at 'lane'.
Definition: MSVehicle.h:811
MSVehicle::REQUEST_LEFT
vehicle want's to change to left lane
Definition: MSVehicle.h:223
MSVehicle::Influencer::init
static void init()
Static initalization.
Definition: MSVehicle.cpp:377
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
MSVehicle::Influencer::myRemoteLane
MSLane * myRemoteLane
Definition: MSVehicle.h:1638
MSVehicle::Influencer::GapControlState::timeHeadwayIncrement
double timeHeadwayIncrement
cache storage for the headway increments of the current operation
Definition: MSVehicle.h:1414
MSVehicle::resumeFromStopping
bool resumeFromStopping()
Definition: MSVehicle.cpp:5756
MSVehicle::State::mySpeed
double mySpeed
the stored speed (should be >=0 at any time)
Definition: MSVehicle.h:140
MSVehicle::State::State
State(double pos, double speed, double posLat, double backPos)
Constructor.
Definition: MSVehicle.cpp:167
ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:73
MSVehicle::Influencer::GapControlState::tauCurrent
double tauCurrent
Current, interpolated value for the desired time headway.
Definition: MSVehicle.h:1389
MSVehicle::State::speed
double speed() const
Speed of this state.
Definition: MSVehicle.h:115
MSVehicle::keepStopping
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
Definition: MSVehicle.cpp:1767
MSVehicle::WaitingTimeCollector::myMemorySize
SUMOTime myMemorySize
the maximal memory to store
Definition: MSVehicle.h:204
MSVehicle::updateActionOffset
void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength)
Process an updated action step length value (only affects the vehicle's action offset,...
Definition: MSVehicle.cpp:2116
MSVehicle::Influencer::activateGapController
void activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, MSVehicle *refVeh=nullptr)
Activates the gap control with the given parameters,.
Definition: MSVehicle.cpp:393
MSVehicle::nextLinkPriority
static int nextLinkPriority(const std::vector< MSLane * > &conts)
get a numerical value for the priority of the upcoming link
Definition: MSVehicle.cpp:4949
MSVehicle::DriveProcessItem::accelV
double accelV
Definition: MSVehicle.h:1928
MSVehicle::Influencer::myOriginalSpeed
double myOriginalSpeed
The velocity before influence.
Definition: MSVehicle.h:1614
MSVehicle::Influencer::adaptLaneTimeLine
void adaptLaneTimeLine(int indexShift)
Adapts lane timeline when moving to a new lane and the lane index changes.
Definition: MSVehicle.cpp:414
MSVehicle::myWaitingTimeCollector
WaitingTimeCollector myWaitingTimeCollector
Definition: MSVehicle.h:1827
MSVehicle::Influencer::GapControlVehStateListener::vehicleStateChanged
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to, const std::string &info="")
Called if a vehicle changes its state.
Definition: MSVehicle.cpp:253
MSVehicle::getTimeGapOnLane
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
Definition: MSVehicle.cpp:5089
MSVehicle::addStop
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
MSVehicle::isStoppedOnLane
bool isStoppedOnLane() const
Definition: MSVehicle.cpp:1762
MSVehicle::Stop::getDescription
std::string getDescription() const
get a short description for showing in the gui
Definition: MSVehicle.cpp:924
MSVehicle::onRemovalFromNet
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
Definition: MSVehicle.cpp:1055
MSVehicle::Influencer::considerSafeVelocity
bool considerSafeVelocity() const
Returns whether safe velocities shall be considered.
Definition: MSVehicle.h:1537
MSVehicle::Stop::collision
bool collision
Whether this stop was triggered by a collision.
Definition: MSVehicle.h:955
MSVehicle::Influencer::myRemoteRoute
ConstMSEdgeVector myRemoteRoute
Definition: MSVehicle.h:1643
MSVehicle::VEH_SIGNAL_BLINKER_EMERGENCY
Blinker lights on both sides are switched on.
Definition: MSVehicle.h:1184
MSVehicle::DriveItemVector
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during planMove() and executeMove.
Definition: MSVehicle.h:1972
MSVehicle::enterLaneAtInsertion
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
MSVehicle::Influencer::myStrategicLC
LaneChangeMode myStrategicLC
lane changing which is necessary to follow the current route
Definition: MSVehicle.h:1649
MSVehicle::Influencer::myRemoteAngle
double myRemoteAngle
Definition: MSVehicle.h:1641
MSVehicle::Influencer::myConsiderMaxAcceleration
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
Definition: MSVehicle.h:1626
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:291
MSVehicle::State::myPreviousSpeed
double myPreviousSpeed
the speed at the begin of the previous time step
Definition: MSVehicle.h:151
MSVehicle::myHaveToWaitOnNextLink
bool myHaveToWaitOnNextLink
Definition: MSVehicle.h:1895
MSVehicle::getHarmonoise_NoiseEmissions
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
Definition: MSVehicle.cpp:5142
MSTransportable
Definition: MSTransportable.h:59
MSVehicle::Influencer::myConsiderSafeVelocity
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
Definition: MSVehicle.h:1623
MSVehicle::Influencer::myRoutingMode
int myRoutingMode
routing mode (see TraCIConstants.h)
Definition: MSVehicle.h:1666
MSLaneChangerSublane
Performs lane changing of vehicles.
Definition: MSLaneChangerSublane.h:43
MSVehicle::myLFLinkLanes
DriveItemVector myLFLinkLanes
container for the planned speeds in the current step
Definition: MSVehicle.h:1975
MSVehicle::Influencer::GapControlState::active
bool active
Whether the gap control is active.
Definition: MSVehicle.h:1406
PositionVector
A list of positions.
Definition: PositionVector.h:46
MSVehicle::getCarFollowVariables
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
Definition: MSVehicle.h:911
MSVehicle::Influencer::myRemoteXYPos
Position myRemoteXYPos
Definition: MSVehicle.h:1637
MSVehicle::VEH_SIGNAL_FRONTLIGHT
The front lights are on (no visualisation)
Definition: MSVehicle.h:1188
MSVehicle::getNextStop
Stop & getNextStop()
Definition: MSVehicle.cpp:5807
MSVehicle::getSafeFollowSpeed
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
MSVehicle::getCarFollowModel
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
Definition: MSVehicle.h:894
MSVehicle::myNextTurn
std::pair< double, LinkDirection > myNextTurn
the upcoming turn for the vehicle
Definition: MSVehicle.h:1876
MSVehicle::getBackLane
const MSLane * getBackLane() const
Definition: MSVehicle.cpp:3912
MSVehicle::getSlope
double getSlope() const
Returns the slope of the road at vehicle's position.
Definition: MSVehicle.cpp:1269
MSDevice_DriverState
The ToC Device controls transition of control between automated and manual driving.
Definition: MSDevice_DriverState.h:55
MSVehicleTransfer
Definition: MSVehicleTransfer.h:64
MSVehicle::Signalling
Signalling
Some boolean values which describe the state of some vehicle parts.
Definition: MSVehicle.h:1176
MSRoute
Definition: MSRoute.h:67
MSVehicle::Influencer::myCooperativeLC
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
Definition: MSVehicle.h:1651
MSVehicle::myFurtherLanesPosLat
std::vector< double > myFurtherLanesPosLat
lateral positions on further lanes
Definition: MSVehicle.h:1881
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
MSVehicle::Influencer::getEmergencyBrakeRedLight
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
Definition: MSVehicle.h:1531
MSEdgeWeightsStorage
A storage for edge travel times and efforts.
Definition: MSEdgeWeightsStorage.h:44
MSVehicle::planMoveInternal
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, double &myStopDist, std::pair< double, LinkDirection > &myNextTurn) const
Definition: MSVehicle.cpp:2195
MSVehicle::Influencer::myRemotePos
double myRemotePos
Definition: MSVehicle.h:1639
SUMO_const_haltingSpeed
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
Definition: StdDefs.h:61
MSVehicle::removeApproachingInformation
void removeApproachingInformation(const DriveItemVector &lfLinks) const
unregister approach from all upcoming links
Definition: MSVehicle.cpp:5422
MSMoveReminder
Something on a lane to be noticed about vehicle movement.
Definition: MSMoveReminder.h:64
MSVehicle::Influencer::getOriginalSpeed
double getOriginalSpeed() const
Returns the originally longitudinal speed to use.
Definition: MSVehicle.cpp:649
MSVehicle::Stop::timeToBoardNextPerson
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
Definition: MSVehicle.h:951
MSVehicleType.h
MSVehicle::DriveProcessItem::DriveProcessItem
DriveProcessItem(double vWait, double distance, double _availableSpace=0)
constructor if the link shall not be passed
Definition: MSVehicle.h:1948
MSVehicle::VEH_SIGNAL_WIPER
The wipers are on.
Definition: MSVehicle.h:1196
MSVehicle::getLateralPositionOnLane
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
Definition: MSVehicle.h:434
MSVehicle::adaptLaneEntering2MoveReminder
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle's entering of a new lane.
Definition: MSVehicle.cpp:1247
MSVehicle::REQUEST_NONE
vehicle doesn't want to change
Definition: MSVehicle.h:221
MSVehicle::saveState
void saveState(OutputDevice &out)
Saves the states of a vehicle.
Definition: MSVehicle.cpp:6033
MSVehicle::removePassedDriveItems
void removePassedDriveItems()
Erase passed drive items from myLFLinkLanes (and unregister approaching information for corresponding...
Definition: MSVehicle.cpp:3227
MSVehicle::planMove
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
MSVehicle::Influencer::getRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT() const
Definition: MSVehicle.cpp:896
MSVehicle::LaneChangeMode
LaneChangeMode
modes for resolving conflicts between external control (traci) and vehicle control over lane changing...
Definition: MSVehicle.h:1214
MSVehicle::Stop::write
void write(OutputDevice &dev) const
Write the current stop configuration (used for state saving)
Definition: MSVehicle.cpp:940
MSVehicle::DriveProcessItem::myArrivalTimeBraking
SUMOTime myArrivalTimeBraking
Definition: MSVehicle.h:1925
MSVehicle::switchOffSignal
void switchOffSignal(int signal)
Switches the given signal off.
Definition: MSVehicle.h:1241
MSVehicle::switchOnSignal
void switchOnSignal(int signal)
Switches the given signal on.
Definition: MSVehicle.h:1233
MSVehicle::fixPosition
void fixPosition()
repair errors in vehicle position after changing between internal edges
Definition: MSVehicle.cpp:5034
MSVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MSVehicle.cpp:1280
MSLeaderInfo
Definition: MSLeaderInfo.h:50
MSVehicle::WaitingTimeCollector::getWaitingIntervals
const waitingIntervalList & getWaitingIntervals() const
Definition: MSVehicle.h:198
MSVehicle::getNextTurn
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
MSVehicle::addContainer
void addContainer(MSTransportable *container)
Adds a container.
Definition: MSVehicle.cpp:5156
MSVehicle::Influencer::getSpeedMode
int getSpeedMode() const
return the current speed mode
Definition: MSVehicle.cpp:427
MSVehicle::leaveLane
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
MSVehicle::getPMxEmissions
double getPMxEmissions() const
Returns PMx emission of the current state.
Definition: MSVehicle.cpp:5124
MSVehicle::myAmOnNet
bool myAmOnNet
Whether the vehicle is on the network (not parking, teleported, vaporized, or arrived)
Definition: MSVehicle.h:1887
MSVehicle::setBlinkerInformation
void setBlinkerInformation()
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5165
MSVehicle::overlap
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
Definition: MSVehicle.h:709
MSVehicle::getCurrentApparentDecel
double getCurrentApparentDecel() const
get apparent deceleration based on vType parameters and current acceleration
Definition: MSVehicle.cpp:6135
MSVehicle::Influencer::myRightDriveLC
LaneChangeMode myRightDriveLC
changing to the rightmost lane
Definition: MSVehicle.h:1655
MSVehicle::Influencer::mySpeedAdaptationStarted
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
Definition: MSVehicle.h:1620
MSVehicle::getSpaceTillLastStanding
double getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
Definition: MSVehicle.cpp:4088
MSVehicle::Influencer::implicitSpeedRemote
double implicitSpeedRemote(const MSVehicle *veh, double oldSpeed)
return the speed that is implicit in the new remote position
Definition: MSVehicle.cpp:848
MSVehicle::myEmptyLaneVector
static std::vector< MSLane * > myEmptyLaneVector
Definition: MSVehicle.h:1866
MSVehicle::getPositionOnLane
double getPositionOnLane() const
Get the vehicle's position along the lane.
Definition: MSVehicle.h:397
MSVehicle::getLeader
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
MSVehicle::getDriverState
std::shared_ptr< MSSimpleDriverState > getDriverState() const
Returns the vehicle driver's state.
Definition: MSVehicle.cpp:6129
MSVehicleType::getCarFollowModel
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
Definition: MSVehicleType.h:141
MSVehicle::keepClear
bool keepClear(const MSLink *link) const
decide whether the given link must be kept clear
Definition: MSVehicle.cpp:5872
MSVehicle::remainingStopDuration
SUMOTime remainingStopDuration() const
Returns the remaining stop duration for a stopped vehicle or 0.
Definition: MSVehicle.cpp:1778
MSVehicle::getActionStepLengthSecs
double getActionStepLengthSecs() const
Returns the vehicle's action step length in secs, i.e. the interval between two action points.
Definition: MSVehicle.h:513
MSVehicle::myJunctionEntryTime
SUMOTime myJunctionEntryTime
time at which the current junction was entered
Definition: MSVehicle.h:1909
MSVehicle::Influencer::GapControlState::tauTarget
double tauTarget
Target value for the desired time headway.
Definition: MSVehicle.h:1391
TIME2STEPS
#define TIME2STEPS(x)
Definition: SUMOTime.h:59
MSNet::VehicleState
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
MSVehicle::TraciLaneChangePriority
TraciLaneChangePriority
modes for prioritizing traci lane change requests
Definition: MSVehicle.h:1222
MSVehicleType::getLengthWithGap
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
Definition: MSVehicleType.h:118
MSVehicle::processTraCISpeedControl
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
MSVehicle::getCOEmissions
double getCOEmissions() const
Returns CO emission of the current state.
Definition: MSVehicle.cpp:5106
MSVehicle::getLastActionTime
SUMOTime getLastActionTime() const
Returns the time of the vehicle's last action point.
Definition: MSVehicle.h:521
MSVehicle::Influencer::GapControlState::prevLeader
const MSVehicle * prevLeader
The last recognized leader.
Definition: MSVehicle.h:1410
MSVehicle::Influencer::postProcessRemoteControl
void postProcessRemoteControl(MSVehicle *v)
Definition: MSVehicle.cpp:803
MSContainer
Definition: MSContainer.h:61
MSVehicle::_getWeightsStorage
MSEdgeWeightsStorage & _getWeightsStorage() const
Definition: MSVehicle.cpp:1208
MSVehicle::Influencer::resetLatDist
void resetLatDist()
Definition: MSVehicle.h:1593
MSVehicle::DriveProcessItem::myArrivalTime
SUMOTime myArrivalTime
Definition: MSVehicle.h:1923
MSVehicle::hasDriverState
bool hasDriverState() const
Whether this vehicle is equipped with a MSDriverState.
Definition: MSVehicle.h:1001
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:57
MSVehicle::Influencer::setSpeedTimeLine
void setSpeedTimeLine(const std::vector< std::pair< SUMOTime, double > > &speedTimeLine)
Sets a new velocity timeline.
Definition: MSVehicle.cpp:387
MSVehicle::LCP_URGENT
Definition: MSVehicle.h:1225
MSVehicle::myJunctionConflictEntryTime
SUMOTime myJunctionConflictEntryTime
Definition: MSVehicle.h:1911
MSVehicle::VEH_SIGNAL_DOOR_OPEN_LEFT
One of the left doors is opened.
Definition: MSVehicle.h:1198
MSVehicle::LaneQ::currentLength
double currentLength
The length which may be driven on this lane.
Definition: MSVehicle.h:817
MSVehicle::myWaitingTime
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
Definition: MSVehicle.h:1823
MSVehicle::canReverse
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
MSVehicle::getTimeLoss
SUMOTime getTimeLoss() const
Returns the SUMOTime lost (speed was lesser maximum speed)
Definition: MSVehicle.h:638
MSVehicle::getBoundingPoly
PositionVector getBoundingPoly() const
get bounding polygon
Definition: MSVehicle.cpp:5503
MSVehicle::myCFVariables
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
Definition: MSVehicle.h:2076
MSVehicle::Influencer::myLaneTimeLine
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
Definition: MSVehicle.h:1608
MSVehicle::Influencer::myLatDist
double myLatDist
The requested lateral change.
Definition: MSVehicle.h:1617
MSVehicle::updateDriveItems
void updateDriveItems()
Check whether the drive items (myLFLinkLanes) are up to date, and update them if required.
Definition: MSVehicle.cpp:3281
MSVehicle::State::myPosLat
double myPosLat
the stored lateral position
Definition: MSVehicle.h:143
MSVehicle::getVelocityVector
Position getVelocityVector() const
Returns the vehicle's direction in radians.
Definition: MSVehicle.h:689
MSVehicle::Influencer::setSublaneChange
void setSublaneChange(double latDist)
Sets a new sublane-change request.
Definition: MSVehicle.cpp:422
MSDevice
Abstract in-vehicle / in-person device.
Definition: MSDevice.h:64
MSVehicle::getLaneChangeModel
MSAbstractLaneChangeModel & getLaneChangeModel()
Definition: MSVehicle.cpp:4609
MSVehicle::ignoreRed
bool ignoreRed(const MSLink *link, bool canBrake) const
decide whether a red (or yellow light) may be ignore
Definition: MSVehicle.cpp:5884
MSVehicle::getAngle
double getAngle() const
Returns the vehicle's direction in radians.
Definition: MSVehicle.h:681
MSVehicle::myBestLanes
std::vector< std::vector< LaneQ > > myBestLanes
Definition: MSVehicle.h:1859
MSVehicle::myCurrentLaneInBestLanes
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
Definition: MSVehicle.h:1864
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
MSVehicle::LaneQ::lane
MSLane * lane
The described lane.
Definition: MSVehicle.h:813
MSVehicle::Influencer::GapControlState::vehStateListener
static GapControlVehStateListener vehStateListener
Definition: MSVehicle.h:1420
MSVehicle::Stop::getEndPos
double getEndPos(const SUMOVehicle &veh) const
return halting position for upcoming stop;
Definition: MSVehicle.cpp:909
MSVehicle::Influencer::setRoutingMode
void setRoutingMode(int value)
Sets routing behavior.
Definition: MSVehicle.h:1554
MSVehicle::getHCEmissions
double getHCEmissions() const
Returns HC emission of the current state.
Definition: MSVehicle.cpp:5112
MSVehicle::Influencer::getSignals
int getSignals() const
Definition: MSVehicle.h:1585
MSVehicle::Stop::containerstop
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
Definition: MSVehicle.h:931
MSVehicle::Influencer::Influencer
Influencer()
Constructor.
Definition: MSVehicle.cpp:352
MSVehicle::DriveProcessItem::mySetRequest
bool mySetRequest
Definition: MSVehicle.h:1922
MSVehicle::myLastBestLanesInternalLane
const MSLane * myLastBestLanesInternalLane
Definition: MSVehicle.h:1852
MSVehicle::getStopIndices
std::vector< std::pair< int, double > > getStopIndices() const
return list of route indices for the remaining stops
Definition: MSVehicle.cpp:2055
MSGlobals.h
MSVehicle::Stop::lane
const MSLane * lane
The lane to stop at.
Definition: MSVehicle.h:927
MSVehicle::getSignals
int getSignals() const
Returns the signals.
Definition: MSVehicle.h:1249
MSVehicle::myStops
std::list< Stop > myStops
The vehicle's list of stops.
Definition: MSVehicle.h:1869
MSChargingStation
Definition: MSChargingStation.h:51
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:76
MSVehicle::Stop::edge
MSRouteIterator edge
The edge in the route to stop at.
Definition: MSVehicle.h:925
MSVehicle::LaneQ::occupation
double occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
Definition: MSVehicle.h:819
MSVehicle::LaneQ::allowsContinuation
bool allowsContinuation
Whether this lane allows to continue the drive.
Definition: MSVehicle.h:825
MSVehicle::workOnMoveReminders
void workOnMoveReminders(double oldPos, double newPos, double newSpeed)
Processes active move reminder.
Definition: MSVehicle.cpp:1218
MSVehicle::getRerouteOrigin
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
Definition: MSVehicle.cpp:1397
MSVehicle::getNOxEmissions
double getNOxEmissions() const
Returns NOx emission of the current state.
Definition: MSVehicle.cpp:5118
MSVehicle::getFurtherLanesPosLat
const std::vector< double > & getFurtherLanesPosLat() const
Definition: MSVehicle.h:796
MSVehicle::getLastStepDist
double getLastStepDist() const
Get the distance the vehicle covered in the previous timestep.
Definition: MSVehicle.h:404
MSVehicle::isLeader
bool isLeader(const MSLink *link, const MSVehicle *veh) const
whether the given vehicle must be followed at the given junction
Definition: MSVehicle.cpp:5944
MSVehicle::myLastActionTime
SUMOTime myLastActionTime
Action offset (actions are taken at time myActionOffset + N*getActionStepLength()) Initialized to 0,...
Definition: MSVehicle.h:1842
MSVehicle::myLane
MSLane * myLane
The lane the vehicle is on.
Definition: MSVehicle.h:1847
MSVehicle::LC_NOCONFLICT
Definition: MSVehicle.h:1216
MSVehicle::isStoppedInRange
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
MSBaseVehicle::getVehicleType
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
Definition: MSBaseVehicle.h:118
MSVehicle::loadState
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
Definition: MSVehicle.cpp:6058
MSVehicle::myEdgeWeights
MSEdgeWeightsStorage * myEdgeWeights
Definition: MSVehicle.h:2073
MSVehicle::Influencer::myEmergencyBrakeRedLight
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
Definition: MSVehicle.h:1635
MSVehicle::getAccumulatedWaitingSeconds
double getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs.
Definition: MSVehicle.h:667
MSVehicle::Influencer::GapControlState::GapControlState
GapControlState()
Definition: MSVehicle.cpp:281
MSVehicle::Influencer::myGapControlState
std::shared_ptr< GapControlState > myGapControlState
The gap control state.
Definition: MSVehicle.h:1611
MSVehicle::State::pos
double pos() const
Position of this state.
Definition: MSVehicle.h:110
MSVehicle::State::myLastCoveredDist
double myLastCoveredDist
Definition: MSVehicle.h:157
MSVehicle::myJunctionEntryTimeNeverYield
SUMOTime myJunctionEntryTimeNeverYield
Definition: MSVehicle.h:1910
MSVehicle::getLaneIndex
int getLaneIndex() const
Definition: MSVehicle.cpp:5233
MSVehicle::Influencer::mySublaneLC
LaneChangeMode mySublaneLC
changing to the prefered lateral alignment
Definition: MSVehicle.h:1657
MSVehicle::Influencer::GapControlState::init
static void init()
Static initalization (adds vehicle state listener)
Definition: MSVehicle.cpp:292
MSVehicle::VEH_SIGNAL_BACKDRIVE
The backwards driving lights are on (no visualisation)
Definition: MSVehicle.h:1194
MSVehicle::State::lastCoveredDist
double lastCoveredDist() const
previous Speed of this state
Definition: MSVehicle.h:130
MSVehicle::Influencer::myConsiderMaxDeceleration
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
Definition: MSVehicle.h:1629
MSVehicle::setRemoteState
void setRemoteState(Position xyPos)
sets position outside the road network
Definition: MSVehicle.cpp:5854
MSVehicle::DriveProcessItem::myArrivalSpeed
double myArrivalSpeed
Definition: MSVehicle.h:1924
MSVehicle::myCachedPosition
Position myCachedPosition
Definition: MSVehicle.h:1906
MSVehicle::myAmRegisteredAsWaitingForContainer
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition)
Definition: MSVehicle.h:1893
MSVehicle::Influencer::getRoutingMode
int getRoutingMode() const
return the current routing mode
Definition: MSVehicle.h:1469
MSVehicle::basePos
double basePos(const MSEdge *edge) const
departure position where the vehicle fits fully onto the edge (if possible)
Definition: MSVehicle.cpp:2088
MSVehicle::setAngle
void setAngle(double angle, bool straightenFurther=false)
Set a custom vehicle angle in rad, optionally updates furtherLanePosLat.
Definition: MSVehicle.cpp:1410
MSVehicle::Influencer::GapControlState::addGapCurrent
double addGapCurrent
Current, interpolated value for the desired space headway.
Definition: MSVehicle.h:1393
MSVehicle::Influencer::~Influencer
~Influencer()
Destructor.
Definition: MSVehicle.cpp:374
MSVehicle::Stop::pars
const SUMOVehicleParameter::Stop pars
The stop parameter.
Definition: MSVehicle.h:937
MSVehicle::Influencer::isRemoteControlled
bool isRemoteControlled() const
Definition: MSVehicle.cpp:792
MSVehicle::Influencer::GapControlState::refVehMap
static std::map< const MSVehicle *, GapControlState * > refVehMap
stores reference vehicles currently in use by a gapController
Definition: MSVehicle.h:1417
MSVehicle::WaitingTimeCollector::cumulatedWaitingTime
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
Definition: MSVehicle.cpp:195
MSVehicle::activateReminders
void activateReminders(const MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
"Activates" all current move reminder
Definition: MSVehicle.cpp:4362
MSVehicle::Influencer::myRemotePosLat
double myRemotePosLat
Definition: MSVehicle.h:1640
MSVehicle::myAngle
double myAngle
the angle in radians (
Definition: MSVehicle.h:1898
MSVehicle::Stop
Definition of vehicle stop (position and duration)
Definition: MSVehicle.h:921
SUMOAbstractRouter< MSEdge, SUMOVehicle >
MSVehicle::getLane
MSLane * getLane() const
Returns the lane the vehicle is on.
Definition: MSVehicle.h:561
MSVehicle::getStopEdges
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
MSVehicle::WaitingTimeCollector::appendWaitingTime
void appendWaitingTime(SUMOTime dt)
append an amount of dt millisecs to the stored waiting times
DepartLaneDefinition
DepartLaneDefinition
Possible ways to choose a lane on depart.
Definition: SUMOVehicleParameter.h:112
MSVehicle::Influencer::GapControlState::addGapTarget
double addGapTarget
Target value for the desired space headway.
Definition: MSVehicle.h:1395
MSVehicle::VEH_SIGNAL_EMERGENCY_BLUE
A blue emergency light is on.
Definition: MSVehicle.h:1202
MSVehicle::Influencer::GapControlState::tauOriginal
double tauOriginal
Original value for the desired headway (will be reset after duration has expired)
Definition: MSVehicle.h:1387
MSVehicle::Influencer::GapControlState
Container for state and parameters of the gap control.
Definition: MSVehicle.h:1375
MSVehicle::setBrakingSignals
void setBrakingSignals(double vNext)
sets the braking lights on/off
Definition: MSVehicle.cpp:3435
MSVehicle::processLaneAdvances
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
MSBaseVehicle::addStops
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Definition: MSBaseVehicle.cpp:559
MSVehicle::willStop
bool willStop() const
Returns whether the vehicle will stop on the current edge.
Definition: MSVehicle.cpp:1757
MSVehicle::LCP_NOOVERLAP
Definition: MSVehicle.h:1224
MSVehicle::Stop::chargingStation
MSStoppingPlace * chargingStation
(Optional) charging station if one is assigned to the stop
Definition: MSVehicle.h:935
MSVehicle::getInfluencer
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Definition: MSVehicle.cpp:5817
MSVehicle::adaptBestLanesOccupation
void adaptBestLanesOccupation(int laneIndex, double density)
update occupation from MSLaneChanger
Definition: MSVehicle.cpp:5026
MSVehicle::DriveProcessItem::myVLinkWait
double myVLinkWait
Definition: MSVehicle.h:1921
MSVehicle::DriveProcessItem::myDistance
double myDistance
Definition: MSVehicle.h:1927
MSVehicle::State::myPos
double myPos
the stored position
Definition: MSVehicle.h:137
MSVehicle::WaitingTimeCollector::getMemorySize
SUMOTime getMemorySize() const
Definition: MSVehicle.h:193
MSVehicle::myState
State myState
This Vehicles driving state (pos and speed)
Definition: MSVehicle.h:1833
MSVehicle::Influencer::implicitDeltaPosRemote
double implicitDeltaPosRemote(const MSVehicle *veh)
return the change in longitudinal position that is implicit in the new remote position
Definition: MSVehicle.cpp:875
MSVehicle::myActionStep
bool myActionStep
The flag myActionStep indicates whether the current time step is an action point for the vehicle.
Definition: MSVehicle.h:1839
MSVehicle::Stop::numExpectedContainer
int numExpectedContainer
The number of still expected containers.
Definition: MSVehicle.h:949
MSVehicle::myAcceleration
double myAcceleration
The current acceleration after dawdling in m/s.
Definition: MSVehicle.h:1872
MSVehicle::getWeightsStorage
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle's internal edge travel times/efforts container.
Definition: MSVehicle.cpp:1196
MSVehicle::VEH_SIGNAL_BRAKELIGHT
The brake lights are on.
Definition: MSVehicle.h:1186
MSVehicle::Influencer::setRemoteControlled
void setRemoteControlled(Position xyPos, MSLane *l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector &route, SUMOTime t)
Definition: MSVehicle.cpp:779
MSVehicle::LaneQ::bestContinuations
std::vector< MSLane * > bestContinuations
Definition: MSVehicle.h:831
MSVehicle::congested
bool congested() const
Definition: MSVehicle.h:718
MSVehicle::getFurtherLanes
const std::vector< MSLane * > & getFurtherLanes() const
Definition: MSVehicle.h:792
MSVehicle::MSVehicle
MSVehicle()
invalidated default constructor
MSVehicle::updateTimeLoss
void updateTimeLoss(double vNext)
Updates the vehicle's time loss.
Definition: MSVehicle.cpp:3466
MSCFModel::VehicleVariables
Definition: MSCFModel.h:61
MSVehicle::myTimeLoss
double myTimeLoss
the time loss in seconds due to driving with less than maximum speed
Definition: MSVehicle.h:1830
MSVehicle::WaitingTimeCollector::myWaitingIntervals
waitingIntervalList myWaitingIntervals
Definition: MSVehicle.h:209
MSVehicle::passingMinor
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
Definition: MSVehicle.cpp:5928
MSVehicle::adaptToLeaders
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
MSVehicleType::getActionStepLengthSecs
double getActionStepLengthSecs() const
Returns this type's default action step length in seconds.
Definition: MSVehicleType.h:226
MSVehicle::DriveProcessItem::adaptLeaveSpeed
void adaptLeaveSpeed(const double v)
Definition: MSVehicle.h:1958
MSVehicle::updateWaitingTime
void updateWaitingTime(double vNext)
Updates the vehicle's waiting time counters (accumulated and consecutive)
Definition: MSVehicle.cpp:3454
MSVehicle::DriveProcessItem::myArrivalSpeedBraking
double myArrivalSpeedBraking
Definition: MSVehicle.h:1926
MSGlobals::gWaitingTimeMemory
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
Definition: MSGlobals.h:109
MSVehicle::resetRoutePosition
void resetRoutePosition(int index, DepartLaneDefinition departLaneProcedure)
Definition: MSVehicle.cpp:1186
MSVehicle::isActionStep
bool isActionStep(SUMOTime t) const
Returns whether the next simulation step will be an action point for the vehicle.
Definition: MSVehicle.h:598
MSVehicle::checkRewindLinkLanes
void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector &lfLinks) const
runs heuristic for keeping the intersection clear in case of downstream jamming
Definition: MSVehicle.cpp:4111
MSVehicle::Influencer::myRespectJunctionPriority
bool myRespectJunctionPriority
Whether the junction priority rules are respected.
Definition: MSVehicle.h:1632
MSVehicle::myLaneChangeModel
MSAbstractLaneChangeModel * myLaneChangeModel
Definition: MSVehicle.h:1849
MSVehicle::addTraciStop
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
MSVehicle::lateralDistanceToLane
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
MSVehicle::Influencer::setLaneChangeMode
void setLaneChangeMode(int value)
Sets lane changing behavior.
Definition: MSVehicle.cpp:768
MSVehicle::getElectricityConsumption
double getElectricityConsumption() const
Returns electricity consumption of the current state.
Definition: MSVehicle.cpp:5136
MSVehicle::getRoutePosition
int getRoutePosition() const
Definition: MSVehicle.cpp:1180
MSVehicle::checkLinkLeader
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
MSVehicle::getRightSideOnEdge
double getRightSideOnEdge(const MSLane *lane=0) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0)
Definition: MSVehicle.cpp:5256
MSVehicle::Influencer::setSignals
void setSignals(int signals)
Definition: MSVehicle.h:1581
MSVehicle::resetActionOffset
void resetActionOffset(const SUMOTime timeUntilNextAction=0)
Resets the action offset for the vehicle.
Definition: MSVehicle.cpp:2110
MSVehicle::Influencer::isRemoteAffected
bool isRemoteAffected(SUMOTime t) const
Definition: MSVehicle.cpp:798
MSVehicle::getRightSideOnLane
double getRightSideOnLane() const
Get the vehicle's lateral position on the lane:
Definition: MSVehicle.cpp:5250
MSVehicle::DriveProcessItem::getLeaveSpeed
double getLeaveSpeed() const
Definition: MSVehicle.h:1965
MSVehicle::Influencer::GapControlState::spaceHeadwayIncrement
double spaceHeadwayIncrement
Definition: MSVehicle.h:1414
MSVehicle::Influencer::GapControlState::activate
void activate(double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel, const MSVehicle *refVeh)
Start gap control with given params.
Definition: MSVehicle.cpp:309
MSVehicle::myInfluencer
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
Definition: MSVehicle.h:2079
MSVehicle::processLinkApproaches
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
MSVehicle::Influencer::GapControlState::~GapControlState
virtual ~GapControlState()
Definition: MSVehicle.cpp:287
MSBaseVehicle
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:52
MSVehicle::getBestLanesContinuation
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
Definition: MSVehicle.cpp:4987
MSVehicle::Stop::triggered
bool triggered
whether an arriving person lets the vehicle continue
Definition: MSVehicle.h:941
MSVehicle::WaitingTimeCollector::WaitingTimeCollector
WaitingTimeCollector(SUMOTime memory=MSGlobals::gWaitingTimeMemory)
Constructor.
Definition: MSVehicle.cpp:176
MSVehicle::setApproachingForAllLinks
void setApproachingForAllLinks(const SUMOTime t)
Register junction approaches for all link items in the current plan.
Definition: MSVehicle.cpp:4315
MSVehicle::signalSet
bool signalSet(int which) const
Returns whether the given signal is on.
Definition: MSVehicle.h:1258
MSVehicle::State::posLat
double posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
Definition: MSVehicle.h:120
MSVehicle::Influencer::getLaneChangeMode
int getLaneChangeMode() const
return the current lane change mode
Definition: MSVehicle.cpp:437
MSVehicle::Influencer::GapControlState::deactivate
void deactivate()
Stop gap control.
Definition: MSVehicle.cpp:339
MSVehicle::getFuelConsumption
double getFuelConsumption() const
Returns fuel consumption of the current state.
Definition: MSVehicle.cpp:5130
MSVehicleType::getMaxSpeed
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
Definition: MSVehicleType.h:162
MSVehicle::checkLinkLeaderCurrentAndParallel
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
MSVehicle::getAcceleration
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
Definition: MSVehicle.h:494
MSVehicle::VEH_SIGNAL_DOOR_OPEN_RIGHT
One of the right doors is opened.
Definition: MSVehicle.h:1200
MSVehicle::Influencer::influenceChangeDecision
int influenceChangeDecision(const SUMOTime currentTime, const MSEdge &currentEdge, const int currentLaneIndex, int state)
Applies stored LaneChangeMode information and laneTimeLine.
Definition: MSVehicle.cpp:655
MSVehicle::computeAngle
double computeAngle() const
compute the current vehicle angle
Definition: MSVehicle.cpp:1450
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:57
MSVehicle::Influencer::mySpeedTimeLine
std::vector< std::pair< SUMOTime, double > > mySpeedTimeLine
The velocity time line to apply.
Definition: MSVehicle.h:1605
MSVehicle::setEmergencyBlueLight
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5219
MSVehicle::getWaitingTime
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:625
MSVehicle::Influencer::GapControlState::gapAttained
bool gapAttained
Whether the desired gap was attained during the current activity phase (induces the remaining duratio...
Definition: MSVehicle.h:1408
config.h
MSVehicle::VEH_SIGNAL_EMERGENCY_YELLOW
A yellow emergency light is on.
Definition: MSVehicle.h:1206
MSVehicle::State::backPos
double backPos() const
back Position of this state
Definition: MSVehicle.h:125
MSAbstractLaneChangeModel
Interface for lane-change models.
Definition: MSAbstractLaneChangeModel.h:46
MSVehicle::validatePosition
Position validatePosition(Position result, double offset=0) const
ensure that a vehicle-relative position is not invalid
Definition: MSVehicle.cpp:1376
MSVehicle::WaitingTimeCollector::operator!=
bool operator!=(const WaitingTimeCollector &wt) const
Operator !=.
MSVehicle::Influencer::getLatDist
double getLatDist() const
Definition: MSVehicle.h:1589
MSVehicle::updateFurtherLanes
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
MSVehicle::getSpeed
double getSpeed() const
Returns the vehicle's current speed.
Definition: MSVehicle.h:477
MSVehicle::Influencer::GapControlState::changeRate
double changeRate
Rate by which the current time and space headways are changed towards the target value....
Definition: MSVehicle.h:1400
MSVehicle::Influencer::getLaneTimeLineDuration
SUMOTime getLaneTimeLineDuration()
Definition: MSVehicle.cpp:447
MSVehicle::Influencer::getLaneTimeLineEnd
SUMOTime getLaneTimeLineEnd()
Definition: MSVehicle.cpp:460
MSVehicle::Influencer::gapControlSpeed
double gapControlSpeed(SUMOTime currentTime, const SUMOVehicle *veh, double speed, double vSafe, double vMin, double vMax)
Applies gap control logic on the speed.
Definition: MSVehicle.cpp:502
MSVehicle::Influencer::GapControlState::cleanup
static void cleanup()
Static cleanup (removes vehicle state listener)
Definition: MSVehicle.cpp:303
MSVehicle::setActionStepLength
void setActionStepLength(double actionStepLength, bool resetActionOffset=true)
Sets the action steplength of the vehicle.
Definition: MSVehicle.cpp:1433
MSVehicle::replaceRoute
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
MSVehicle::getLateralOverlap
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it's primary lane
Definition: MSVehicle.cpp:5416
MSVehicle::DriveProcessItem::hadStoppedVehicle
bool hadStoppedVehicle
Definition: MSVehicle.h:1929
MSVehicle::Influencer::GapControlState::referenceVeh
const MSVehicle * referenceVeh
reference vehicle for the gap - if it is null, the current leader on the ego's lane is used as a refe...
Definition: MSVehicle.h:1404
MSVehicle::Stop::containerTriggered
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: MSVehicle.h:943
MSVehicle::Influencer::deactivateGapController
void deactivateGapController()
Deactivates the gap control.
Definition: MSVehicle.cpp:401
MSVehicle::ChangeRequest
ChangeRequest
Requests set via TraCI.
Definition: MSVehicle.h:219
MSVehicle::isFrontOnLane
bool isFrontOnLane(const MSLane *lane) const
Returns the information whether the front of the vehicle is on the given lane.
Definition: MSVehicle.cpp:4082
MSVehicle::getNextParkingArea
MSParkingArea * getNextParkingArea()
get the upcoming parking area stop or nullptr
Definition: MSVehicle.cpp:1727
MSLane.h
MSVehicle::drawOutsideNetwork
virtual void drawOutsideNetwork(bool)
register vehicle for drawing while outside the network
Definition: MSVehicle.h:1823
MSVehicle::getCurrentParkingArea
MSParkingArea * getCurrentParkingArea()
get the current parking area stop or nullptr
Definition: MSVehicle.cpp:1741
MSVehicle::estimateLeaveSpeed
double estimateLeaveSpeed(const MSLink *const link, const double vLinkPass) const
estimate leaving speed when accelerating across a link
Definition: MSVehicle.h:1998
MSLane::getVehicleMaxSpeed
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition: MSLane.h:519
MSVehicle::Influencer::changeRequestRemainingSeconds
double changeRequestRemainingSeconds(const SUMOTime currentTime) const
Return the remaining number of seconds of the current laneTimeLine assuming one exists.
Definition: MSVehicle.cpp:750
MSVehicle::adaptToLeader
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
MSVehicle::Influencer::getRespectJunctionPriority
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
Definition: MSVehicle.h:1523
MSBaseVehicle.h
MSBaseVehicle::myType
MSVehicleType * myType
This vehicle's type.
Definition: MSBaseVehicle.h:499
MSCFModel::estimateSpeedAfterDistance
double estimateSpeedAfterDistance(const double dist, const double v, const double accel) const
Definition: MSCFModel.cpp:703
MSVehicle::onFurtherEdge
bool onFurtherEdge(const MSEdge *edge) const
whether this vehicle has its back (and no its front) on the given edge
Definition: MSVehicle.cpp:5539
MSGlobals::gSemiImplicitEulerUpdate
static bool gSemiImplicitEulerUpdate
Definition: MSGlobals.h:56
MSVehicle::WaitingTimeCollector::operator=
WaitingTimeCollector & operator=(const WaitingTimeCollector &wt)
Assignment operator.
Definition: MSVehicle.cpp:181
MSVehicle::nextStopDist
double nextStopDist() const
return the distance to the next stop or doubleMax if there is none.
Definition: MSVehicle.h:1047
MSVehicle::Influencer::myRemoteEdgeOffset
int myRemoteEdgeOffset
Definition: MSVehicle.h:1642
MSVehicle::Influencer::setSpeedMode
void setSpeedMode(int speedMode)
Sets speed-constraining behaviors.
Definition: MSVehicle.cpp:758
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57
MSVehicle::WaitingTimeCollector
Stores the waiting intervals over the previous seconds (memory is to be specified in ms....
Definition: MSVehicle.h:165
MSVehicle::LaneQ::nextOccupation
double nextOccupation
As occupation, but without the first lane.
Definition: MSVehicle.h:821
MSVehicle::enterLaneAtLaneChange
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
Definition: MSVehicle.cpp:4448
MSVehicle::Influencer::GapControlVehStateListener
A static instance of this class in GapControlState deactivates gap control for vehicles whose referen...
Definition: MSVehicle.h:1363
MSMoveReminder::Notification
Notification
Definition of a vehicle state.
Definition: MSMoveReminder.h:89
MSVehicle::getCO2Emissions
double getCO2Emissions() const
Returns CO2 emission of the current state.
Definition: MSVehicle.cpp:5100
MSVehicle::checkActionStep
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
MSVehicle::~MSVehicle
virtual ~MSVehicle()
Destructor.
Definition: MSVehicle.cpp:1033
MSVehicle::LCP_OPPORTUNISTIC
Definition: MSVehicle.h:1226
MSVehicle::updateState
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
MSVehicle::isStoppedTriggered
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
Definition: MSVehicle.cpp:1800
MSVehicle::myDriverState
MSDevice_DriverState * myDriverState
This vehicle's driver state.
Definition: MSVehicle.h:1836
MSVehicle::Influencer::ignoreOverlap
bool ignoreOverlap() const
Definition: MSVehicle.h:1597
MSVehicle::getDeltaPos
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
MSVehicle::rerouteParkingArea
bool rerouteParkingArea(const std::string &parkingAreaID, std::string &errorMsg)
Definition: MSVehicle.cpp:5549
MSVehicle::Influencer::myLastRemoteAccess
SUMOTime myLastRemoteAccess
Definition: MSVehicle.h:1644
MSVehicle::getPositionAlongBestLanes
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
MSVehicle::unsafeLinkAhead
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
SUMOVehicleParameter::Stop
Definition of vehicle stop (position and duration)
Definition: SUMOVehicleParameter.h:566
MSVehicle::DriveProcessItem
Drive process items represent bounds on the safe velocity corresponding to the upcoming links.
Definition: MSVehicle.h:1918
MSVehicle::getWaitingSeconds
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:657
MSVehicle::replaceParkingArea
bool replaceParkingArea(MSParkingArea *parkingArea, std::string &errorMsg)
replace the current parking area stop with a new stop with merge duration
Definition: MSVehicle.cpp:1690
MSVehicle::State::operator=
State & operator=(const State &state)
Assignment operator.
Definition: MSVehicle.cpp:145
MSVehicle::Stop::timeToLoadNextContainer
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Definition: MSVehicle.h:953
MSVehicle::hasStops
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
Definition: MSVehicle.h:995
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
MSVehicle::getDistanceToPosition
double getDistanceToPosition(double destPos, const MSEdge *destEdge) const
Definition: MSVehicle.cpp:5042
MSVehicle::myNextDriveItem
DriveItemVector::iterator myNextDriveItem
iterator pointing to the next item in myLFLinkLanes
Definition: MSVehicle.h:1985
MSVehicle::getMaxSpeedOnLane
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation,...
Definition: MSVehicle.h:571