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 /****************************************************************************/
23 // Representation of a vehicle in the micro simulation
24 /****************************************************************************/
25 #ifndef MSVehicle_h
26 #define MSVehicle_h
27 
28 
29 // ===========================================================================
30 // included modules
31 // ===========================================================================
32 #include <config.h>
33 
34 #include <list>
35 #include <deque>
36 #include <map>
37 #include <set>
38 #include <string>
39 #include <vector>
40 #include <memory>
41 #include "MSGlobals.h"
42 #include "MSVehicleType.h"
43 #include "MSBaseVehicle.h"
44 #include "MSLink.h"
45 #include "MSLane.h"
46 #include "MSNet.h"
47 
48 #define INVALID_SPEED 299792458 + 1 // nothing can go faster than the speed of light! Refs. #2577
49 
50 // ===========================================================================
51 // class declarations
52 // ===========================================================================
53 class SUMOSAXAttributes;
54 class MSMoveReminder;
55 class MSLaneChanger;
56 class MSVehicleTransfer;
58 class MSStoppingPlace;
59 class MSChargingStation;
60 class MSParkingArea;
61 class MSPerson;
62 class MSDevice;
64 class OutputDevice;
65 class Position;
66 class MSContainer;
67 class MSJunction;
68 class MSLeaderInfo;
71 
72 // ===========================================================================
73 // class definitions
74 // ===========================================================================
79 class MSVehicle : public MSBaseVehicle {
80 public:
81 
83  friend class MSLaneChanger;
84  friend class MSLaneChangerSublane;
85 
89  class State {
91  friend class MSVehicle;
92  friend class MSLaneChanger;
93  friend class MSLaneChangerSublane;
94 
95  public:
97  State(double pos, double speed, double posLat, double backPos);
98 
100  State(const State& state);
101 
103  State& operator=(const State& state);
104 
106  bool operator!=(const State& state);
107 
109  double pos() const {
110  return myPos;
111  }
112 
114  double speed() const {
115  return mySpeed;
116  };
117 
119  double posLat() const {
120  return myPosLat;
121  }
122 
124  double backPos() const {
125  return myBackPos;
126  }
127 
129  double lastCoveredDist() const {
130  return myLastCoveredDist;
131  }
132 
133 
134  private:
136  double myPos;
137 
139  double mySpeed;
140 
142  double myPosLat;
143 
145  // if the vehicle occupies multiple lanes, this is the position relative
146  // to the lane occupied by its back
147  double myBackPos;
148 
151 
157 
158  };
159 
160 
165  friend class MSVehicle;
166 
167  typedef std::list<std::pair<SUMOTime, SUMOTime> > waitingIntervalList;
168 
169  public:
172 
175 
178 
180  bool operator!=(const WaitingTimeCollector& wt) const;
181 
184 
185  // return the waiting time within the last memory millisecs
186  SUMOTime cumulatedWaitingTime(SUMOTime memory = -1) const;
187 
188  // process time passing for dt millisecs
189  void passTime(SUMOTime dt, bool waiting);
190 
191  // maximal memory time stored
193  return myMemorySize;
194  }
195 
196  // maximal memory time stored
198  return myWaitingIntervals;
199  }
200 
201  private:
204 
209 
211  void appendWaitingTime(SUMOTime dt);
212  };
213 
214 
227  };
228 
236  MSVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
237  MSVehicleType* type, const double speedFactor);
238 
240  virtual ~MSVehicle();
241 
242 
244 
245 
255 
256 
257 
259 
260 
264  bool hasArrived() const;
265 
276  bool replaceRoute(const MSRoute* route, const std::string& info, bool onInit = false, int offset = 0, bool addStops = true, bool removeStops = true);
277 
286 
287 
289 
290 
308  void workOnMoveReminders(double oldPos, double newPos, double newSpeed);
310 
311 
317  bool checkActionStep(const SUMOTime t);
318 
324  void resetActionOffset(const SUMOTime timeUntilNextAction = 0);
325 
326 
336  void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength);
337 
338 
356  void planMove(const SUMOTime t, const MSLeaderInfo& ahead, const double lengthsInFront);
357 
360  void setApproachingForAllLinks(const SUMOTime t);
361 
362 
375  bool executeMove();
376 
383  double getDeltaPos(const double accel) const;
384 
385 
387 
388 
392  double getPositionOnLane() const {
393  return myState.myPos;
394  }
395 
399  double getLastStepDist() const {
400  return myState.lastCoveredDist();
401  }
402 
406  double getPositionOnLane(const MSLane* lane) const;
407 
416  double getBackPositionOnLane(const MSLane* lane) const;
417 
421  double getBackPositionOnLane() const {
423  }
424 
429  double getLateralPositionOnLane() const {
430  return myState.myPosLat;
431  }
432 
433  void setLateralPositionOnLane(double posLat) {
434  myState.myPosLat = posLat;
435  }
436 
441  double getRightSideOnLane() const;
442 
446  double lateralDistanceToLane(const int offset) const;
447 
449  double getLateralOverlap() const;
450  double getLateralOverlap(double posLat) const;
451 
457  double getRightSideOnEdge(const MSLane* lane = 0) const;
458 
464  double getCenterOnEdge(const MSLane* lane = 0) const;
465 
471  double getLatOffset(const MSLane* lane) const;
472 
476  double getSpeed() const {
477  return myState.mySpeed;
478  }
479 
480 
484  double getPreviousSpeed() const {
485  return myState.myPreviousSpeed;
486  }
487 
488 
493  double getAcceleration() const {
494  return myAcceleration;
495  }
496 
498  double getCurrentApparentDecel() const;
499 
505  return myType->getActionStepLength();
506  }
507 
512  double getActionStepLengthSecs() const {
514  }
515 
516 
521  return myLastActionTime;
522  }
523 
525 
526 
527 
529 
530 
534  double getSlope() const;
535 
536 
544  Position getPosition(const double offset = 0) const;
545 
546 
554  Position getPositionAlongBestLanes(double offset) const;
555 
556 
560  MSLane* getLane() const {
561  return myLane;
562  }
563 
564 
569  double
571  if (myLane != 0) {
572  return myLane->getVehicleMaxSpeed(this);
573  } else {
574  return myType->getMaxSpeed();
575  }
576  }
577 
578 
582  inline bool isOnRoad() const {
583  return myAmOnNet;
584  }
585 
586 
590  inline bool isActive() const {
591  return myActionStep;
592  }
593 
597  inline bool isActionStep(SUMOTime t) const {
598  return (t - myLastActionTime) % getActionStepLength() == 0;
599 // return t%getActionStepLength() == 0; // synchronized actions for all vehicles with identical actionsteplengths
600  }
601 
602 
606  bool isFrontOnLane(const MSLane* lane) const;
607 
608 
615  const MSEdge* getRerouteOrigin() const;
616 
617 
625  return myWaitingTime;
626  }
627 
638  return TIME2STEPS(myTimeLoss);
639  }
640 
641 
648  }
649 
656  double getWaitingSeconds() const {
657  return STEPS2TIME(myWaitingTime);
658  }
659 
660 
668  }
669 
672  double getTimeLossSeconds() const {
673  return myTimeLoss;
674  }
675 
676 
680  double getAngle() const {
681  return myAngle;
682  }
683 
684 
689  return Position(std::cos(myAngle) * myState.speed(), std::sin(myAngle) * myState.speed());
690  }
692 
694  double computeAngle() const;
695 
697  void setAngle(double angle, bool straightenFurther = false);
698 
705  void setActionStepLength(double actionStepLength, bool resetActionOffset = true);
706 
708  static bool overlap(const MSVehicle* veh1, const MSVehicle* veh2) {
709  if (veh1->myState.myPos < veh2->myState.myPos) {
710  return veh2->myState.myPos - veh2->getVehicleType().getLengthWithGap() < veh1->myState.myPos;
711  }
712  return veh1->myState.myPos - veh1->getVehicleType().getLengthWithGap() < veh2->myState.myPos;
713  }
714 
717  bool congested() const {
718  return myState.mySpeed < double(60) / double(3.6);
719  }
720 
721 
733  void activateReminders(const MSMoveReminder::Notification reason, const MSLane* enteredLane = 0);
734 
741  bool enterLaneAtMove(MSLane* enteredLane, bool onTeleporting = false);
742 
743 
744 
753  void enterLaneAtInsertion(MSLane* enteredLane, double pos, double speed, double posLat,
754  MSMoveReminder::Notification notification);
755 
760  void setTentativeLaneAndPosition(MSLane* lane, double pos, double posLat = 0);
761 
766  void enterLaneAtLaneChange(MSLane* enteredLane);
767 
768 
770  void leaveLane(const MSMoveReminder::Notification reason, const MSLane* approachedLane = 0);
771 
778  void updateDriveItems();
779 
783  const std::pair<double, LinkDirection>& getNextTurn() {
784  return myNextTurn;
785  }
786 
787 
790 
791  const std::vector<MSLane*>& getFurtherLanes() const {
792  return myFurtherLanes;
793  }
794 
795  const std::vector<double>& getFurtherLanesPosLat() const {
796  return myFurtherLanesPosLat;
797  }
798 
799 
801  bool onFurtherEdge(const MSEdge* edge) const;
802 
805 
806  //
810  struct LaneQ {
814  double length;
818  double occupation;
825  /* @brief Longest sequence of (normal-edge) lanes that can be followed without a lane change
826  * The 'length' attribute is the sum of these lane lengths
827  * (There may be alternative sequences that have equal length)
828  * It is the 'best' in the strategic sense of reducing required lane-changes
829  */
830  std::vector<MSLane*> bestContinuations;
831  };
832 
836  const std::vector<LaneQ>& getBestLanes() const;
837 
855  void updateBestLanes(bool forceRebuild = false, const MSLane* startLane = 0);
856 
857 
861  const std::vector<MSLane*>& getBestLanesContinuation() const;
862 
863 
867  const std::vector<MSLane*>& getBestLanesContinuation(const MSLane* const l) const;
868 
869  /* @brief returns the current signed offset from the lane that is most
870  * suited for continuing the current route (in the strategic sense of reducing lane-changes)
871  * - 0 if the vehicle is one it's best lane
872  * - negative if the vehicle should change to the right
873  * - positive if the vehicle should change to the left
874  */
875  int getBestLaneOffset() const;
876 
878  void adaptBestLanesOccupation(int laneIndex, double density);
879 
881 
883  void fixPosition();
884 
885 
893  inline const MSCFModel& getCarFollowModel() const {
894  return myType->getCarFollowModel();
895  }
896 
903  std::shared_ptr<MSSimpleDriverState> getDriverState() const;
904 
905 
911  return myCFVariables;
912  }
913 
915 
916 
920  class Stop {
921  public:
922  Stop(const SUMOVehicleParameter::Stop& par) : pars(par) {}
926  const MSLane* lane = nullptr;
940  bool triggered = false;
942  bool containerTriggered = false;
944  bool reached = false;
954  bool collision = false;
957 
959  void write(OutputDevice& dev) const;
960 
962  double getEndPos(const SUMOVehicle& veh) const;
963 
965  std::string getDescription() const;
966 
967  private:
969  Stop& operator=(const Stop& src);
970 
971  };
972 
973 
980  bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0, bool collision = false,
981  MSRouteIterator* searchStart = 0);
982 
985  bool replaceParkingArea(MSParkingArea* parkingArea, std::string& errorMsg);
986 
990 
993 
997  bool hasStops() const {
998  return !myStops.empty();
999  }
1000 
1003  inline bool hasDriverState() const {
1004  return myDriverState != nullptr;
1005  }
1006 
1010  bool isStopped() const;
1011 
1014 
1016  bool stopsAt(MSStoppingPlace* stop) const;
1017 
1019  bool stopsAtEdge(const MSEdge* edge) const;
1020 
1023  bool willStop() const;
1024 
1026  bool isStoppedOnLane() const;
1027 
1029  bool keepStopping(bool afterProcessing = false) const;
1030 
1034  SUMOTime collisionStopTime() const;
1035 
1039  bool isParking() const;
1040 
1044  bool isRemoteControlled() const;
1045 
1049  bool wasRemoteControlled(SUMOTime lookBack = DELTA_T) const;
1050 
1052  double nextStopDist() const {
1053  return myStopDist;
1054  }
1055 
1059  bool isStoppedTriggered() const;
1060 
1063  bool isStoppedInRange(const double pos, const double tolerance) const;
1065 
1066  int getLaneIndex() const;
1067 
1077  double getDistanceToPosition(double destPos, const MSEdge* destEdge) const;
1078 
1079 
1087  double processNextStop(double currentVelocity);
1088 
1096  std::pair<const MSVehicle* const, double> getLeader(double dist = 0) const;
1097 
1104  double getTimeGapOnLane() const;
1105 
1107 
1108 
1112  double getCO2Emissions() const;
1113 
1114 
1118  double getCOEmissions() const;
1119 
1120 
1124  double getHCEmissions() const;
1125 
1126 
1130  double getNOxEmissions() const;
1131 
1132 
1136  double getPMxEmissions() const;
1137 
1138 
1142  double getFuelConsumption() const;
1143 
1144 
1148  double getElectricityConsumption() const;
1149 
1150 
1154  double getHarmonoise_NoiseEmissions() const;
1156 
1158 
1159 
1163  void addPerson(MSTransportable* person);
1164 
1166 
1167 
1171  void addContainer(MSTransportable* container);
1172 
1175 
1179  enum Signalling {
1210  };
1211 
1212 
1218  LC_NEVER = 0, // lcModel shall never trigger changes at this level
1219  LC_NOCONFLICT = 1, // lcModel may trigger changes if not in conflict with TraCI request
1220  LC_ALWAYS = 2 // lcModel may always trigger changes of this level regardless of requests
1221  };
1222 
1223 
1226  LCP_ALWAYS = 0, // change regardless of blockers, adapt own speed and speed of blockers
1227  LCP_NOOVERLAP = 1, // change unless overlapping with blockers, adapt own speed and speed of blockers
1228  LCP_URGENT = 2, // change if not blocked, adapt own speed and speed of blockers
1229  LCP_OPPORTUNISTIC = 3 // change if not blocked
1230  };
1231 
1232 
1236  void switchOnSignal(int signal) {
1237  mySignals |= signal;
1238  }
1239 
1240 
1244  void switchOffSignal(int signal) {
1245  mySignals &= ~signal;
1246  }
1247 
1248 
1252  int getSignals() const {
1253  return mySignals;
1254  }
1255 
1256 
1261  bool signalSet(int which) const {
1262  return (mySignals & which) != 0;
1263  }
1265 
1266 
1268  bool unsafeLinkAhead(const MSLane* lane) const;
1269 
1271  bool passingMinor() const;
1272 
1273 
1274 
1282  double getSpeedWithoutTraciInfluence() const;
1283 
1288  bool rerouteParkingArea(const std::string& parkingAreaID, std::string& errorMsg);
1289 
1302  bool addTraciStop(MSLane* const lane, const double startPos, const double endPos, const SUMOTime duration, const SUMOTime until,
1303  const bool parking, const bool triggered, const bool containerTriggered, std::string& errorMsg);
1304 
1316  bool addTraciStopAtStoppingPlace(const std::string& stopId, const SUMOTime duration, const SUMOTime until, const bool parking,
1317  const bool triggered, const bool containerTriggered, const SumoXMLTag stoppingPlaceType, std::string& errorMsg);
1318 
1323  Stop& getNextStop();
1324 
1329  std::list<Stop> getMyStops();
1330 
1335  bool resumeFromStopping();
1336 
1337 
1339  double updateFurtherLanes(std::vector<MSLane*>& furtherLanes,
1340  std::vector<double>& furtherLanesPosLat,
1341  const std::vector<MSLane*>& passedLanes);
1342 
1345 
1348 
1359  };
1360 
1363  bool setExitManoeuvre();
1365  void setManoeuvreType(const MSVehicle::ManoeuvreType mType);
1366 
1368  bool manoeuvreIsComplete() const;
1371 
1372 
1379  class Manoeuvre {
1380 
1381  public:
1383  Manoeuvre();
1384 
1386  Manoeuvre(const Manoeuvre& manoeuvre);
1387 
1389  Manoeuvre& operator=(const Manoeuvre& manoeuvre);
1390 
1392  bool operator!=(const Manoeuvre& manoeuvre);
1393 
1396 
1398  bool configureExitManoeuvre(MSVehicle* veh);
1399 
1402 
1404  bool
1405  manoeuvreIsComplete(const ManoeuvreType checkType) const;
1406 
1408  bool
1409  manoeuvreIsComplete() const;
1410 
1412  int getManoeuvreAngle() const;
1413 
1416 
1418  void setManoeuvreType(const MSVehicle::ManoeuvreType mType);
1419 
1420  private:
1423 
1425  std::string myManoeuvreStop;
1426 
1429 
1432 
1435 
1436  // @brief Angle (degrees) through which manoeuver will turn vehicle - used to determine manouevre timing
1438  };
1439 
1440  // Current or previous (completed) manoeuvre
1442 
1455  class Influencer {
1456  private:
1457 
1467  void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& info = "");
1468  };
1469 
1470 
1473  GapControlState();
1474  virtual ~GapControlState();
1476  static void init();
1478  static void cleanup();
1480  void activate(double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel, const MSVehicle* refVeh);
1482  void deactivate();
1484  double tauOriginal;
1486  double tauCurrent;
1488  double tauTarget;
1497  double changeRate;
1499  double maxDecel;
1503  bool active;
1512 
1514  static std::map<const MSVehicle*, GapControlState*> refVehMap;
1515 
1516  private:
1518  };
1519  public:
1521  Influencer();
1522 
1524  ~Influencer();
1525 
1527  static void init();
1529  static void cleanup();
1530 
1534  void setSpeedTimeLine(const std::vector<std::pair<SUMOTime, double> >& speedTimeLine);
1535 
1538  void activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, MSVehicle* refVeh = nullptr);
1539 
1542  void deactivateGapController();
1543 
1547  void setLaneTimeLine(const std::vector<std::pair<SUMOTime, int> >& laneTimeLine);
1548 
1552  void adaptLaneTimeLine(int indexShift);
1553 
1557  void setSublaneChange(double latDist);
1558 
1560  int getSpeedMode() const;
1561 
1563  int getLaneChangeMode() const;
1564 
1566  int getRoutingMode() const {
1567  return myRoutingMode;
1568  }
1570 
1572 
1584  double influenceSpeed(SUMOTime currentTime, double speed, double vSafe, double vMin, double vMax);
1585 
1598  double gapControlSpeed(SUMOTime currentTime, const SUMOVehicle* veh, double speed, double vSafe, double vMin, double vMax);
1599 
1607  int influenceChangeDecision(const SUMOTime currentTime, const MSEdge& currentEdge, const int currentLaneIndex, int state);
1608 
1609 
1615  double changeRequestRemainingSeconds(const SUMOTime currentTime) const;
1616 
1620  inline bool getRespectJunctionPriority() const {
1622  }
1623 
1624 
1628  inline bool getEmergencyBrakeRedLight() const {
1629  return myEmergencyBrakeRedLight;
1630  }
1631 
1632 
1634  bool considerSafeVelocity() const {
1635  return myConsiderSafeVelocity;
1636  }
1637 
1641  void setSpeedMode(int speedMode);
1642 
1646  void setLaneChangeMode(int value);
1647 
1651  void setRoutingMode(int value) {
1652  myRoutingMode = value;
1653  }
1654 
1658  double getOriginalSpeed() const;
1659 
1660  void setRemoteControlled(Position xyPos, MSLane* l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector& route, SUMOTime t);
1661 
1663  return myLastRemoteAccess;
1664  }
1665 
1667 
1669  double implicitSpeedRemote(const MSVehicle* veh, double oldSpeed);
1670 
1672  double implicitDeltaPosRemote(const MSVehicle* veh);
1673 
1674  bool isRemoteControlled() const;
1675 
1676  bool isRemoteAffected(SUMOTime t) const;
1677 
1678  void setSignals(int signals) {
1679  myTraCISignals = signals;
1680  }
1681 
1682  int getSignals() const {
1683  return myTraCISignals;
1684  }
1685 
1686  double getLatDist() const {
1687  return myLatDist;
1688  }
1689 
1690  void resetLatDist() {
1691  myLatDist = 0.;
1692  }
1693 
1694  bool ignoreOverlap() const {
1696  }
1697 
1698  SUMOAbstractRouter<MSEdge, SUMOVehicle>& getRouterTT(const int rngIndex) const;
1699 
1700  private:
1702  std::vector<std::pair<SUMOTime, double> > mySpeedTimeLine;
1703 
1705  std::vector<std::pair<SUMOTime, int> > myLaneTimeLine;
1706 
1708  std::shared_ptr<GapControlState> myGapControlState;
1709 
1712 
1714  double myLatDist;
1715 
1718 
1721 
1724 
1727 
1730 
1733 
1736  double myRemotePos;
1742 
1744 
1758 
1759  // @brief the signals set via TraCI
1761 
1764 
1765  };
1766 
1767 
1774 
1775  const Influencer* getInfluencer() const;
1776 
1777  bool hasInfluencer() const {
1778  return myInfluencer != nullptr;
1779  }
1780 
1782  int influenceChangeDecision(int state);
1783 
1785  void setRemoteState(Position xyPos);
1786 
1788  double basePos(const MSEdge* edge) const;
1789 
1791  double getSafeFollowSpeed(const std::pair<const MSVehicle*, double> leaderInfo,
1792  const double seen, const MSLane* const lane, double distToCrossing) const;
1793 
1795  static int nextLinkPriority(const std::vector<MSLane*>& conts);
1796 
1798  bool isLeader(const MSLink* link, const MSVehicle* veh) const;
1799 
1800  // @brief get the position of the back bumper;
1801  const Position getBackPosition() const;
1802 
1804 
1805 
1807  void saveState(OutputDevice& out);
1808 
1811  void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset);
1813 
1814 protected:
1815 
1816  double getSpaceTillLastStanding(const MSLane* l, bool& foundStopped) const;
1817 
1820 
1836  void adaptLaneEntering2MoveReminder(const MSLane& enteredLane);
1838 
1839 
1847  void processLinkApproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist);
1848 
1849 
1858  void processLaneAdvances(std::vector<MSLane*>& passedLanes, bool& moved, std::string& emergencyReason);
1859 
1860 
1868  double processTraCISpeedControl(double vSafe, double vNext);
1869 
1870 
1877  void removePassedDriveItems();
1878 
1881  void updateWaitingTime(double vNext);
1882 
1885  void updateTimeLoss(double vNext);
1886 
1888  bool canReverse(double speedThreshold = SUMO_const_haltingSpeed) const;
1889 
1892  void setBrakingSignals(double vNext) ;
1893 
1896  void setBlinkerInformation();
1897 
1900  void setEmergencyBlueLight(SUMOTime currentTime);
1901 
1903  void updateOccupancyAndCurrentBestLane(const MSLane* startLane);
1904 
1908  const ConstMSEdgeVector getStopEdges(double& firstPos, double& lastPos) const;
1909 
1911  std::vector<std::pair<int, double> > getStopIndices() const;
1912 
1914  double getBrakeGap() const;
1915 
1917  Position validatePosition(Position result, double offset = 0) const;
1918 
1920  virtual void drawOutsideNetwork(bool /*add*/) {};
1921 
1925 
1927  double myTimeLoss;
1928 
1931 
1934 
1940 
1941 
1942 
1945 
1947 
1950 
1951  /* @brief Complex data structure for keeping and updating LaneQ:
1952  * Each element of the outer vector corresponds to an upcoming edge on the vehicles route
1953  * The first element corresponds to the current edge and is returned in getBestLanes()
1954  * The other elements are only used as a temporary structure in updateBestLanes();
1955  */
1956  std::vector<std::vector<LaneQ> > myBestLanes;
1957 
1958  /* @brief iterator to speed up retrieval of the current lane's LaneQ in getBestLaneOffset() and getBestLanesContinuation()
1959  * This is updated in updateOccupancyAndCurrentBestLane()
1960  */
1961  std::vector<LaneQ>::iterator myCurrentLaneInBestLanes;
1962 
1963  static std::vector<MSLane*> myEmptyLaneVector;
1964 
1966  std::list<Stop> myStops;
1967 
1970 
1973  std::pair<double, LinkDirection> myNextTurn;
1974 
1976  std::vector<MSLane*> myFurtherLanes;
1978  std::vector<double> myFurtherLanesPosLat;
1979 
1982 
1985 
1988 
1991 
1993 
1995  double myAngle;
1996 
1998  double myStopDist;
1999 
2002 
2004 
2009 
2010 protected:
2011 
2017  double myVLinkPass;
2018  double myVLinkWait;
2024  double myDistance;
2025  double accelV;
2028 
2029  DriveProcessItem(MSLink* link, double vPass, double vWait, bool setRequest,
2030  SUMOTime arrivalTime, double arrivalSpeed,
2031  SUMOTime arrivalTimeBraking, double arrivalSpeedBraking,
2032  double distance,
2033  double leaveSpeed = -1.) :
2034  myLink(link), myVLinkPass(vPass), myVLinkWait(vWait), mySetRequest(setRequest),
2035  myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed),
2036  myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking),
2037  myDistance(distance),
2038  accelV(leaveSpeed), hadStoppedVehicle(false), availableSpace(0) {
2039  assert(vWait >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
2040  assert(vPass >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
2041  };
2042 
2043 
2045  DriveProcessItem(double vWait, double distance, double _availableSpace = 0) :
2046  myLink(0), myVLinkPass(vWait), myVLinkWait(vWait), mySetRequest(false),
2049  myDistance(distance),
2050  accelV(-1), hadStoppedVehicle(false), availableSpace(_availableSpace) {
2051  assert(vWait >= 0 || !MSGlobals::gSemiImplicitEulerUpdate);
2052  };
2053 
2054 
2055  inline void adaptLeaveSpeed(const double v) {
2056  if (accelV < 0) {
2057  accelV = v;
2058  } else {
2059  accelV = MIN2(accelV, v);
2060  }
2061  }
2062  inline double getLeaveSpeed() const {
2063  return accelV < 0 ? myVLinkPass : accelV;
2064  }
2065  };
2066 
2068  // TODO: Consider making LFLinkLanes a std::deque for efficient front removal (needs refactoring in checkRewindLinkLanes()...)
2069  typedef std::vector< DriveProcessItem > DriveItemVector;
2070 
2073 
2076 
2082  DriveItemVector::iterator myNextDriveItem;
2083 
2085  void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector& lfLinks, double& myStopDist, std::pair<double, LinkDirection>& myNextTurn) const;
2086 
2088  void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector& lfLinks) const;
2089 
2091  void removeApproachingInformation(const DriveItemVector& lfLinks) const;
2092 
2093 
2095  inline double estimateLeaveSpeed(const MSLink* const link, const double vLinkPass) const {
2096  // estimate leave speed for passing time computation
2097  // l=linkLength, a=accel, t=continuousTime, v=vLeave
2098  // l=v*t + 0.5*a*t^2, solve for t and multiply with a, then add v
2099  return MIN2(link->getViaLaneOrLane()->getVehicleMaxSpeed(this),
2100  getCarFollowModel().estimateSpeedAfterDistance(link->getLength(), vLinkPass, getVehicleType().getCarFollowModel().getMaxAccel()));
2101  }
2102 
2103 
2104  /* @brief adapt safe velocity in accordance to a moving obstacle:
2105  * - a leader vehicle
2106  * - a vehicle or pedestrian that crosses this vehicles path on an upcoming intersection
2107  * @param[in] leaderInfo The leading vehicle and the (virtual) distance to it
2108  * @param[in] seen the distance to the end of the current lane
2109  * @param[in] lastLink the lastLink index
2110  * @param[in] lane The current Lane the vehicle is on
2111  * @param[in,out] the safe velocity for driving
2112  * @param[in,out] the safe velocity for arriving at the next link
2113  * @param[in] distToCrossing The distance to the crossing point with the current leader where relevant or -1
2114  */
2115  void adaptToLeader(const std::pair<const MSVehicle*, double> leaderInfo,
2116  const double seen, DriveProcessItem* const lastLink,
2117  const MSLane* const lane, double& v, double& vLinkPass,
2118  double distToCrossing = -1) const;
2119 
2120  /* @brief adapt safe velocity in accordance to multiple vehicles ahead:
2121  * @param[in] ahead The leader information according to the current lateral-resolution
2122  * @param[in] latOffset the lateral offset for locating the ego vehicle on the given lane
2123  * @param[in] seen the distance to the end of the current lane
2124  * @param[in] lastLink the lastLink index
2125  * @param[in] lane The current Lane the vehicle is on
2126  * @param[in,out] the safe velocity for driving
2127  * @param[in,out] the safe velocity for arriving at the next link
2128  */
2129  void adaptToLeaders(const MSLeaderInfo& ahead,
2130  double latOffset,
2131  const double seen, DriveProcessItem* const lastLink,
2132  const MSLane* const lane, double& v, double& vLinkPass) const;
2133 
2135  void checkLinkLeader(const MSLink* link, const MSLane* lane, double seen,
2136  DriveProcessItem* const lastLink, double& v, double& vLinkPass, double& vLinkWait, bool& setRequest,
2137  bool isShadowLink = false) const;
2138 
2140  void checkLinkLeaderCurrentAndParallel(const MSLink* link, const MSLane* lane, double seen,
2141  DriveProcessItem* const lastLink, double& v, double& vLinkPass, double& vLinkWait, bool& setRequest) const;
2142 
2143 
2144  // @brief return the lane on which the back of this vehicle resides
2145  const MSLane* getBackLane() const;
2146 
2154  void updateState(double vNext);
2155 
2156 
2158  bool keepClear(const MSLink* link) const;
2159 
2161  bool ignoreRed(const MSLink* link, bool canBrake) const;
2162 
2163 
2165  bool haveValidStopEdges() const;
2166 
2167 private:
2168  /* @brief The vehicle's knowledge about edge efforts/travel times; @see MSEdgeWeightsStorage
2169  * @note member is initialized on first access */
2171 
2174 
2177 
2178 
2179 
2180 private:
2182  MSVehicle();
2183 
2185  MSVehicle(const MSVehicle&);
2186 
2188  MSVehicle& operator=(const MSVehicle&);
2189 
2191 
2192 };
2193 
2194 
2195 #endif
2196 
2197 /****************************************************************************/
2198 
MSVehicle::Influencer::GapControlState::remainingDuration
double remainingDuration
Remaining duration for keeping the target headway.
Definition: MSVehicle.h:1494
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:65
MSVehicle::processNextStop
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
Definition: MSVehicle.cpp:1806
MSVehicle::Influencer::myTraCISignals
int myTraCISignals
Definition: MSVehicle.h:1760
MSVehicle::Influencer::cleanup
static void cleanup()
Static cleanup.
Definition: MSVehicle.cpp:381
MSVehicle::LC_ALWAYS
@ LC_ALWAYS
Definition: MSVehicle.h:1220
MSVehicle::VEH_SIGNAL_NONE
@ VEH_SIGNAL_NONE
Everything is switched off.
Definition: MSVehicle.h:1181
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:4698
MSVehicle::Manoeuvre::Manoeuvre
Manoeuvre()
Constructor.
Definition: MSVehicle.cpp:6233
MSVehicle::Influencer::GapControlState::lastUpdate
SUMOTime lastUpdate
Time of the last update of the gap control.
Definition: MSVehicle.h:1509
MSVehicle::REQUEST_RIGHT
@ REQUEST_RIGHT
vehicle want's to change to right lane
Definition: MSVehicle.h:224
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:5333
MSVehicle::getSpeedWithoutTraciInfluence
double getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
Definition: MSVehicle.cpp:5915
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:1774
MSVehicle::VEH_SIGNAL_BLINKER_LEFT
@ VEH_SIGNAL_BLINKER_LEFT
Left blinker lights are switched on.
Definition: MSVehicle.h:1185
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:822
MSVehicle::setLateralPositionOnLane
void setLateralPositionOnLane(double posLat)
Definition: MSVehicle.h:433
MSVehicle::Stop::busstop
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
Definition: MSVehicle.h:928
MSVehicle::Stop::Stop
Stop(const SUMOVehicleParameter::Stop &par)
Definition: MSVehicle.h:922
MSVehicle::getBestLaneOffset
int getBestLaneOffset() const
Definition: MSVehicle.cpp:5087
MSVehicle::getPreviousSpeed
double getPreviousSpeed() const
Returns the vehicle's speed before the previous time step.
Definition: MSVehicle.h:484
MSVehicle::Influencer::getLastAccessTimeStep
SUMOTime getLastAccessTimeStep() const
Definition: MSVehicle.h:1662
MSVehicle::VEH_SIGNAL_EMERGENCY_RED
@ VEH_SIGNAL_EMERGENCY_RED
A red emergency light is on.
Definition: MSVehicle.h:1207
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:59
MSVehicle::ManoeuvreType
ManoeuvreType
flag identifying which, if any, manoeuvre is in progress
Definition: MSVehicle.h:1352
MSVehicle::haveValidStopEdges
bool haveValidStopEdges() const
check whether all stop.edge MSRouteIterators are valid and in order
Definition: MSVehicle.cpp:6164
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:73
MSVehicle::hasArrived
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge)
Definition: MSVehicle.cpp:1074
MSVehicle::Stop::numExpectedPerson
int numExpectedPerson
The number of still expected persons.
Definition: MSVehicle.h:946
MSVehicle::myAmRegisteredAsWaitingForPerson
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition)
Definition: MSVehicle.h:1987
MSVehicleType::getActionStepLength
SUMOTime getActionStepLength() const
Returns this type's default action step length.
Definition: MSVehicleType.h:217
MSParkingArea
A lane area vehicles can halt at.
Definition: MSParkingArea.h:59
MSVehicle::Influencer
Changes the wished vehicle speed / lanes.
Definition: MSVehicle.h:1455
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:1976
MSVehicle::myStopDist
double myStopDist
distance to the next stop or doubleMax if there is none
Definition: MSVehicle.h:1998
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:469
MSVehicle::Stop::reached
bool reached
Information whether the stop has been reached.
Definition: MSVehicle.h:944
MSVehicle::getMyStops
std::list< Stop > getMyStops()
Definition: MSVehicle.cpp:5895
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:4692
MSVehicle::enterLaneAtMove
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Definition: MSVehicle.cpp:4463
MSNet.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
MSVehicle::Manoeuvre::myManoeuvreAngle
int myManoeuvreAngle
Definition: MSVehicle.h:1437
MSVehicle::isStopped
bool isStopped() const
Returns whether the vehicle is at a stop.
Definition: MSVehicle.cpp:1737
MSVehicle::isActive
bool isActive() const
Returns whether the current simulation step is an action point for the vehicle.
Definition: MSVehicle.h:590
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:5949
MSVehicle::myCollisionImmunity
SUMOTime myCollisionImmunity
amount of time for which the vehicle is immune from collisions
Definition: MSVehicle.h:2001
MSVehicle::Stop::parkingarea
MSParkingArea * parkingarea
(Optional) parkingArea if one is assigned to the stop
Definition: MSVehicle.h:932
MSVehicle::executeMove
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
Definition: MSVehicle.cpp:3728
MSLaneChanger
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:47
MSVehicle::myLFLinkLanesPrev
DriveItemVector myLFLinkLanesPrev
planned speeds from the previous step for un-registering from junctions after the new container is fi...
Definition: MSVehicle.h:2075
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:2029
MSVehicle::isOnRoad
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
Definition: MSVehicle.h:582
MSVehicle::isRemoteControlled
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
Definition: MSVehicle.cpp:5943
MSVehicle::Stop::duration
SUMOTime duration
The stopping duration.
Definition: MSVehicle.h:938
MSJunction
The base class for an intersection.
Definition: MSJunction.h:60
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
MSVehicle::Influencer::mySpeedGainLC
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
Definition: MSVehicle.h:1750
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:1981
MSVehicle::VEH_SIGNAL_BLINKER_RIGHT
@ VEH_SIGNAL_BLINKER_RIGHT
Right blinker lights are switched on.
Definition: MSVehicle.h:1183
DELTA_T
SUMOTime DELTA_T
Definition: SUMOTime.cpp:36
MSVehicle::influenceChangeDecision
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
Definition: MSVehicle.cpp:5924
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:5311
MSVehicle::hasInfluencer
bool hasInfluencer() const
Definition: MSVehicle.h:1777
MSVehicle::REQUEST_HOLD
@ REQUEST_HOLD
vehicle want's to keep the current lane
Definition: MSVehicle.h:226
MSRouteIterator
ConstMSEdgeVector::const_iterator MSRouteIterator
Definition: MSRoute.h:57
MSVehicle::VEH_SIGNAL_FOGLIGHT
@ VEH_SIGNAL_FOGLIGHT
The fog lights are on (no visualisation)
Definition: MSVehicle.h:1193
MSVehicle::LC_NEVER
@ LC_NEVER
Definition: MSVehicle.h:1218
MSVehicle::WaitingTimeCollector::passTime
void passTime(SUMOTime dt, bool waiting)
Definition: MSVehicle.cpp:215
MSVehicle::updateOccupancyAndCurrentBestLane
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
Definition: MSVehicle.cpp:5036
MSVehicle::getAccumulatedWaitingTime
SUMOTime getAccumulatedWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
Definition: MSVehicle.h:646
MSVehicle::WaitingTimeCollector::waitingIntervalList
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
Definition: MSVehicle.h:167
MSVehicle::DriveProcessItem::myVLinkPass
double myVLinkPass
Definition: MSVehicle.h:2017
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:5371
MSVehicle::myLastBestLanesEdge
const MSEdge * myLastBestLanesEdge
Definition: MSVehicle.h:1948
MSVehicle::State::operator!=
bool operator!=(const State &state)
Operator !=.
Definition: MSVehicle.cpp:156
MSVehicle::getBoundingBox
PositionVector getBoundingBox() const
get bounding rectangle
Definition: MSVehicle.cpp:5564
MSVehicle::LaneQ::length
double length
The overall length which may be driven when using this lane without a lane change.
Definition: MSVehicle.h:814
MSVehicle::DriveProcessItem::availableSpace
double availableSpace
Definition: MSVehicle.h:2027
MSVehicle::State::myBackPos
double myBackPos
the stored back position
Definition: MSVehicle.h:147
MSNet::VehicleStateListener
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:568
MSVehicle::getBrakeGap
double getBrakeGap() const
get distance for coming to a stop (used for rerouting checks)
Definition: MSVehicle.cpp:2093
MSVehicle::getTimeLossSeconds
double getTimeLossSeconds() const
Returns the time loss in seconds.
Definition: MSVehicle.h:672
MSVehicle::DriveProcessItem::myLink
MSLink * myLink
Definition: MSVehicle.h:2016
MSVehicle::Manoeuvre::getManoeuvreAngle
int getManoeuvreAngle() const
Accessor for manoeuvre angle.
Definition: MSVehicle.cpp:6264
MSVehicle::getBackPosition
const Position getBackPosition() const
Definition: MSVehicle.cpp:1484
MSVehicle::Manoeuvre::operator!=
bool operator!=(const Manoeuvre &manoeuvre)
Operator !=.
Definition: MSVehicle.cpp:6254
MSVehicle::Manoeuvre::operator=
Manoeuvre & operator=(const Manoeuvre &manoeuvre)
Assignment operator.
Definition: MSVehicle.cpp:6244
MSVehicle::Influencer::myTraciLaneChangePriority
TraciLaneChangePriority myTraciLaneChangePriority
flags for determining the priority of traci lane change requests
Definition: MSVehicle.h:1757
MSVehicle::VEH_SIGNAL_HIGHBEAM
@ VEH_SIGNAL_HIGHBEAM
The high beam lights are on (no visualisation)
Definition: MSVehicle.h:1195
MSSimpleDriverState
Provides an interface to an error whose fluctuation is controlled via the driver's 'awareness',...
Definition: MSDriverState.h:104
MSPerson
Definition: MSPerson.h:63
MSVehicle::LCP_ALWAYS
@ LCP_ALWAYS
Definition: MSVehicle.h:1226
MSVehicle::Influencer::setLaneTimeLine
void setLaneTimeLine(const std::vector< std::pair< SUMOTime, int > > &laneTimeLine)
Sets a new lane timeline.
Definition: MSVehicle.cpp:407
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:5759
MSVehicle::isParking
bool isParking() const
Returns whether the vehicle is parking.
Definition: MSVehicle.cpp:1780
MSVehicle::getBackPositionOnLane
double getBackPositionOnLane() const
Get the vehicle's position relative to its current lane.
Definition: MSVehicle.h:421
MSVehicle::Influencer::GapControlState::maxDecel
double maxDecel
Maximal deceleration to be applied due to the adapted headway.
Definition: MSVehicle.h:1499
MSVehicle::State
Container that holds the vehicles driving state (position+speed).
Definition: MSVehicle.h:89
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:504
MSVehicle::stopsAt
bool stopsAt(MSStoppingPlace *stop) const
Returns whether the vehicle stops at the given stopping place.
Definition: MSVehicle.cpp:2067
MSVehicle::addPerson
void addPerson(MSTransportable *person)
Adds a passenger.
Definition: MSVehicle.cpp:5219
MSVehicle::LaneQ
A structure representing the best lanes for continuing the current route starting at 'lane'.
Definition: MSVehicle.h:810
MSVehicle::REQUEST_LEFT
@ REQUEST_LEFT
vehicle want's to change to left lane
Definition: MSVehicle.h:222
MSVehicle::Influencer::init
static void init()
Static initalization.
Definition: MSVehicle.cpp:376
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:60
MSVehicle::Influencer::myRemoteLane
MSLane * myRemoteLane
Definition: MSVehicle.h:1735
MSVehicle::Influencer::GapControlState::timeHeadwayIncrement
double timeHeadwayIncrement
cache storage for the headway increments of the current operation
Definition: MSVehicle.h:1511
MSVehicle::resumeFromStopping
bool resumeFromStopping()
Definition: MSVehicle.cpp:5839
MSVehicle::State::mySpeed
double mySpeed
the stored speed (should be >=0 at any time)
Definition: MSVehicle.h:139
MSVehicle::State::State
State(double pos, double speed, double posLat, double backPos)
Constructor.
Definition: MSVehicle.cpp:166
ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:75
MSVehicle::Influencer::GapControlState::tauCurrent
double tauCurrent
Current, interpolated value for the desired time headway.
Definition: MSVehicle.h:1486
MSVehicle::Manoeuvre::myManoeuvreType
ManoeuvreType myManoeuvreType
Manoeuvre type - currently entry, exit or none.
Definition: MSVehicle.h:1434
MSVehicle::State::speed
double speed() const
Speed of this state.
Definition: MSVehicle.h:114
MSVehicle::keepStopping
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
Definition: MSVehicle.cpp:1753
MSVehicle::WaitingTimeCollector::myMemorySize
SUMOTime myMemorySize
the maximal memory to store
Definition: MSVehicle.h:203
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:2127
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:392
MSVehicle::nextLinkPriority
static int nextLinkPriority(const std::vector< MSLane * > &conts)
get a numerical value for the priority of the upcoming link
Definition: MSVehicle.cpp:5020
MSVehicle::DriveProcessItem::accelV
double accelV
Definition: MSVehicle.h:2025
MSVehicle::Influencer::myOriginalSpeed
double myOriginalSpeed
The velocity before influence.
Definition: MSVehicle.h:1711
MSVehicle::Influencer::adaptLaneTimeLine
void adaptLaneTimeLine(int indexShift)
Adapts lane timeline when moving to a new lane and the lane index changes.
Definition: MSVehicle.cpp:413
MSVehicle::myWaitingTimeCollector
WaitingTimeCollector myWaitingTimeCollector
Definition: MSVehicle.h:1924
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:252
MSVehicle::getTimeGapOnLane
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
Definition: MSVehicle.cpp:5160
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:1513
MSVehicle::isStoppedOnLane
bool isStoppedOnLane() const
Definition: MSVehicle.cpp:1748
MSVehicle::Stop::getDescription
std::string getDescription() const
get a short description for showing in the gui
Definition: MSVehicle.cpp:929
MSVehicle::onRemovalFromNet
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
Definition: MSVehicle.cpp:1060
MSVehicle::Influencer::considerSafeVelocity
bool considerSafeVelocity() const
Returns whether safe velocities shall be considered.
Definition: MSVehicle.h:1634
MSVehicle::Stop::collision
bool collision
Whether this stop was triggered by a collision.
Definition: MSVehicle.h:954
MSVehicle::Influencer::myRemoteRoute
ConstMSEdgeVector myRemoteRoute
Definition: MSVehicle.h:1740
MSVehicle::VEH_SIGNAL_BLINKER_EMERGENCY
@ VEH_SIGNAL_BLINKER_EMERGENCY
Blinker lights on both sides are switched on.
Definition: MSVehicle.h:1187
MSVehicle::DriveItemVector
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during planMove() and executeMove.
Definition: MSVehicle.h:2069
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:4567
MSVehicle::setManoeuvreType
void setManoeuvreType(const MSVehicle::ManoeuvreType mType)
accessor function to myManoeuvre equivalent
Definition: MSVehicle.cpp:6280
MSVehicle::Influencer::myStrategicLC
LaneChangeMode myStrategicLC
lane changing which is necessary to follow the current route
Definition: MSVehicle.h:1746
MSVehicle::Influencer::myRemoteAngle
double myRemoteAngle
Definition: MSVehicle.h:1738
MSVehicle::Influencer::myConsiderMaxAcceleration
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
Definition: MSVehicle.h:1723
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:297
MSVehicle::State::myPreviousSpeed
double myPreviousSpeed
the speed at the begin of the previous time step
Definition: MSVehicle.h:150
MSVehicle::myHaveToWaitOnNextLink
bool myHaveToWaitOnNextLink
Definition: MSVehicle.h:1992
MSVehicle::getHarmonoise_NoiseEmissions
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
Definition: MSVehicle.cpp:5213
MSTransportable
Definition: MSTransportable.h:58
MSVehicle::Influencer::myConsiderSafeVelocity
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
Definition: MSVehicle.h:1720
MSVehicle::Manoeuvre
Container for manouevering time associated with stopping.
Definition: MSVehicle.h:1379
MSVehicle::Influencer::myRoutingMode
int myRoutingMode
routing mode (see TraCIConstants.h)
Definition: MSVehicle.h:1763
MSLaneChangerSublane
Performs lane changing of vehicles.
Definition: MSLaneChangerSublane.h:42
MSVehicle::myLFLinkLanes
DriveItemVector myLFLinkLanes
container for the planned speeds in the current step
Definition: MSVehicle.h:2072
MSVehicle::Influencer::GapControlState::active
bool active
Whether the gap control is active.
Definition: MSVehicle.h:1503
PositionVector
A list of positions.
Definition: PositionVector.h:45
MSVehicle::getCarFollowVariables
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
Definition: MSVehicle.h:910
MSVehicle::Influencer::myRemoteXYPos
Position myRemoteXYPos
Definition: MSVehicle.h:1734
MSVehicle::VEH_SIGNAL_FRONTLIGHT
@ VEH_SIGNAL_FRONTLIGHT
The front lights are on (no visualisation)
Definition: MSVehicle.h:1191
MSVehicle::getNextStop
Stop & getNextStop()
Definition: MSVehicle.cpp:5890
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:2959
MSVehicle::getCarFollowModel
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
Definition: MSVehicle.h:893
MSVehicle::myNextTurn
std::pair< double, LinkDirection > myNextTurn
the upcoming turn for the vehicle
Definition: MSVehicle.h:1973
MSVehicle::getBackLane
const MSLane * getBackLane() const
Definition: MSVehicle.cpp:3976
MSVehicle::getSlope
double getSlope() const
Returns the slope of the road at vehicle's position.
Definition: MSVehicle.cpp:1258
MSDevice_DriverState
The ToC Device controls transition of control between automated and manual driving.
Definition: MSDevice_DriverState.h:54
MSVehicleTransfer
Definition: MSVehicleTransfer.h:63
MSVehicle::Signalling
Signalling
Some boolean values which describe the state of some vehicle parts.
Definition: MSVehicle.h:1179
MSRoute
Definition: MSRoute.h:66
MSVehicle::Influencer::myCooperativeLC
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
Definition: MSVehicle.h:1748
MSVehicle::myFurtherLanesPosLat
std::vector< double > myFurtherLanesPosLat
lateral positions on further lanes
Definition: MSVehicle.h:1978
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:41
MSVehicle::getLaneChangeModel
MSAbstractLaneChangeModel & getLaneChangeModel()
Definition: MSVehicle.cpp:4680
MSVehicle::Influencer::getEmergencyBrakeRedLight
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
Definition: MSVehicle.h:1628
MSEdgeWeightsStorage
A storage for edge travel times and efforts.
Definition: MSEdgeWeightsStorage.h:43
MSVehicle::planMoveInternal
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, double &myStopDist, std::pair< double, LinkDirection > &myNextTurn) const
Definition: MSVehicle.cpp:2213
MSVehicle::Influencer::myRemotePos
double myRemotePos
Definition: MSVehicle.h:1736
SUMO_const_haltingSpeed
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
Definition: StdDefs.h:60
MSVehicle::removeApproachingInformation
void removeApproachingInformation(const DriveItemVector &lfLinks) const
unregister approach from all upcoming links
Definition: MSVehicle.cpp:5499
MSVehicle::getInfluencer
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Definition: MSVehicle.cpp:5900
MSMoveReminder
Something on a lane to be noticed about vehicle movement.
Definition: MSMoveReminder.h:66
MSVehicle::Influencer::getOriginalSpeed
double getOriginalSpeed() const
Returns the originally longitudinal speed to use.
Definition: MSVehicle.cpp:648
MSVehicle::Stop::timeToBoardNextPerson
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
Definition: MSVehicle.h:950
MSVehicleType.h
MSVehicle::DriveProcessItem::DriveProcessItem
DriveProcessItem(double vWait, double distance, double _availableSpace=0)
constructor if the link shall not be passed
Definition: MSVehicle.h:2045
MSVehicle::VEH_SIGNAL_WIPER
@ VEH_SIGNAL_WIPER
The wipers are on.
Definition: MSVehicle.h:1199
MSVehicle::getLateralPositionOnLane
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
Definition: MSVehicle.h:429
MSVehicle::adaptLaneEntering2MoveReminder
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle's entering of a new lane.
Definition: MSVehicle.cpp:1236
MSVehicle::REQUEST_NONE
@ REQUEST_NONE
vehicle doesn't want to change
Definition: MSVehicle.h:220
MSVehicle::saveState
void saveState(OutputDevice &out)
Saves the states of a vehicle.
Definition: MSVehicle.cpp:6116
MSVehicle::stopsAtEdge
bool stopsAtEdge(const MSEdge *edge) const
Returns whether the vehicle stops at the given edge.
Definition: MSVehicle.cpp:2083
MSVehicle::removePassedDriveItems
void removePassedDriveItems()
Erase passed drive items from myLFLinkLanes (and unregister approaching information for corresponding...
Definition: MSVehicle.cpp:3290
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:2146
MSVehicle::LaneChangeMode
LaneChangeMode
modes for resolving conflicts between external control (traci) and vehicle control over lane changing...
Definition: MSVehicle.h:1217
MSVehicle::Stop::write
void write(OutputDevice &dev) const
Write the current stop configuration (used for state saving)
Definition: MSVehicle.cpp:945
MSVehicle::DriveProcessItem::myArrivalTimeBraking
SUMOTime myArrivalTimeBraking
Definition: MSVehicle.h:2022
MSVehicle::switchOffSignal
void switchOffSignal(int signal)
Switches the given signal off.
Definition: MSVehicle.h:1244
MSVehicle::switchOnSignal
void switchOnSignal(int signal)
Switches the given signal on.
Definition: MSVehicle.h:1236
MSVehicle::fixPosition
void fixPosition()
repair errors in vehicle position after changing between internal edges
Definition: MSVehicle.cpp:5105
MSVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MSVehicle.cpp:1269
MSLeaderInfo
Definition: MSLeaderInfo.h:49
MSVehicle::WaitingTimeCollector::getWaitingIntervals
const waitingIntervalList & getWaitingIntervals() const
Definition: MSVehicle.h:197
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:783
MSVehicle::addContainer
void addContainer(MSTransportable *container)
Adds a container.
Definition: MSVehicle.cpp:5227
MSVehicle::Influencer::getSpeedMode
int getSpeedMode() const
return the current speed mode
Definition: MSVehicle.cpp:426
MSVehicle::Manoeuvre::myManoeuvreStop
std::string myManoeuvreStop
The name of the stop associated with the Manoeuvre - for debug output.
Definition: MSVehicle.h:1425
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:4627
MSVehicle::getPMxEmissions
double getPMxEmissions() const
Returns PMx emission of the current state.
Definition: MSVehicle.cpp:5195
MSVehicle::myAmOnNet
bool myAmOnNet
Whether the vehicle is on the network (not parking, teleported, vaporized, or arrived)
Definition: MSVehicle.h:1984
MSVehicle::setBlinkerInformation
void setBlinkerInformation()
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5236
MSVehicle::overlap
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
Definition: MSVehicle.h:708
MSVehicle::getCurrentApparentDecel
double getCurrentApparentDecel() const
get apparent deceleration based on vType parameters and current acceleration
Definition: MSVehicle.cpp:6218
MSVehicle::Influencer::myRightDriveLC
LaneChangeMode myRightDriveLC
changing to the rightmost lane
Definition: MSVehicle.h:1752
MSVehicle::Influencer::mySpeedAdaptationStarted
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
Definition: MSVehicle.h:1717
MSVehicle::getSpaceTillLastStanding
double getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
Definition: MSVehicle.cpp:4152
MSVehicle::Influencer::implicitSpeedRemote
double implicitSpeedRemote(const MSVehicle *veh, double oldSpeed)
return the speed that is implicit in the new remote position
Definition: MSVehicle.cpp:853
MSVehicle::manoeuvreIsComplete
bool manoeuvreIsComplete() const
accessor function to myManoeuvre equivalent
Definition: MSVehicle.cpp:6396
MSVehicle::myEmptyLaneVector
static std::vector< MSLane * > myEmptyLaneVector
Definition: MSVehicle.h:1963
MSVehicle::getPositionOnLane
double getPositionOnLane() const
Get the vehicle's position along the lane.
Definition: MSVehicle.h:392
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:5130
MSVehicle::getDriverState
std::shared_ptr< MSSimpleDriverState > getDriverState() const
Returns the vehicle driver's state.
Definition: MSVehicle.cpp:6212
MSVehicleType::getCarFollowModel
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
Definition: MSVehicleType.h:140
MSVehicle::keepClear
bool keepClear(const MSLink *link) const
decide whether the given link must be kept clear
Definition: MSVehicle.cpp:5955
MSVehicle::remainingStopDuration
SUMOTime remainingStopDuration() const
Returns the remaining stop duration for a stopped vehicle or 0.
Definition: MSVehicle.cpp:1765
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:512
MSVehicle::myJunctionEntryTime
SUMOTime myJunctionEntryTime
time at which the current junction was entered
Definition: MSVehicle.h:2006
MSVehicle::Influencer::GapControlState::tauTarget
double tauTarget
Target value for the desired time headway.
Definition: MSVehicle.h:1488
TIME2STEPS
#define TIME2STEPS(x)
Definition: SUMOTime.h:58
MSNet::VehicleState
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:535
MSVehicle::TraciLaneChangePriority
TraciLaneChangePriority
modes for prioritizing traci lane change requests
Definition: MSVehicle.h:1225
MSVehicleType::getLengthWithGap
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
Definition: MSVehicleType.h:117
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:3262
MSVehicle::getCOEmissions
double getCOEmissions() const
Returns CO emission of the current state.
Definition: MSVehicle.cpp:5177
MSVehicle::getLastActionTime
SUMOTime getLastActionTime() const
Returns the time of the vehicle's last action point.
Definition: MSVehicle.h:520
MSVehicle::Influencer::GapControlState::prevLeader
const MSVehicle * prevLeader
The last recognized leader.
Definition: MSVehicle.h:1507
MSVehicle::Influencer::postProcessRemoteControl
void postProcessRemoteControl(MSVehicle *v)
Definition: MSVehicle.cpp:802
MSContainer
Definition: MSContainer.h:60
MSVehicle::_getWeightsStorage
MSEdgeWeightsStorage & _getWeightsStorage() const
Definition: MSVehicle.cpp:1197
MSVehicle::Influencer::resetLatDist
void resetLatDist()
Definition: MSVehicle.h:1690
MSVehicle::DriveProcessItem::myArrivalTime
SUMOTime myArrivalTime
Definition: MSVehicle.h:2020
MSVehicle::hasDriverState
bool hasDriverState() const
Whether this vehicle is equipped with a MSDriverState.
Definition: MSVehicle.h:1003
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:56
MSVehicle::Manoeuvre::configureEntryManoeuvre
bool configureEntryManoeuvre(MSVehicle *veh)
Setup the entry manoeuvre for this vehicle (Sets completion time and manoeuvre type)
Definition: MSVehicle.cpp:6291
MSVehicle::Influencer::setSpeedTimeLine
void setSpeedTimeLine(const std::vector< std::pair< SUMOTime, double > > &speedTimeLine)
Sets a new velocity timeline.
Definition: MSVehicle.cpp:386
MSVehicle::LCP_URGENT
@ LCP_URGENT
Definition: MSVehicle.h:1228
MSVehicle::myJunctionConflictEntryTime
SUMOTime myJunctionConflictEntryTime
Definition: MSVehicle.h:2008
MSVehicle::VEH_SIGNAL_DOOR_OPEN_LEFT
@ VEH_SIGNAL_DOOR_OPEN_LEFT
One of the left doors is opened.
Definition: MSVehicle.h:1201
MSVehicle::LaneQ::currentLength
double currentLength
The length which may be driven on this lane.
Definition: MSVehicle.h:816
MSVehicle::myWaitingTime
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
Definition: MSVehicle.h:1920
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:3541
MSVehicle::getTimeLoss
SUMOTime getTimeLoss() const
Returns the SUMOTime lost (speed was lesser maximum speed)
Definition: MSVehicle.h:637
MSVehicle::getBoundingPoly
PositionVector getBoundingPoly() const
get bounding polygon
Definition: MSVehicle.cpp:5580
MSVehicle::myCFVariables
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
Definition: MSVehicle.h:2173
MSVehicle::Influencer::myLaneTimeLine
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
Definition: MSVehicle.h:1705
MSVehicle::Influencer::myLatDist
double myLatDist
The requested lateral change.
Definition: MSVehicle.h:1714
MSVehicle::updateDriveItems
void updateDriveItems()
Check whether the drive items (myLFLinkLanes) are up to date, and update them if required.
Definition: MSVehicle.cpp:3344
MSVehicle::getWeightsStorage
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle's internal edge travel times/efforts container.
Definition: MSVehicle.cpp:1185
MSVehicle::State::myPosLat
double myPosLat
the stored lateral position
Definition: MSVehicle.h:142
MSVehicle::getVelocityVector
Position getVelocityVector() const
Returns the vehicle's direction in radians.
Definition: MSVehicle.h:688
MSVehicle::Stop::endBoarding
SUMOTime endBoarding
the maximum time at which persons may board this vehicle
Definition: MSVehicle.h:956
MSVehicle::Influencer::setSublaneChange
void setSublaneChange(double latDist)
Sets a new sublane-change request.
Definition: MSVehicle.cpp:421
MSDevice
Abstract in-vehicle / in-person device.
Definition: MSDevice.h:63
MSVehicle::myManoeuvre
Manoeuvre myManoeuvre
Definition: MSVehicle.h:1441
MSVehicle::ignoreRed
bool ignoreRed(const MSLink *link, bool canBrake) const
decide whether a red (or yellow light) may be ignore
Definition: MSVehicle.cpp:5967
MSVehicle::getAngle
double getAngle() const
Returns the vehicle's direction in radians.
Definition: MSVehicle.h:680
MSVehicle::myBestLanes
std::vector< std::vector< LaneQ > > myBestLanes
Definition: MSVehicle.h:1956
MSVehicle::myCurrentLaneInBestLanes
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
Definition: MSVehicle.h:1961
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
MSVehicle::LaneQ::lane
MSLane * lane
The described lane.
Definition: MSVehicle.h:812
MSVehicle::Influencer::GapControlState::vehStateListener
static GapControlVehStateListener vehStateListener
Definition: MSVehicle.h:1517
MSVehicle::Stop::getEndPos
double getEndPos(const SUMOVehicle &veh) const
return halting position for upcoming stop;
Definition: MSVehicle.cpp:914
MSVehicle::Influencer::setRoutingMode
void setRoutingMode(int value)
Sets routing behavior.
Definition: MSVehicle.h:1651
MSVehicle::getHCEmissions
double getHCEmissions() const
Returns HC emission of the current state.
Definition: MSVehicle.cpp:5183
MSVehicle::Influencer::getSignals
int getSignals() const
Definition: MSVehicle.h:1682
MSVehicle::Manoeuvre::manoeuvreIsComplete
bool manoeuvreIsComplete() const
Check if any manoeuver is ongoing and whether the completion time is beyond currentTime.
Definition: MSVehicle.cpp:6392
MSVehicle::Stop::containerstop
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
Definition: MSVehicle.h:930
MSVehicle::Influencer::Influencer
Influencer()
Constructor.
Definition: MSVehicle.cpp:351
MSVehicle::DriveProcessItem::mySetRequest
bool mySetRequest
Definition: MSVehicle.h:2019
MSVehicle::myLastBestLanesInternalLane
const MSLane * myLastBestLanesInternalLane
Definition: MSVehicle.h:1949
MSVehicle::getStopIndices
std::vector< std::pair< int, double > > getStopIndices() const
return list of route indices for the remaining stops
Definition: MSVehicle.cpp:2056
MSGlobals.h
MSVehicle::Stop::lane
const MSLane * lane
The lane to stop at.
Definition: MSVehicle.h:926
MSVehicle::MANOEUVRE_NONE
@ MANOEUVRE_NONE
not manouevring
Definition: MSVehicle.h:1358
MSVehicle::getSignals
int getSignals() const
Returns the signals.
Definition: MSVehicle.h:1252
MSVehicle::myStops
std::list< Stop > myStops
The vehicle's list of stops.
Definition: MSVehicle.h:1966
MSChargingStation
Definition: MSChargingStation.h:50
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
MSVehicle::Stop::edge
MSRouteIterator edge
The edge in the route to stop at.
Definition: MSVehicle.h:924
MSVehicle::LaneQ::occupation
double occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
Definition: MSVehicle.h:818
MSVehicle::LaneQ::allowsContinuation
bool allowsContinuation
Whether this lane allows to continue the drive.
Definition: MSVehicle.h:824
MSVehicle::workOnMoveReminders
void workOnMoveReminders(double oldPos, double newPos, double newSpeed)
Processes active move reminder.
Definition: MSVehicle.cpp:1207
MSVehicle::getRerouteOrigin
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
Definition: MSVehicle.cpp:1386
MSVehicle::getNOxEmissions
double getNOxEmissions() const
Returns NOx emission of the current state.
Definition: MSVehicle.cpp:5189
MSVehicle::getFurtherLanesPosLat
const std::vector< double > & getFurtherLanesPosLat() const
Definition: MSVehicle.h:795
MSVehicle::getLastStepDist
double getLastStepDist() const
Get the distance the vehicle covered in the previous timestep.
Definition: MSVehicle.h:399
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:6027
MSVehicle::myLastActionTime
SUMOTime myLastActionTime
Action offset (actions are taken at time myActionOffset + N*getActionStepLength()) Initialized to 0,...
Definition: MSVehicle.h:1939
MSVehicle::myLane
MSLane * myLane
The lane the vehicle is on.
Definition: MSVehicle.h:1944
MSVehicle::LC_NOCONFLICT
@ LC_NOCONFLICT
Definition: MSVehicle.h:1219
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:1793
MSBaseVehicle::getVehicleType
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
Definition: MSBaseVehicle.h:123
MSVehicle::loadState
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
Definition: MSVehicle.cpp:6141
MSVehicle::myEdgeWeights
MSEdgeWeightsStorage * myEdgeWeights
Definition: MSVehicle.h:2170
MSVehicle::Influencer::myEmergencyBrakeRedLight
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
Definition: MSVehicle.h:1732
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:666
MSVehicle::Influencer::GapControlState::GapControlState
GapControlState()
Definition: MSVehicle.cpp:280
MSVehicle::Influencer::myGapControlState
std::shared_ptr< GapControlState > myGapControlState
The gap control state.
Definition: MSVehicle.h:1708
MSVehicle::State::pos
double pos() const
Position of this state.
Definition: MSVehicle.h:109
MSVehicle::MANOEUVRE_EXIT
@ MANOEUVRE_EXIT
Manoeuvre out of stopping place.
Definition: MSVehicle.h:1356
MSVehicle::State::myLastCoveredDist
double myLastCoveredDist
Definition: MSVehicle.h:156
MSVehicle::myJunctionEntryTimeNeverYield
SUMOTime myJunctionEntryTimeNeverYield
Definition: MSVehicle.h:2007
MSVehicle::getLaneIndex
int getLaneIndex() const
Definition: MSVehicle.cpp:5304
MSVehicle::Influencer::mySublaneLC
LaneChangeMode mySublaneLC
changing to the prefered lateral alignment
Definition: MSVehicle.h:1754
MSVehicle::Influencer::GapControlState::init
static void init()
Static initalization (adds vehicle state listener)
Definition: MSVehicle.cpp:291
MSVehicle::VEH_SIGNAL_BACKDRIVE
@ VEH_SIGNAL_BACKDRIVE
The backwards driving lights are on (no visualisation)
Definition: MSVehicle.h:1197
MSVehicle::State::lastCoveredDist
double lastCoveredDist() const
previous Speed of this state
Definition: MSVehicle.h:129
MSVehicle::Influencer::myConsiderMaxDeceleration
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
Definition: MSVehicle.h:1726
MSVehicle::setRemoteState
void setRemoteState(Position xyPos)
sets position outside the road network
Definition: MSVehicle.cpp:5937
MSVehicle::DriveProcessItem::myArrivalSpeed
double myArrivalSpeed
Definition: MSVehicle.h:2021
MSVehicle::myCachedPosition
Position myCachedPosition
Definition: MSVehicle.h:2003
MSVehicle::myAmRegisteredAsWaitingForContainer
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition)
Definition: MSVehicle.h:1990
MSVehicle::Influencer::getRoutingMode
int getRoutingMode() const
return the current routing mode
Definition: MSVehicle.h:1566
MSVehicle::basePos
double basePos(const MSEdge *edge) const
departure position where the vehicle fits fully onto the edge (if possible)
Definition: MSVehicle.cpp:2099
MSVehicle::setAngle
void setAngle(double angle, bool straightenFurther=false)
Set a custom vehicle angle in rad, optionally updates furtherLanePosLat.
Definition: MSVehicle.cpp:1399
MSVehicle::Influencer::GapControlState::addGapCurrent
double addGapCurrent
Current, interpolated value for the desired space headway.
Definition: MSVehicle.h:1490
MSVehicle::Influencer::~Influencer
~Influencer()
Destructor.
Definition: MSVehicle.cpp:373
MSVehicle::Stop::pars
const SUMOVehicleParameter::Stop pars
The stop parameter.
Definition: MSVehicle.h:936
MSVehicle::Influencer::isRemoteControlled
bool isRemoteControlled() const
Definition: MSVehicle.cpp:791
MSVehicle::Influencer::GapControlState::refVehMap
static std::map< const MSVehicle *, GapControlState * > refVehMap
stores reference vehicles currently in use by a gapController
Definition: MSVehicle.h:1514
MSVehicle::WaitingTimeCollector::cumulatedWaitingTime
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
Definition: MSVehicle.cpp:194
MSVehicle::activateReminders
void activateReminders(const MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
"Activates" all current move reminder
Definition: MSVehicle.cpp:4430
MSVehicle::Influencer::myRemotePosLat
double myRemotePosLat
Definition: MSVehicle.h:1737
MSVehicle::myAngle
double myAngle
the angle in radians (
Definition: MSVehicle.h:1995
MSVehicle::Stop
Definition of vehicle stop (position and duration)
Definition: MSVehicle.h:920
SUMOAbstractRouter< MSEdge, SUMOVehicle >
MSVehicle::getLane
MSLane * getLane() const
Returns the lane the vehicle is on.
Definition: MSVehicle.h:560
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:2030
MSVehicle::WaitingTimeCollector::appendWaitingTime
void appendWaitingTime(SUMOTime dt)
append an amount of dt millisecs to the stored waiting times
MSVehicle::Influencer::GapControlState::addGapTarget
double addGapTarget
Target value for the desired space headway.
Definition: MSVehicle.h:1492
MSVehicle::VEH_SIGNAL_EMERGENCY_BLUE
@ VEH_SIGNAL_EMERGENCY_BLUE
A blue emergency light is on.
Definition: MSVehicle.h:1205
MSVehicle::Influencer::GapControlState::tauOriginal
double tauOriginal
Original value for the desired headway (will be reset after duration has expired)
Definition: MSVehicle.h:1484
MSVehicle::Influencer::GapControlState
Container for state and parameters of the gap control.
Definition: MSVehicle.h:1472
MSVehicle::setBrakingSignals
void setBrakingSignals(double vNext)
sets the braking lights on/off
Definition: MSVehicle.cpp:3498
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:3595
MSBaseVehicle::addStops
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Definition: MSBaseVehicle.cpp:593
MSVehicle::willStop
bool willStop() const
Returns whether the vehicle will stop on the current edge.
Definition: MSVehicle.cpp:1743
MSVehicle::LCP_NOOVERLAP
@ LCP_NOOVERLAP
Definition: MSVehicle.h:1227
MSVehicle::Stop::chargingStation
MSStoppingPlace * chargingStation
(Optional) charging station if one is assigned to the stop
Definition: MSVehicle.h:934
MSVehicle::adaptBestLanesOccupation
void adaptBestLanesOccupation(int laneIndex, double density)
update occupation from MSLaneChanger
Definition: MSVehicle.cpp:5097
MSVehicle::DriveProcessItem::myVLinkWait
double myVLinkWait
Definition: MSVehicle.h:2018
MSVehicle::DriveProcessItem::myDistance
double myDistance
Definition: MSVehicle.h:2024
MSVehicle::State::myPos
double myPos
the stored position
Definition: MSVehicle.h:136
MSVehicle::WaitingTimeCollector::getMemorySize
SUMOTime getMemorySize() const
Definition: MSVehicle.h:192
MSVehicle::myState
State myState
This Vehicles driving state (pos and speed)
Definition: MSVehicle.h:1930
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:880
MSVehicle::myActionStep
bool myActionStep
The flag myActionStep indicates whether the current time step is an action point for the vehicle.
Definition: MSVehicle.h:1936
MSVehicle::Stop::numExpectedContainer
int numExpectedContainer
The number of still expected containers.
Definition: MSVehicle.h:948
MSVehicle::myAcceleration
double myAcceleration
The current acceleration after dawdling in m/s.
Definition: MSVehicle.h:1969
MSVehicle::Manoeuvre::myManoeuvreStartTime
SUMOTime myManoeuvreStartTime
Time at which the Manoeuvre for this stop started.
Definition: MSVehicle.h:1428
MSVehicle::VEH_SIGNAL_BRAKELIGHT
@ VEH_SIGNAL_BRAKELIGHT
The brake lights are on.
Definition: MSVehicle.h:1189
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:778
MSVehicle::LaneQ::bestContinuations
std::vector< MSLane * > bestContinuations
Definition: MSVehicle.h:830
MSVehicle::congested
bool congested() const
Definition: MSVehicle.h:717
MSVehicle::getFurtherLanes
const std::vector< MSLane * > & getFurtherLanes() const
Definition: MSVehicle.h:791
MSVehicle::MSVehicle
MSVehicle()
invalidated default constructor
MSVehicle::updateTimeLoss
void updateTimeLoss(double vNext)
Updates the vehicle's time loss.
Definition: MSVehicle.cpp:3529
MSCFModel::VehicleVariables
Definition: MSCFModel.h:60
MSVehicle::myTimeLoss
double myTimeLoss
the time loss in seconds due to driving with less than maximum speed
Definition: MSVehicle.h:1927
MSVehicle::WaitingTimeCollector::myWaitingIntervals
waitingIntervalList myWaitingIntervals
Definition: MSVehicle.h:208
MSVehicle::passingMinor
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
Definition: MSVehicle.cpp:6011
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:2747
MSVehicleType::getActionStepLengthSecs
double getActionStepLengthSecs() const
Returns this type's default action step length in seconds.
Definition: MSVehicleType.h:225
MSVehicle::DriveProcessItem::adaptLeaveSpeed
void adaptLeaveSpeed(const double v)
Definition: MSVehicle.h:2055
MSVehicle::updateWaitingTime
void updateWaitingTime(double vNext)
Updates the vehicle's waiting time counters (accumulated and consecutive)
Definition: MSVehicle.cpp:3517
MSVehicle::DriveProcessItem::myArrivalSpeedBraking
double myArrivalSpeedBraking
Definition: MSVehicle.h:2023
MSGlobals::gWaitingTimeMemory
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
Definition: MSGlobals.h:108
MSVehicle::isActionStep
bool isActionStep(SUMOTime t) const
Returns whether the next simulation step will be an action point for the vehicle.
Definition: MSVehicle.h:597
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:4175
MSVehicle::Influencer::myRespectJunctionPriority
bool myRespectJunctionPriority
Whether the junction priority rules are respected.
Definition: MSVehicle.h:1729
MSVehicle::myLaneChangeModel
MSAbstractLaneChangeModel * myLaneChangeModel
Definition: MSVehicle.h:1946
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:5700
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:5443
MSVehicle::getManoeuvreType
MSVehicle::ManoeuvreType getManoeuvreType() const
accessor function to myManoeuvre equivalent
Definition: MSVehicle.cpp:6274
MSVehicle::Influencer::setLaneChangeMode
void setLaneChangeMode(int value)
Sets lane changing behavior.
Definition: MSVehicle.cpp:767
MSVehicle::getElectricityConsumption
double getElectricityConsumption() const
Returns electricity consumption of the current state.
Definition: MSVehicle.cpp:5207
MSVehicle::Manoeuvre::myManoeuvreVehicleID
std::string myManoeuvreVehicleID
The name of the vehicle associated with the Manoeuvre - for debug output.
Definition: MSVehicle.h:1422
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:2848
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:5327
MSVehicle::Influencer::setSignals
void setSignals(int signals)
Definition: MSVehicle.h:1678
MSVehicle::resetActionOffset
void resetActionOffset(const SUMOTime timeUntilNextAction=0)
Resets the action offset for the vehicle.
Definition: MSVehicle.cpp:2121
MSVehicle::Influencer::isRemoteAffected
bool isRemoteAffected(SUMOTime t) const
Definition: MSVehicle.cpp:797
MSVehicle::getRightSideOnLane
double getRightSideOnLane() const
Get the vehicle's lateral position on the lane:
Definition: MSVehicle.cpp:5321
MSVehicle::Manoeuvre::myManoeuvreCompleteTime
SUMOTime myManoeuvreCompleteTime
Time at which this manoeuvre should complete.
Definition: MSVehicle.h:1431
MSVehicle::DriveProcessItem::getLeaveSpeed
double getLeaveSpeed() const
Definition: MSVehicle.h:2062
MSVehicle::Influencer::GapControlState::spaceHeadwayIncrement
double spaceHeadwayIncrement
Definition: MSVehicle.h:1511
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:308
MSVehicle::myInfluencer
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
Definition: MSVehicle.h:2176
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:3013
MSVehicle::Influencer::GapControlState::~GapControlState
virtual ~GapControlState()
Definition: MSVehicle.cpp:286
MSBaseVehicle
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:51
MSVehicle::getBestLanesContinuation
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
Definition: MSVehicle.cpp:5058
MSVehicle::Stop::triggered
bool triggered
whether an arriving person lets the vehicle continue
Definition: MSVehicle.h:940
MSVehicle::WaitingTimeCollector::WaitingTimeCollector
WaitingTimeCollector(SUMOTime memory=MSGlobals::gWaitingTimeMemory)
Constructor.
Definition: MSVehicle.cpp:175
MSVehicle::setApproachingForAllLinks
void setApproachingForAllLinks(const SUMOTime t)
Register junction approaches for all link items in the current plan.
Definition: MSVehicle.cpp:4383
MSVehicle::signalSet
bool signalSet(int which) const
Returns whether the given signal is on.
Definition: MSVehicle.h:1261
MSVehicle::State::posLat
double posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
Definition: MSVehicle.h:119
MSVehicle::Influencer::getLaneChangeMode
int getLaneChangeMode() const
return the current lane change mode
Definition: MSVehicle.cpp:436
MSVehicle::Influencer::GapControlState::deactivate
void deactivate()
Stop gap control.
Definition: MSVehicle.cpp:338
MSVehicle::getFuelConsumption
double getFuelConsumption() const
Returns fuel consumption of the current state.
Definition: MSVehicle.cpp:5201
MSVehicle::Manoeuvre::setManoeuvreType
void setManoeuvreType(const MSVehicle::ManoeuvreType mType)
Accessor (set) for manoeuvre type.
Definition: MSVehicle.cpp:6285
MSVehicleType::getMaxSpeed
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
Definition: MSVehicleType.h:161
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:2832
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:493
MSVehicle::VEH_SIGNAL_DOOR_OPEN_RIGHT
@ VEH_SIGNAL_DOOR_OPEN_RIGHT
One of the right doors is opened.
Definition: MSVehicle.h:1203
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:654
MSVehicle::computeAngle
double computeAngle() const
compute the current vehicle angle
Definition: MSVehicle.cpp:1439
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:56
MSVehicle::Influencer::mySpeedTimeLine
std::vector< std::pair< SUMOTime, double > > mySpeedTimeLine
The velocity time line to apply.
Definition: MSVehicle.h:1702
MSVehicle::setEmergencyBlueLight
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:5290
MSVehicle::getWaitingTime
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:624
MSVehicle::Influencer::GapControlState::gapAttained
bool gapAttained
Whether the desired gap was attained during the current activity phase (induces the remaining duratio...
Definition: MSVehicle.h:1505
config.h
MSVehicle::VEH_SIGNAL_EMERGENCY_YELLOW
@ VEH_SIGNAL_EMERGENCY_YELLOW
A yellow emergency light is on.
Definition: MSVehicle.h:1209
MSVehicle::State::backPos
double backPos() const
back Position of this state
Definition: MSVehicle.h:124
MSAbstractLaneChangeModel
Interface for lane-change models.
Definition: MSAbstractLaneChangeModel.h:45
MSVehicle::validatePosition
Position validatePosition(Position result, double offset=0) const
ensure that a vehicle-relative position is not invalid
Definition: MSVehicle.cpp:1365
MSVehicle::WaitingTimeCollector::operator!=
bool operator!=(const WaitingTimeCollector &wt) const
Operator !=.
MSVehicle::Influencer::getLatDist
double getLatDist() const
Definition: MSVehicle.h:1686
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:3986
MSVehicle::getSpeed
double getSpeed() const
Returns the vehicle's current speed.
Definition: MSVehicle.h:476
MSVehicle::Influencer::GapControlState::changeRate
double changeRate
Rate by which the current time and space headways are changed towards the target value....
Definition: MSVehicle.h:1497
MSVehicle::Influencer::getLaneTimeLineDuration
SUMOTime getLaneTimeLineDuration()
Definition: MSVehicle.cpp:446
MSVehicle::Influencer::getLaneTimeLineEnd
SUMOTime getLaneTimeLineEnd()
Definition: MSVehicle.cpp:459
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:501
MSVehicle::Influencer::GapControlState::cleanup
static void cleanup()
Static cleanup (removes vehicle state listener)
Definition: MSVehicle.cpp:302
MSVehicle::setActionStepLength
void setActionStepLength(double actionStepLength, bool resetActionOffset=true)
Sets the action steplength of the vehicle.
Definition: MSVehicle.cpp:1422
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:1083
MSVehicle::getLateralOverlap
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it's primary lane
Definition: MSVehicle.cpp:5493
MSVehicle::DriveProcessItem::hadStoppedVehicle
bool hadStoppedVehicle
Definition: MSVehicle.h:2026
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:1501
MSVehicle::Manoeuvre::getManoeuvreType
MSVehicle::ManoeuvreType getManoeuvreType() const
Accessor (get) for manoeuvre type.
Definition: MSVehicle.cpp:6269
MSVehicle::Stop::containerTriggered
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: MSVehicle.h:942
MSVehicle::Influencer::deactivateGapController
void deactivateGapController()
Deactivates the gap control.
Definition: MSVehicle.cpp:400
MSVehicle::ChangeRequest
ChangeRequest
Requests set via TraCI.
Definition: MSVehicle.h:218
SUMOTime_MAX
#define SUMOTime_MAX
Definition: SUMOTime.h:35
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:4146
MSVehicle::getNextParkingArea
MSParkingArea * getNextParkingArea()
get the upcoming parking area stop or nullptr
Definition: MSVehicle.cpp:1713
MSLane.h
MSVehicle::drawOutsideNetwork
virtual void drawOutsideNetwork(bool)
register vehicle for drawing while outside the network
Definition: MSVehicle.h:1920
MSVehicle::getCurrentParkingArea
MSParkingArea * getCurrentParkingArea()
get the current parking area stop or nullptr
Definition: MSVehicle.cpp:1727
MSVehicle::setExitManoeuvre
bool setExitManoeuvre()
accessor function to myManoeuvre equivalent
Definition: MSVehicle.cpp:6225
MSVehicle::estimateLeaveSpeed
double estimateLeaveSpeed(const MSLink *const link, const double vLinkPass) const
estimate leaving speed when accelerating across a link
Definition: MSVehicle.h:2095
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:518
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:749
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:2796
MSVehicle::Influencer::getRespectJunctionPriority
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
Definition: MSVehicle.h:1620
MSBaseVehicle.h
MSBaseVehicle::myType
MSVehicleType * myType
This vehicle's type.
Definition: MSBaseVehicle.h:518
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:5616
MSGlobals::gSemiImplicitEulerUpdate
static bool gSemiImplicitEulerUpdate
Definition: MSGlobals.h:55
MSVehicle::WaitingTimeCollector::operator=
WaitingTimeCollector & operator=(const WaitingTimeCollector &wt)
Assignment operator.
Definition: MSVehicle.cpp:180
MSVehicle::nextStopDist
double nextStopDist() const
return the distance to the next stop or doubleMax if there is none.
Definition: MSVehicle.h:1052
MSVehicle::Influencer::myRemoteEdgeOffset
int myRemoteEdgeOffset
Definition: MSVehicle.h:1739
MSVehicle::Influencer::setSpeedMode
void setSpeedMode(int speedMode)
Sets speed-constraining behaviors.
Definition: MSVehicle.cpp:757
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
MSVehicle::Manoeuvre::configureExitManoeuvre
bool configureExitManoeuvre(MSVehicle *veh)
Setup the myManoeuvre for exiting (Sets completion time and manoeuvre type)
Definition: MSVehicle.cpp:6316
MSVehicle::WaitingTimeCollector
Stores the waiting intervals over the previous seconds (memory is to be specified in ms....
Definition: MSVehicle.h:164
MSVehicle::LaneQ::nextOccupation
double nextOccupation
As occupation, but without the first lane.
Definition: MSVehicle.h:820
MSVehicle::enterLaneAtLaneChange
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
Definition: MSVehicle.cpp:4516
MSVehicle::Influencer::GapControlVehStateListener
A static instance of this class in GapControlState deactivates gap control for vehicles whose referen...
Definition: MSVehicle.h:1460
MSMoveReminder::Notification
Notification
Definition of a vehicle state.
Definition: MSMoveReminder.h:91
MSVehicle::getCO2Emissions
double getCO2Emissions() const
Returns CO2 emission of the current state.
Definition: MSVehicle.cpp:5171
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:2111
MSVehicle::~MSVehicle
virtual ~MSVehicle()
Destructor.
Definition: MSVehicle.cpp:1038
MSVehicle::LCP_OPPORTUNISTIC
@ LCP_OPPORTUNISTIC
Definition: MSVehicle.h:1229
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:3914
MSVehicle::Influencer::getRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const int rngIndex) const
Definition: MSVehicle.cpp:901
MSVehicle::isStoppedTriggered
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
Definition: MSVehicle.cpp:1787
MSVehicle::myDriverState
MSDevice_DriverState * myDriverState
This vehicle's driver state.
Definition: MSVehicle.h:1933
MSVehicle::Influencer::ignoreOverlap
bool ignoreOverlap() const
Definition: MSVehicle.h:1694
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:2991
MSVehicle::rerouteParkingArea
bool rerouteParkingArea(const std::string &parkingAreaID, std::string &errorMsg)
Definition: MSVehicle.cpp:5626
MSVehicle::Influencer::myLastRemoteAccess
SUMOTime myLastRemoteAccess
Definition: MSVehicle.h:1741
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:1302
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:5511
SUMOVehicleParameter::Stop
Definition of vehicle stop (position and duration)
Definition: SUMOVehicleParameter.h:572
MSVehicle::DriveProcessItem
Drive process items represent bounds on the safe velocity corresponding to the upcoming links.
Definition: MSVehicle.h:2015
MSVehicle::getWaitingSeconds
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:656
MSVehicle::MANOEUVRE_ENTRY
@ MANOEUVRE_ENTRY
Manoeuvre into stopping place.
Definition: MSVehicle.h:1354
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:1676
MSVehicle::State::operator=
State & operator=(const State &state)
Assignment operator.
Definition: MSVehicle.cpp:144
MSVehicle::Stop::timeToLoadNextContainer
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Definition: MSVehicle.h:952
MSVehicle::hasStops
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
Definition: MSVehicle.h:997
MSVehicle::Manoeuvre::entryManoeuvreIsComplete
bool entryManoeuvreIsComplete(MSVehicle *veh)
Configure an entry manoeuvre if nothing is configured - otherwise check if complete.
Definition: MSVehicle.cpp:6351
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:79
MSVehicle::getDistanceToPosition
double getDistanceToPosition(double destPos, const MSEdge *destEdge) const
Definition: MSVehicle.cpp:5113
MSVehicle::myNextDriveItem
DriveItemVector::iterator myNextDriveItem
iterator pointing to the next item in myLFLinkLanes
Definition: MSVehicle.h:2082
MSVehicle::getMaxSpeedOnLane
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation,...
Definition: MSVehicle.h:570