SUMO - Simulation of Urban MObility
MSVehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
15 // Representation of a vehicle in the micro simulation
16 /****************************************************************************/
17 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
18 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
19 /****************************************************************************/
20 //
21 // This file is part of SUMO.
22 // SUMO is free software: you can redistribute it and/or modify
23 // it under the terms of the GNU General Public License as published by
24 // the Free Software Foundation, either version 3 of the License, or
25 // (at your option) any later version.
26 //
27 /****************************************************************************/
28 #ifndef MSVehicle_h
29 #define MSVehicle_h
30 
31 
32 // ===========================================================================
33 // included modules
34 // ===========================================================================
35 #ifdef _MSC_VER
36 #include <windows_config.h>
37 #else
38 #include <config.h>
39 #endif
40 
41 #include <list>
42 #include <deque>
43 #include <map>
44 #include <set>
45 #include <string>
46 #include <vector>
47 #include "MSGlobals.h"
48 #include "MSVehicleType.h"
49 #include "MSBaseVehicle.h"
50 #include "MSLink.h"
51 #include "MSLane.h"
52 
53 
54 // ===========================================================================
55 // class declarations
56 // ===========================================================================
57 class SUMOSAXAttributes;
58 class MSMoveReminder;
59 class MSLaneChanger;
60 class MSVehicleTransfer;
62 class MSStoppingPlace;
63 class MSChargingStation;
64 class MSPerson;
65 class MSDevice;
67 class OutputDevice;
68 class Position;
70 class MSContainer;
71 class MSJunction;
72 class MSLeaderInfo;
73 
74 // ===========================================================================
75 // class definitions
76 // ===========================================================================
81 class MSVehicle : public MSBaseVehicle {
82 public:
83 
85  friend class MSLaneChanger;
86  friend class MSLaneChangerSublane;
87 
91  class State {
93  friend class MSVehicle;
94  friend class MSLaneChanger;
95  friend class MSLaneChangerSublane;
96 
97  public:
100 
102  State(const State& state);
103 
105  State& operator=(const State& state);
106 
108  bool operator!=(const State& state);
109 
111  SUMOReal pos() const {
112  return myPos;
113  }
114 
116  SUMOReal speed() const {
117  return mySpeed;
118  };
119 
121  SUMOReal posLat() const {
122  return myPosLat;
123  }
124 
126  SUMOReal backPos() const {
127  return myBackPos;
128  }
129 
130 
131  private:
134 
137 
140 
142  // if the vehicle occupies multiple lanes, this is the position relative
143  // to the lane occupied by its back
145 
146  };
147 
148 
153  friend class MSVehicle;
154 
155  typedef std::list<std::pair<SUMOTime, SUMOTime> > waitingIntervalList;
156 
157  public:
160 
163 
166 
168  bool operator!=(const WaitingTimeCollector& wt) const;
169 
172 
173  // return the waiting time within the last memory millisecs
174  SUMOTime cumulatedWaitingTime(SUMOTime memory = -1) const;
175 
176  // process time passing for dt millisecs
177  void passTime(SUMOTime dt, bool waiting);
178 
179  // maximal memory time stored
181  return myMemorySize;
182  }
183 
184  // maximal memory time stored
185  const waitingIntervalList& getWaitingIntervals() const {
186  return myWaitingIntervals;
187  }
188 
189  private:
192 
196  waitingIntervalList myWaitingIntervals;
197 
199  void appendWaitingTime(SUMOTime dt);
200  };
201 
202 
215  };
216 
224  MSVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
225  const MSVehicleType* type, const SUMOReal speedFactor);
226 
228  virtual ~MSVehicle();
229 
230 
232 
233 
243 
244 
245 
247 
248 
252  bool hasArrived() const;
253 
262  bool replaceRoute(const MSRoute* route, bool onInit = false, int offset = 0);
263 
264 
270  bool willPass(const MSEdge* const edge) const;
271 
272  int getRoutePosition() const;
273  void resetRoutePosition(int index);
274 
283 
284 
286 
287 
305  void workOnMoveReminders(SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed);
307 
308 
326  void planMove(const SUMOTime t, const MSLeaderInfo& ahead, const SUMOReal lengthsInFront);
327 
328 
341  bool executeMove();
342 
343 
345 
346 
351  return myState.myPos;
352  }
353 
357  SUMOReal getPositionOnLane(const MSLane* lane) const;
358 
362  SUMOReal getBackPositionOnLane(const MSLane* lane) const;
363 
369  }
370 
376  return myState.myPosLat;
377  }
378 
384 
386  SUMOReal getLateralOverlap() const;
387 
393  SUMOReal getRightSideOnEdge(const MSLane* lane = 0) const;
394 
400  SUMOReal getCenterOnEdge(const MSLane* lane = 0) const;
401 
405  SUMOReal getLatOffset(const MSLane* lane) const;
406 
410  SUMOReal getSpeed() const {
411  return myState.mySpeed;
412  }
413 
414 
419  return myAcceleration;
420  }
422 
423 
424 
426 
427 
431  SUMOReal getSlope() const;
432 
433 
441  Position getPosition(const SUMOReal offset = 0) const;
442 
443 
447  MSLane* getLane() const {
448  return myLane;
449  }
450 
451 
455  inline bool isOnRoad() const {
456  return myAmOnNet;
457  }
458 
459 
463  bool isFrontOnLane(const MSLane* lane) const;
464 
465 
472  const MSEdge* getRerouteOrigin() const;
473 
474 
482  return myWaitingTime;
483  }
484 
485 
493  }
494 
495 
503  return STEPS2TIME(myWaitingTime);
504  }
505 
506 
514  }
515 
516 
520  SUMOReal getAngle() const {
521  return myAngle;
522  }
524 
526  SUMOReal computeAngle() const;
527 
529  void setAngle(SUMOReal angle);
530 
532  static bool overlap(const MSVehicle* veh1, const MSVehicle* veh2) {
533  if (veh1->myState.myPos < veh2->myState.myPos) {
534  return veh2->myState.myPos - veh2->getVehicleType().getLengthWithGap() < veh1->myState.myPos;
535  }
536  return veh1->myState.myPos - veh1->getVehicleType().getLengthWithGap() < veh2->myState.myPos;
537  }
538 
539 
542  bool congested() const {
543  return myState.mySpeed < SUMOReal(60) / SUMOReal(3.6);
544  }
545 
546 
558 
565  bool enterLaneAtMove(MSLane* enteredLane, bool onTeleporting = false);
566 
567 
568 
578  MSMoveReminder::Notification notification);
579 
584  void setTentativeLaneAndPosition(MSLane* lane, SUMOReal pos, SUMOReal posLat = 0);
585 
590  void enterLaneAtLaneChange(MSLane* enteredLane);
591 
592 
594  void leaveLane(const MSMoveReminder::Notification reason);
595 
596 
599 
600  const std::vector<MSLane*>& getFurtherLanes() const {
601  return myFurtherLanes;
602  }
603 
604  const std::vector<SUMOReal>& getFurtherLanesPosLat() const {
605  return myFurtherLanesPosLat;
606  }
607 
610 
614  struct LaneQ {
630  std::vector<MSLane*> bestContinuations;
631  };
632 
636  const std::vector<LaneQ>& getBestLanes() const;
637 
655  void updateBestLanes(bool forceRebuild = false, const MSLane* startLane = 0);
656 
657 
662  const std::vector<MSLane*>& getBestLanesContinuation() const;
663 
668  const std::vector<MSLane*>& getBestLanesContinuation(const MSLane* const l) const;
669 
671  int getBestLaneOffset() const;
672 
674  void adaptBestLanesOccupation(int laneIndex, SUMOReal density);
675 
677 
679  void fixPosition();
680 
681 
690  void replaceVehicleType(MSVehicleType* type);
691 
692 
700  inline const MSCFModel& getCarFollowModel() const {
701  return myType->getCarFollowModel();
702  }
703 
704 
710  return myCFVariables;
711  }
712 
713 
715 
716 
720  struct Stop {
724  const MSLane* lane;
740  bool triggered;
744  bool parking;
746  bool reached;
748  std::set<std::string> awaitedPersons;
750  std::set<std::string> awaitedContainers;
755 
756  };
757 
758 
765  bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0);
766 
767 
771  bool hasStops() const {
772  return !myStops.empty();
773  }
774 
778  bool isStopped() const;
779 
783  bool isParking() const;
784 
788  bool isRemoteControlled() const;
789 
792  return myStopDist;
793  }
794 
798  bool isStoppedTriggered() const;
799 
802  bool isStoppedInRange(SUMOReal pos) const;
804 
805  bool knowsEdgeTest(MSEdge& edge) const;
806  int getLaneIndex() const;
807 
817  SUMOReal getDistanceToPosition(SUMOReal destPos, const MSEdge* destEdge) const;
818 
819 
827  SUMOReal processNextStop(SUMOReal currentVelocity);
828 
836  std::pair<const MSVehicle* const, SUMOReal> getLeader(SUMOReal dist = 0) const;
837 
844  SUMOReal getTimeGap() const;
845 
846 
848 
849 
853  SUMOReal getCO2Emissions() const;
854 
855 
859  SUMOReal getCOEmissions() const;
860 
861 
865  SUMOReal getHCEmissions() const;
866 
867 
871  SUMOReal getNOxEmissions() const;
872 
873 
877  SUMOReal getPMxEmissions() const;
878 
879 
884 
885 
890 
891 
897 
898 
899 
901 
902 
906  void addPerson(MSTransportable* person);
907 
909 
910 
914  void addContainer(MSTransportable* container);
915 
917  const std::vector<MSTransportable*>& getPersons() const;
918 
920  const std::vector<MSTransportable*>& getContainers() const;
921 
925  int getPersonNumber() const;
926 
930  int getContainerNumber() const;
931 
934 
938  enum Signalling {
969  };
970 
971 
977  LC_NEVER = 0, // lcModel shall never trigger changes at this level
978  LC_NOCONFLICT = 1, // lcModel may trigger changes if not in conflict with TraCI request
979  LC_ALWAYS = 2 // lcModel may always trigger changes of this level regardless of requests
980  };
981 
982 
985  LCP_ALWAYS = 0, // change regardless of blockers, adapt own speed and speed of blockers
986  LCP_NOOVERLAP = 1, // change unless overlapping with blockers, adapt own speed and speed of blockers
987  LCP_URGENT = 2, // change if not blocked, adapt own speed and speed of blockers
988  LCP_OPPORTUNISTIC = 3 // change if not blocked
989  };
990 
991 
995  void switchOnSignal(int signal) {
996  mySignals |= signal;
997  }
998 
999 
1003  void switchOffSignal(int signal) {
1004  mySignals &= ~signal;
1005  }
1006 
1007 
1011  int getSignals() const {
1012  return mySignals;
1013  }
1014 
1015 
1020  bool signalSet(int which) const {
1021  return (mySignals & which) != 0;
1022  }
1024 
1025 
1027  bool unsafeLinkAhead(const MSLane* lane) const;
1028 
1029 
1030 #ifndef NO_TRACI
1031 
1039 
1052  bool addTraciStop(MSLane* const lane, const SUMOReal startPos, const SUMOReal endPos, const SUMOTime duration, const SUMOTime until,
1053  const bool parking, const bool triggered, const bool containerTriggered, std::string& errorMsg);
1054 
1066  bool addTraciBusOrContainerStop(const std::string& stopId, const SUMOTime duration, const SUMOTime until, const bool parking,
1067  const bool triggered, const bool containerTriggered, const bool isContainerStop, std::string& errorMsg);
1068 
1073  Stop& getNextStop();
1074 
1079  bool resumeFromStopping();
1080 
1081 
1083  SUMOReal updateFurtherLanes(std::vector<MSLane*>& furtherLanes,
1084  std::vector<SUMOReal>& furtherLanesPosLat,
1085  const std::vector<MSLane*>& passedLanes);
1086 
1089 
1092 
1105  class Influencer {
1106  public:
1108  Influencer();
1109 
1110 
1112  ~Influencer();
1113 
1114 
1118  void setSpeedTimeLine(const std::vector<std::pair<SUMOTime, SUMOReal> >& speedTimeLine);
1119 
1120 
1124  void setLaneTimeLine(const std::vector<std::pair<SUMOTime, int> >& laneTimeLine);
1125 
1127  int getSpeedMode() const;
1128 
1140  SUMOReal influenceSpeed(SUMOTime currentTime, SUMOReal speed, SUMOReal vSafe, SUMOReal vMin, SUMOReal vMax);
1141 
1149  int influenceChangeDecision(const SUMOTime currentTime, const MSEdge& currentEdge, const int currentLaneIndex, int state);
1150 
1151 
1157  SUMOReal changeRequestRemainingSeconds(const SUMOTime currentTime) const;
1158 
1162  void setConsiderSafeVelocity(bool value);
1163 
1164 
1168  void setConsiderMaxAcceleration(bool value);
1169 
1170 
1174  void setConsiderMaxDeceleration(bool value);
1175 
1176 
1180  void setRespectJunctionPriority(bool value);
1181 
1182 
1186  inline bool getRespectJunctionPriority() const {
1187  return myRespectJunctionPriority;
1188  }
1189 
1190 
1194  void setEmergencyBrakeRedLight(bool value);
1195 
1196 
1200  inline bool getEmergencyBrakeRedLight() const {
1201  return myEmergencyBrakeRedLight;
1202  }
1203 
1204 
1208  void setLaneChangeMode(int value);
1209 
1210 
1214  inline SUMOReal getOriginalSpeed() const {
1215  return myOriginalSpeed;
1216  }
1217 
1218  void setVTDControlled(Position xyPos, MSLane* l, SUMOReal pos, SUMOReal posLat, SUMOReal angle, int edgeOffset, const ConstMSEdgeVector& route, SUMOTime t);
1219 
1221  return myLastVTDAccess;
1222  }
1223 
1224  void postProcessVTD(MSVehicle* v);
1225 
1227  SUMOReal implicitSpeedVTD(const MSVehicle* veh, SUMOReal oldSpeed);
1228 
1230  SUMOReal implicitDeltaPosVTD(const MSVehicle* veh);
1231 
1232  bool isVTDControlled() const;
1233 
1234  bool isVTDAffected(SUMOTime t) const;
1235 
1236  private:
1238  std::vector<std::pair<SUMOTime, SUMOReal> > mySpeedTimeLine;
1239 
1241  std::vector<std::pair<SUMOTime, int> > myLaneTimeLine;
1242 
1245 
1248 
1251 
1254 
1257 
1260 
1263 
1272 
1274 
1275  LaneChangeMode myStrategicLC;
1286  TraciLaneChangePriority myTraciLaneChangePriority;
1288 
1289  };
1290 
1291 
1298 
1299  const Influencer* getInfluencer() const;
1300 
1301  bool hasInfluencer() const {
1302  return myInfluencer != 0;
1303  }
1304 
1306  int influenceChangeDecision(int state);
1307 
1309  void setVTDState(Position xyPos);
1310 
1312  SUMOReal getSafeFollowSpeed(const std::pair<const MSVehicle*, SUMOReal> leaderInfo,
1313  const SUMOReal seen, const MSLane* const lane, SUMOReal distToCrossing) const;
1314 
1316  static int nextLinkPriority(const std::vector<MSLane*>& conts);
1317 
1318 #endif
1319 
1321 
1322 
1324  void saveState(OutputDevice& out);
1325 
1328  void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset);
1330 
1331 protected:
1332 
1333  SUMOReal getSpaceTillLastStanding(const MSLane* l, bool& foundStopped) const;
1334 
1337 
1353  void adaptLaneEntering2MoveReminder(const MSLane& enteredLane);
1355 
1356 
1357 
1358  void setBlinkerInformation();
1359 
1362  void setEmergencyBlueLight(SUMOTime currentTime);
1363 
1365  void updateOccupancyAndCurrentBestLane(const MSLane* startLane);
1366 
1369  const ConstMSEdgeVector getStopEdges() const;
1370 
1372  virtual void drawOutsideNetwork(bool /*add*/) const {};
1373 
1377 
1380 
1383 
1385 
1388 
1389  std::vector<std::vector<LaneQ> > myBestLanes;
1390  std::vector<LaneQ>::iterator myCurrentLaneInBestLanes;
1391  static std::vector<MSLane*> myEmptyLaneVector;
1392  static std::vector<MSTransportable*> myEmptyTransportableVector;
1393 
1395  std::list<Stop> myStops;
1396 
1399 
1402 
1405 
1407  std::vector<MSLane*> myFurtherLanes;
1408  std::vector<SUMOReal> myFurtherLanesPosLat;
1409 
1412 
1415 
1418 
1421 
1423 
1426 
1429 
1431 
1432 protected:
1446 
1447  DriveProcessItem(MSLink* link, SUMOReal vPass, SUMOReal vWait, bool setRequest,
1448  SUMOTime arrivalTime, SUMOReal arrivalSpeed,
1449  SUMOTime arrivalTimeBraking, SUMOReal arrivalSpeedBraking,
1450  SUMOReal distance,
1451  SUMOReal leaveSpeed = -1.) :
1452  myLink(link), myVLinkPass(vPass), myVLinkWait(vWait), mySetRequest(setRequest),
1453  myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed),
1454  myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking),
1455  myDistance(distance),
1456  accelV(leaveSpeed), hadVehicle(false), availableSpace(-1.) {
1457  assert(vWait >= 0);
1458  assert(vPass >= 0);
1459  };
1460 
1461 
1464  myLink(0), myVLinkPass(vWait), myVLinkWait(vWait), mySetRequest(false),
1465  myArrivalTime(0), myArrivalSpeed(0),
1466  myArrivalTimeBraking(0), myArrivalSpeedBraking(0),
1467  myDistance(distance),
1468  accelV(-1), hadVehicle(false), availableSpace(-1.) {
1469  assert(vWait >= 0);
1470  };
1471 
1472 
1473  inline void adaptLeaveSpeed(const SUMOReal v) {
1474  if (accelV < 0) {
1475  accelV = v;
1476  } else {
1477  accelV = MIN2(accelV, v);
1478  }
1479  }
1480  inline SUMOReal getLeaveSpeed() const {
1481  return accelV < 0 ? myVLinkPass : accelV;
1482  }
1483  };
1484 
1486  typedef std::vector< DriveProcessItem > DriveItemVector;
1487  DriveItemVector myLFLinkLanes;
1488 
1489  void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector& lfLinks, SUMOReal& myStopDist) const;
1490  void checkRewindLinkLanes(const SUMOReal lengthsInFront, DriveItemVector& lfLinks) const;
1491 
1493  void removeApproachingInformation(DriveItemVector& lfLinks) const;
1494 
1495 
1497  inline SUMOReal estimateLeaveSpeed(const MSLink* const link, const SUMOReal vLinkPass) const {
1498  // estimate leave speed for passing time computation
1499  // l=linkLength, a=accel, t=continuousTime, v=vLeave
1500  // l=v*t + 0.5*a*t^2, solve for t and multiply with a, then add v
1501  return MIN2(link->getViaLaneOrLane()->getVehicleMaxSpeed(this),
1503  }
1504 
1505  /* @brief estimate speed while accelerating for the given distance
1506  * @param[in] dist The distance during which accelerating takes place
1507  * @param[in] v The initial speed
1508  * @param[in] accel The acceleration
1509  * XXX affected by ticket #860 (the formula is invalid for the current position update rule)
1510  */
1511  inline SUMOReal estimateSpeedAfterDistance(const SUMOReal dist, const SUMOReal v, const SUMOReal accel) const {
1512  // dist=v*t + 0.5*accel*t^2, solve for t and multiply with accel, then add v
1513  return MIN2(getVehicleType().getMaxSpeed(),
1514  (SUMOReal)sqrt(2 * dist * accel + v * v));
1515  }
1516 
1517 
1518  /* @brief adapt safe velocity in accordance to a moving obstacle:
1519  * - a leader vehicle
1520  * - a vehicle or pedestrian that crosses this vehicles path on an upcoming intersection
1521  * @param[in] leaderInfo The leading vehicle and the (virtual) distance to it
1522  * @param[in] seen the distance to the end of the current lane
1523  * @param[in] lastLink the lastLink index
1524  * @param[in] lane The current Lane the vehicle is on
1525  * @param[in,out] the safe velocity for driving
1526  * @param[in,out] the safe velocity for arriving at the next link
1527  * @param[in] distToCrossing The distance to the crossing point with the current leader where relevant or -1
1528  */
1529  void adaptToLeader(const std::pair<const MSVehicle*, SUMOReal> leaderInfo,
1530  const SUMOReal seen, DriveProcessItem* const lastLink,
1531  const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass,
1532  SUMOReal distToCrossing = -1) const;
1533 
1534  /* @brief adapt safe velocity in accordance to multiple vehicles ahead:
1535  * @param[in] ahead The leader information according to the current lateral-resolution
1536  * @param[in] latOffset the lateral offset for locating the ego vehicle on the given lane
1537  * @param[in] seen the distance to the end of the current lane
1538  * @param[in] lastLink the lastLink index
1539  * @param[in] lane The current Lane the vehicle is on
1540  * @param[in,out] the safe velocity for driving
1541  * @param[in,out] the safe velocity for arriving at the next link
1542  */
1543  void adaptToLeaders(const MSLeaderInfo& ahead,
1544  SUMOReal latOffset,
1545  const SUMOReal seen, DriveProcessItem* const lastLink,
1546  const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass) const;
1547 
1548 
1549  // @brief return the lane on which the back of this vehicle resides
1550  const MSLane* getBackLane() const;
1551 
1552  // @brief get the position of the back bumper;
1553  const Position getBackPosition() const;
1554 
1555 private:
1556  /* @brief The vehicle's knowledge about edge efforts/travel times; @see MSEdgeWeightsStorage
1557  * @note member is initialized on first access */
1559 
1562 
1563 #ifndef NO_TRACI
1566 #endif
1567 
1568 private:
1570  MSVehicle();
1571 
1573  MSVehicle(const MSVehicle&);
1574 
1576  MSVehicle& operator=(const MSVehicle&);
1577 
1579 
1580 };
1581 
1582 
1583 #endif
1584 
1585 /****************************************************************************/
1586 
bool signalSet(int which) const
Returns whether the given signal is on.
Definition: MSVehicle.h:1020
void setAngle(SUMOReal angle)
Set a custom vehicle angle in rad.
Definition: MSVehicle.cpp:802
const MSLane * myLastBestLanesInternalLane
Definition: MSVehicle.h:1387
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
Definition: MSVehicle.cpp:3492
const MSVehicleType * myType
This Vehicle&#39;s type.
void replaceVehicleType(MSVehicleType *type)
Replaces the current vehicle type by the one given.
Definition: MSVehicle.cpp:3088
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Definition: MSVehicle.cpp:2288
static int nextLinkPriority(const std::vector< MSLane * > &conts)
get a numerical value for the priority of the upcoming link
Definition: MSVehicle.cpp:2775
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
Definition: MSVehicle.h:155
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:81
long long int SUMOTime
Definition: SUMOTime.h:43
void planMove(const SUMOTime t, const MSLeaderInfo &ahead, const SUMOReal lengthsInFront)
Compute safe velocities for the upcoming lanes based on positions and speeds from the last time step...
Definition: MSVehicle.cpp:1147
SUMOReal speed() const
Speed of this state.
Definition: MSVehicle.h:116
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
Definition: MSVehicle.h:752
MSEdgeWeightsStorage * myEdgeWeights
Definition: MSVehicle.h:1558
SUMOReal backPos() const
back Position of this state
Definition: MSVehicle.h:126
const MSEdge * myLastBestLanesEdge
Definition: MSVehicle.h:1386
LaneChangeMode
modes for resolving conflicts between external control (traci) and vehicle control over lane changing...
Definition: MSVehicle.h:976
MSAbstractLaneChangeModel * myLaneChangeModel
Definition: MSVehicle.h:1384
bool myAmOnNet
Whether the vehicle is on the network (not parking, teleported, vaporized, or arrived) ...
Definition: MSVehicle.h:1414
LaneChangeMode myRightDriveLC
changing to the rightmost lane
Definition: MSVehicle.h:1282
std::vector< std::vector< LaneQ > > myBestLanes
Definition: MSVehicle.h:1389
const MSCFModel & getCarFollowModel() const
Returns the vehicle&#39;s car following model definition.
Definition: MSVehicle.h:700
std::vector< MSLane * > myFurtherLanes
The information into which lanes the vehicle laps into.
Definition: MSVehicle.h:1407
State myState
This Vehicles driving state (pos and speed)
Definition: MSVehicle.h:1379
void setTentativeLaneAndPosition(MSLane *lane, SUMOReal pos, SUMOReal posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
Definition: MSVehicle.cpp:3103
SUMOReal getRightSideOnEdge(const MSLane *lane=0) const
Get the vehicle&#39;s lateral position on the edge of the given lane (or its current edge if lane == 0) ...
Definition: MSVehicle.cpp:3119
Stop & getNextStop()
Definition: MSVehicle.cpp:3442
A lane area vehicles can halt at.
SUMOReal getMaxSpeed() const
Returns the maximum speed.
DriveItemVector myLFLinkLanes
Definition: MSVehicle.h:1487
SUMOReal pos() const
Position of this state.
Definition: MSVehicle.h:111
void enterLaneAtInsertion(MSLane *enteredLane, SUMOReal pos, SUMOReal speed, SUMOReal posLat, MSMoveReminder::Notification notification)
Update when the vehicle enters a new lane in the emit step.
Definition: MSVehicle.cpp:2371
bool resumeFromStopping()
Definition: MSVehicle.cpp:3405
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition) ...
Definition: MSVehicle.h:1417
bool hasInfluencer() const
Definition: MSVehicle.h:1301
SUMOTime myLastVTDAccess
Definition: MSVehicle.h:1271
SUMOReal getLengthWithGap() const
Get vehicle&#39;s length including the minimum gap [m].
int bestLaneOffset
The (signed) number of lanes to be crossed to get to the lane which allows to continue the drive...
Definition: MSVehicle.h:626
void setBlinkerInformation()
Definition: MSVehicle.cpp:3040
void addContainer(MSTransportable *container)
Adds a container.
Definition: MSVehicle.cpp:2987
SUMOReal getLeaveSpeed() const
Definition: MSVehicle.h:1480
virtual void drawOutsideNetwork(bool) const
register vehicle for drawing while outside the network
Definition: MSVehicle.h:1372
bool unsafeLinkAhead(const MSLane *lane) const
whether the vehicle may safely move to the given lane with regard to upcoming links ...
Definition: MSVehicle.cpp:3219
SUMOReal myAcceleration
The current acceleration after dawdling in m/s.
Definition: MSVehicle.h:1404
SUMOReal getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
Definition: MSVehicle.cpp:3463
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:481
bool congested() const
Definition: MSVehicle.h:542
The front lights are on (no visualisation)
Definition: MSVehicle.h:950
Signalling
Some boolean values which describe the state of some vehicle parts.
Definition: MSVehicle.h:938
Position getPosition(const SUMOReal offset=0) const
Return current position (x/y, cartesian)
Definition: MSVehicle.cpp:761
The base class for an intersection.
Definition: MSJunction.h:64
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge) ...
Definition: MSVehicle.cpp:601
The car-following model abstraction.
Definition: MSCFModel.h:59
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
Definition: MSVehicle.h:1253
The high beam lights are on (no visualisation)
Definition: MSVehicle.h:954
Notification
Definition of a vehicle state.
MSDevice_Transportable * myPersonDevice
The passengers this vehicle may have.
Definition: MSVehicle.h:1398
SUMOReal currentLength
The length which may be driven on this lane.
Definition: MSVehicle.h:620
bool replaceRoute(const MSRoute *route, bool onInit=false, int offset=0)
Replaces the current route by the given one.
Definition: MSVehicle.cpp:610
Changes the wished vehicle speed / lanes.
Definition: MSVehicle.h:1105
SUMOReal getHCEmissions() const
Returns HC emission of the current state.
Definition: MSVehicle.cpp:2929
bool myRespectJunctionPriority
Whether the junction priority rules are respected.
Definition: MSVehicle.h:1259
bool reached
Information whether the stop has been reached.
Definition: MSVehicle.h:746
const MSLane * getBackLane() const
Definition: MSVehicle.cpp:1901
State & operator=(const State &state)
Assignment operator.
Definition: MSVehicle.cpp:120
The backwards driving lights are on (no visualisation)
Definition: MSVehicle.h:956
vehicle doesn&#39;t want to change
Definition: MSVehicle.h:208
TraciLaneChangePriority
modes for prioritizing traci lane change requests
Definition: MSVehicle.h:984
SUMOReal estimateLeaveSpeed(const MSLink *const link, const SUMOReal vLinkPass) const
estimate leaving speed when accelerating across a link
Definition: MSVehicle.h:1497
WaitingTimeCollector myWaitingTimeCollector
Definition: MSVehicle.h:1376
SUMOReal mySpeed
the stored speed
Definition: MSVehicle.h:136
Definition of vehicle stop (position and duration)
Definition: MSVehicle.h:720
SUMOReal getCO2Emissions() const
Returns CO2 emission of the current state.
Definition: MSVehicle.cpp:2917
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
Definition: MSVehicle.cpp:1559
int getLaneIndex() const
Definition: MSVehicle.cpp:3096
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
SUMOTime myMemorySize
the maximal memory to store
Definition: MSVehicle.h:191
std::pair< const MSVehicle *const, SUMOReal > getLeader(SUMOReal dist=0) const
Returns the leader of the vehicle looking for a fixed distance.
Definition: MSVehicle.cpp:2879
SUMOReal getPositionOnLane() const
Get the vehicle&#39;s position along the lane.
Definition: MSVehicle.h:350
DriveProcessItem(MSLink *link, SUMOReal vPass, SUMOReal vWait, bool setRequest, SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOTime arrivalTimeBraking, SUMOReal arrivalSpeedBraking, SUMOReal distance, SUMOReal leaveSpeed=-1.)
Definition: MSVehicle.h:1447
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:56
bool myHaveToWaitOnNextLink
Definition: MSVehicle.h:1422
void adaptToLeaders(const MSLeaderInfo &ahead, SUMOReal latOffset, const SUMOReal seen, DriveProcessItem *const lastLink, const MSLane *const lane, SUMOReal &v, SUMOReal &vLinkPass) const
Definition: MSVehicle.cpp:1469
SUMOReal processNextStop(SUMOReal currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
Definition: MSVehicle.cpp:1012
A storage for edge travel times and efforts.
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
Definition: MSVehicle.h:771
SUMOReal length
The overall length which may be driven when using this lane without a lane change.
Definition: MSVehicle.h:618
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
Definition: MSVehicle.cpp:2321
SUMOReal myStopDist
distance to the next stop or -1 if there is none
Definition: MSVehicle.h:1428
The car-following model and parameter.
Definition: MSVehicleType.h:74
SUMOReal updateFurtherLanes(std::vector< MSLane * > &furtherLanes, std::vector< SUMOReal > &furtherLanesPosLat, const std::vector< MSLane * > &passedLanes)
update a vector of further lanes and return the new backPos
Definition: MSVehicle.cpp:1911
bool triggered
whether an arriving person lets the vehicle continue
Definition: MSVehicle.h:740
MSAbstractLaneChangeModel & getLaneChangeModel()
Definition: MSVehicle.cpp:2462
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
Definition: MSVehicle.h:1561
const MSCFModel & getCarFollowModel() const
Returns the vehicle type&#39;s car following model definition (const version)
Performs lane changing of vehicles.
Right blinker lights are switched on.
Definition: MSVehicle.h:942
MSChargingStation * chargingStation
(Optional) charging station if one is assigned to the stop
Definition: MSVehicle.h:730
SUMOReal nextOccupation
As occupation, but without the first lane.
Definition: MSVehicle.h:624
SUMOReal getLateralPositionOnLane() const
Get the vehicle&#39;s lateral position on the lane.
Definition: MSVehicle.h:375
SUMOReal getElectricityConsumption() const
Returns electricity consumption of the current state.
Definition: MSVehicle.cpp:2953
SUMOTime getMemorySize() const
Definition: MSVehicle.h:180
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
Definition: MSVehicle.h:1241
int getContainerNumber() const
Returns the number of containers.
Definition: MSVehicle.cpp:3033
bool operator!=(const State &state)
Operator !=.
Definition: MSVehicle.cpp:130
static std::vector< MSTransportable * > myEmptyTransportableVector
Definition: MSVehicle.h:1392
Performs lane changing of vehicles.
Definition: MSLaneChanger.h:55
A road/street connecting two junctions.
Definition: MSEdge.h:80
MSLane * lane
The described lane.
Definition: MSVehicle.h:616
void checkRewindLinkLanes(const SUMOReal lengthsInFront, DriveItemVector &lfLinks) const
Definition: MSVehicle.cpp:2048
Left blinker lights are switched on.
Definition: MSVehicle.h:944
SUMOReal computeAngle() const
compute the current vehicle angle
Definition: MSVehicle.cpp:808
DriveProcessItem(SUMOReal vWait, SUMOReal distance)
constructor if the link shall not be passed
Definition: MSVehicle.h:1463
The wipers are on.
Definition: MSVehicle.h:958
SUMOReal getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it&#39;s primary lane ...
Definition: MSVehicle.cpp:3200
void workOnMoveReminders(SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Processes active move reminder.
Definition: MSVehicle.cpp:706
vehicle want&#39;s to change to right lane
Definition: MSVehicle.h:212
void removeApproachingInformation(DriveItemVector &lfLinks) const
unregister approach from all upcoming links
Definition: MSVehicle.cpp:3207
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
Definition: MSVehicle.h:728
Stores the waiting intervals over the previous seconds (memory is to be specified in ms...
Definition: MSVehicle.h:152
PositionVector getBoundingBox() const
get bounding rectangle
Definition: MSVehicle.cpp:3272
Encapsulated SAX-Attributes.
ChangeRequest
Requests set via TraCI.
Definition: MSVehicle.h:206
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the subpart of best lanes that describes the vehicle&#39;s current lane and their successors...
Definition: MSVehicle.cpp:2808
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
bool willPass(const MSEdge *const edge) const
Returns whether the vehicle wil pass the given edge.
Definition: MSVehicle.cpp:663
SUMOReal myAngle
the angle (
Definition: MSVehicle.h:1425
A list of positions.
void updateBestLanes(bool forceRebuild=false, const MSLane *startLane=0)
computes the best lanes to use in order to continue the route
Definition: MSVehicle.cpp:2480
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Definition: MSVehicle.h:754
Position myCachedPosition
Definition: MSVehicle.h:1430
const MSLane * lane
The lane to stop at.
Definition: MSVehicle.h:724
SUMOReal myOriginalSpeed
The velocity before influence.
Definition: MSVehicle.h:1244
std::vector< SUMOReal > myFurtherLanesPosLat
Definition: MSVehicle.h:1408
bool addStop(const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0)
Adds a stop.
Definition: MSVehicle.cpp:860
std::list< Stop > myStops
The vehicle&#39;s list of stops.
Definition: MSVehicle.h:1395
ConstMSEdgeVector::const_iterator MSRouteIterator
Definition: MSRoute.h:65
PositionVector getBoundingPoly() const
get bounding polygon
Definition: MSVehicle.cpp:3285
bool isStopped() const
Returns whether the vehicle is at a stop.
Definition: MSVehicle.cpp:988
bool isStoppedInRange(SUMOReal pos) const
return whether the given position is within range of the current stop
Definition: MSVehicle.cpp:1006
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
Definition: MSVehicle.h:1256
#define STEPS2TIME(x)
Definition: SUMOTime.h:65
void adaptLeaveSpeed(const SUMOReal v)
Definition: MSVehicle.h:1473
MSLane * myLane
The lane the vehicle is on.
Definition: MSVehicle.h:1382
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
Definition: MSVehicle.h:1186
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition) ...
Definition: MSVehicle.h:1420
Blinker lights on both sides are switched on.
Definition: MSVehicle.h:946
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
Definition: MSVehicle.h:1565
void resetRoutePosition(int index)
Definition: MSVehicle.cpp:675
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
Definition: MSVehicle.h:1390
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
Definition: MSVehicle.cpp:3017
SUMOReal getDistanceToPosition(SUMOReal destPos, const MSEdge *destEdge) const
Definition: MSVehicle.cpp:2862
SUMOReal getSafeFollowSpeed(const std::pair< const MSVehicle *, SUMOReal > leaderInfo, const SUMOReal seen, const MSLane *const lane, SUMOReal distToCrossing) const
compute safe speed for following the given leader
Definition: MSVehicle.cpp:1538
SUMOReal getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
Definition: MSVehicle.cpp:2028
SUMOTime duration
The stopping duration.
Definition: MSVehicle.h:736
T MIN2(T a, T b)
Definition: StdDefs.h:69
The brake lights are on.
Definition: MSVehicle.h:948
SUMOReal getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs...
Definition: MSVehicle.h:512
SUMOReal estimateSpeedAfterDistance(const SUMOReal dist, const SUMOReal v, const SUMOReal accel) const
Definition: MSVehicle.h:1511
A blue emergency light is on.
Definition: MSVehicle.h:964
A structure representing the best lanes for continuing the route.
Definition: MSVehicle.h:614
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
Definition: MSVehicle.cpp:3514
Everything is switched off.
Definition: MSVehicle.h:940
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
Definition: MSVehicle.cpp:591
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
Definition: MSVehicle.h:750
Something on a lane to be noticed about vehicle movement.
void fixPosition()
repair errors in vehicle position after changing between internal edges
Definition: MSVehicle.cpp:2854
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
Definition: MSVehicle.h:1372
One of the left doors is opened.
Definition: MSVehicle.h:960
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
Definition: MSVehicle.h:1280
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, SUMOReal &myStopDist) const
Definition: MSVehicle.cpp:1198
bool isParking() const
Returns whether the vehicle is parking.
Definition: MSVehicle.cpp:994
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
Definition: MSVehicle.h:1278
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
Definition: MSVehicle.cpp:2474
int getRoutePosition() const
Definition: MSVehicle.cpp:669
bool knowsEdgeTest(MSEdge &edge) const
State(SUMOReal pos, SUMOReal speed, SUMOReal posLat, SUMOReal backPos)
Constructor.
Definition: MSVehicle.cpp:138
int getPersonNumber() const
Returns the number of persons.
Definition: MSVehicle.cpp:3027
bool allowsContinuation
Whether this lane allows to continue the drive.
Definition: MSVehicle.h:628
SUMOReal getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
Definition: MSVehicle.cpp:2959
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
Definition: MSVehicle.cpp:3007
Container that holds the vehicles driving state (position+speed).
Definition: MSVehicle.h:91
void saveState(OutputDevice &out)
Saves the states of a vehicle.
Definition: MSVehicle.cpp:3499
SUMOReal getOriginalSpeed() const
Returns the originally longitudinal speed to use.
Definition: MSVehicle.h:1214
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle&#39;s car following model variables.
Definition: MSVehicle.h:709
SUMOReal getNOxEmissions() const
Returns NOx emission of the current state.
Definition: MSVehicle.cpp:2935
SUMOReal getRightSideOnLane() const
Get the vehicle&#39;s lateral position on the lane:
Definition: MSVehicle.cpp:3113
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
Definition: MSVehicle.h:1262
MSEdgeWeightsStorage & _getWeightsStorage() const
Definition: MSVehicle.cpp:696
ConstMSEdgeVector myVTDRoute
Definition: MSVehicle.h:1270
void leaveLane(const MSMoveReminder::Notification reason)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
Definition: MSVehicle.cpp:2413
SUMOReal getMaxAccel() const
Get the vehicle type&#39;s maximum acceleration [m/s^2].
Definition: MSCFModel.h:178
SUMOReal getPMxEmissions() const
Returns PMx emission of the current state.
Definition: MSVehicle.cpp:2941
SUMOReal getCOEmissions() const
Returns CO emission of the current state.
Definition: MSVehicle.cpp:2923
Abstract in-vehicle device.
Definition: MSDevice.h:69
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
Definition: MSVehicle.cpp:2791
const std::vector< SUMOReal > & getFurtherLanesPosLat() const
Definition: MSVehicle.h:604
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
Definition: MSVehicle.cpp:3076
SUMOReal getLatOffset(const MSLane *lane) const
Get the offset that that must be added to interpret myState.myPosLat for the given lane...
Definition: MSVehicle.cpp:3157
vehicle want&#39;s to change to left lane
Definition: MSVehicle.h:210
const std::vector< MSLane * > & getFurtherLanes() const
Definition: MSVehicle.h:600
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Definition: MSVehicle.cpp:3448
Structure representing possible vehicle parameter.
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
Definition: MSVehicle.h:1200
LaneChangeMode mySublaneLC
changing to the prefered lateral alignment
Definition: MSVehicle.h:1284
SUMOTime getAccumulatedWaitingTime(SUMOTime t=MSGlobals::gWaitingTimeMemory) const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
Definition: MSVehicle.h:491
std::vector< std::pair< SUMOTime, SUMOReal > > mySpeedTimeLine
The velocity time line to apply.
Definition: MSVehicle.h:1238
SUMOReal getSlope() const
Returns the slope of the road at vehicle&#39;s position.
Definition: MSVehicle.cpp:750
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: MSVehicle.h:742
void setVTDState(Position xyPos)
sets position outside the road network
Definition: MSVehicle.cpp:3485
SUMOTime getLastAccessTimeStep() const
Definition: MSVehicle.h:1220
SUMOReal occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
Definition: MSVehicle.h:622
SUMOReal getAcceleration() const
Returns the vehicle&#39;s acceleration in m/s.
Definition: MSVehicle.h:418
SUMOReal getCenterOnEdge(const MSLane *lane=0) const
Get the vehicle&#39;s lateral position on the edge of the given lane (or its current edge if lane == 0) ...
Definition: MSVehicle.cpp:3125
int mySignals
State of things of the vehicle that can be on or off.
Definition: MSVehicle.h:1411
std::vector< MSLane * > bestContinuations
Consecutive lane that can be followed without a lane change (contribute to length and occupation) ...
Definition: MSVehicle.h:630
Definition of vehicle stop (position and duration)
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
Definition: MSVehicle.h:748
SUMOReal getFuelConsumption() const
Returns fuel consumption of the current state.
Definition: MSVehicle.cpp:2947
void adaptToLeader(const std::pair< const MSVehicle *, SUMOReal > leaderInfo, const SUMOReal seen, DriveProcessItem *const lastLink, const MSLane *const lane, SUMOReal &v, SUMOReal &vLinkPass, SUMOReal distToCrossing=-1) const
Definition: MSVehicle.cpp:1504
const MSVehicleType & getVehicleType() const
Returns the vehicle&#39;s type definition.
Definition: MSBaseVehicle.h:97
SUMOTime until
The time at which the vehicle may continue its journey.
Definition: MSVehicle.h:738
const ConstMSEdgeVector getStopEdges() const
Returns the list of still pending stop edges.
Definition: MSVehicle.cpp:1137
friend class MSVehicle
vehicle sets states directly
Definition: MSVehicle.h:93
MSRouteIterator edge
The edge in the route to stop at.
Definition: MSVehicle.h:722
const waitingIntervalList & getWaitingIntervals() const
Definition: MSVehicle.h:185
bool addTraciBusOrContainerStop(const std::string &stopId, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, const bool isContainerStop, std::string &errorMsg)
Definition: MSVehicle.cpp:3355
SUMOReal getSpeed() const
Returns the vehicle&#39;s current speed.
Definition: MSVehicle.h:410
bool isFrontOnLane(const MSLane *lane) const
Returns the information whether the front of the vehicle is on the given lane.
Definition: MSVehicle.cpp:2022
SUMOReal myPos
the stored position
Definition: MSVehicle.h:133
SUMOReal getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:502
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
Definition: MSVehicle.cpp:1000
waitingIntervalList myWaitingIntervals
Definition: MSVehicle.h:196
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
Definition: MSGlobals.h:105
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during lookForward.
Definition: MSVehicle.h:1486
SUMOReal nextStopDist() const
return the distance to the next stop or SUMORealMax if there is none.
Definition: MSVehicle.h:791
SUMOReal endPos
The stopping position end.
Definition: MSVehicle.h:734
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
Definition: MSVehicle.cpp:787
vehicle want&#39;s to keep the current lane
Definition: MSVehicle.h:214
int getSignals() const
Returns the signals.
Definition: MSVehicle.h:1011
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
SUMOReal myPosLat
the stored lateral position
Definition: MSVehicle.h:139
#define SUMOReal
Definition: config.h:213
void switchOffSignal(int signal)
Switches the given signal off.
Definition: MSVehicle.h:1003
void switchOnSignal(int signal)
Switches the given signal on.
Definition: MSVehicle.h:995
void addPerson(MSTransportable *person)
Adds a passenger.
Definition: MSVehicle.cpp:2965
static std::vector< MSLane * > myEmptyLaneVector
Definition: MSVehicle.h:1391
void adaptBestLanesOccupation(int laneIndex, SUMOReal density)
update occupation from MSLaneChanger
Definition: MSVehicle.cpp:2846
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
Definition: MSVehicle.h:532
SUMOReal myBackPos
the stored back position
Definition: MSVehicle.h:144
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
Definition: MSVehicle.cpp:166
virtual ~MSVehicle()
Destructor.
Definition: MSVehicle.cpp:568
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane&#39;s maximum speed, given a vehicle&#39;s speed limit adaptation.
Definition: MSLane.h:453
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
Definition: MSVehicle.h:455
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
Definition: MSVehicle.h:1247
MSLane * getLane() const
Returns the lane the vehicle is on.
Definition: MSVehicle.h:447
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
Definition: MSVehicle.cpp:3472
void activateReminders(const MSMoveReminder::Notification reason)
"Activates" all current move reminder
Definition: MSVehicle.cpp:2256
SUMOReal getTimeGap() const
Returns the time gap in seconds to the leader of the vehicle looking for a fixed distance.
Definition: MSVehicle.cpp:2907
SUMOReal getBackPositionOnLane() const
Get the vehicle&#39;s position relative to its current lane.
Definition: MSVehicle.h:367
bool addTraciStop(MSLane *const lane, const SUMOReal startPos, const SUMOReal endPos, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, std::string &errorMsg)
Definition: MSVehicle.cpp:3322
SUMOReal startPos
The stopping position start.
Definition: MSVehicle.h:732
A red emergency light is on.
Definition: MSVehicle.h:966
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
Definition: MSVehicle.h:726
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle&#39;s internal edge travel times/efforts container.
Definition: MSVehicle.cpp:684
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle&#39;s entering of a new lane.
Definition: MSVehicle.cpp:730
One of the right doors is opened.
Definition: MSVehicle.h:962
Interface for lane-change models.
int getBestLaneOffset() const
returns the current offset from the best lane
Definition: MSVehicle.cpp:2836
SUMOReal posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
Definition: MSVehicle.h:121
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
Definition: MSVehicle.h:1250
MSDevice_Transportable * myContainerDevice
The containers this vehicle may have.
Definition: MSVehicle.h:1401
The fog lights are on (no visualisation)
Definition: MSVehicle.h:952
bool parking
whether the vehicle is removed from the net while stopping
Definition: MSVehicle.h:744
SUMOReal getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MSVehicle.h:520
A yellow emergency light is on.
Definition: MSVehicle.h:968
const Position getBackPosition() const
Definition: MSVehicle.cpp:836