Eclipse SUMO - Simulation of Urban MObility
MSDevice_ToC.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-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 /****************************************************************************/
17 // The ToC Device controls the transition of control between automated and manual driving.
18 //
19 /****************************************************************************/
20 #ifndef MSDevice_ToC_h
21 #define MSDevice_ToC_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <random>
30 #include <queue>
31 #include "MSVehicleDevice.h"
32 #include <utils/common/SUMOTime.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class SUMOVehicle;
40 class MSVehicle;
41 class Command_ToCTrigger;
42 class Command_ToCProcess;
43 class RGBColor;
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
55 class MSDevice_ToC : public MSVehicleDevice {
56 private:
57  // All currently existing ToC device instances
58  static std::set<MSDevice_ToC*, ComparatorNumericalIdLess> myInstances;
59  // All files, that receive ToC output (TODO: check if required)
60  static std::set<std::string> createdOutputFiles;
61 
62  struct OpenGapParams {
65  double changeRate;
66  double maxDecel;
67  bool active;
68  OpenGapParams(double timegap, double spacing, double changeRate, double maxDecel, bool active) :
70  {};
71  };
72 
73 public:
77  static void insertOptions(OptionsCont& oc);
78 
79 
90  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSVehicleDevice*>& into);
91 
94  static const std::set<MSDevice_ToC*, ComparatorNumericalIdLess>& getInstances() {
95  return myInstances;
96  };
97 
100  static void cleanup();
101 
102 private:
103 
111  enum ToCState {
113  MANUAL = 1,
115  PREPARING_TOC = 3, // this applies only to the transition AUTOMATED -> MANUAL !
116  MRM = 4,
118  };
119 
122  static std::string getManualType(const SUMOVehicle& v, const OptionsCont& oc);
123  static std::string getAutomatedType(const SUMOVehicle& v, const OptionsCont& oc);
124  static double getResponseTime(const SUMOVehicle& v, const OptionsCont& oc);
125  static double getRecoveryRate(const SUMOVehicle& v, const OptionsCont& oc);
126  static double getLCAbstinence(const SUMOVehicle& v, const OptionsCont& oc);
127  static double getInitialAwareness(const SUMOVehicle& v, const OptionsCont& oc);
128  static double getMRMDecel(const SUMOVehicle& v, const OptionsCont& oc);
129  static double getDynamicToCThreshold(const SUMOVehicle& v, const OptionsCont& oc);
130  static double getDynamicMRMProbability(const SUMOVehicle& v, const OptionsCont& oc);
131  static double getMaxPreparationAccel(const SUMOVehicle& v, const OptionsCont& oc);
132  static bool getMRMKeepRight(const SUMOVehicle& v, const OptionsCont& oc);
133  static bool useColorScheme(const SUMOVehicle& v, const OptionsCont& oc);
134  static std::string getOutputFilename(const SUMOVehicle& v, const OptionsCont& oc);
135  static OpenGapParams getOpenGapParams(const SUMOVehicle& v, const OptionsCont& oc);
136 
137  static ToCState _2ToCState(const std::string&);
138  static std::string _2string(ToCState state);
140 
141 
142 public:
144  ~MSDevice_ToC();
145 
147  const std::string deviceName() const override {
148  return "toc";
149  }
150 
152  bool notifyMove(SUMOTrafficObject& veh,
153  double oldPos,
154  double newPos,
155  double newSpeed) override;
156 
158  std::string getParameter(const std::string& key) const override;
159 
161  void setParameter(const std::string& key, const std::string& value) override;
162 
163 
166 
169 
172 
175 
178 
181 
183  void writeOutput();
184 
187  return myOutputFile != nullptr;
188  }
189 
190  static std::mt19937* getResponseTimeRNG() {
191  return &myResponseTimeRNG;
192  }
193 private:
209  MSDevice_ToC(SUMOVehicle& holder, const std::string& id, const std::string& outputFilename,
210  std::string manualType, std::string automatedType, SUMOTime responseTime, double recoveryRate,
211  double lcAbstinence, double initialAwareness, double mrmDecel,
212  double dynamicToCThreshold, double dynamicMRMProbability, double maxPreparationAccel,
213  bool mrmKeepRight, bool useColorScheme, OpenGapParams ogp);
214 
219  void initColorScheme();
220 
222  void setAwareness(double value);
223 
225  void setState(ToCState state);
226 
227  // @brief Sets the device holder's color corresponding to the current state
228  void setVehicleColor();
229 
239  void requestToC(SUMOTime timeTillMRM, SUMOTime responseTime = -1000);
240 
243  void requestMRM();
244 
246  void switchHolderType(const std::string& targetTypeID);
247 
249  void descheduleMRM();
251  void descheduleToC();
255  void descheduleRecovery();
256 
258  void resetDeliberateLCs();
261 
263  bool isManuallyDriven();
265  bool isAutomated();
266 
270  bool checkDynamicToC();
271 
272 private:
275 
277  std::string myManualTypeID;
279  std::string myAutomatedTypeID;
280 
281 
290 
292  double myMRMDecel;
293 
296 
298  std::map<ToCState, RGBColor> myColorScheme;
299 
302 
305 
307 
310 
320 
323 
325  std::queue<std::pair<SUMOTime, std::string> > myEvents;
326 
329 
331  static int LCModeMRM;
332 
335 
340  // (Note that these MRMs will not induce full stops in most cases)
348 
351 
355 
358 
360  static std::vector<double> lookupResponseTimeMRMProbs;
361  static std::vector<double> lookupResponseTimeLeadTimes;
363  static double responseTimeMean(double leadTime) {
364  return MIN2(2 * sqrt(leadTime), 0.7 * leadTime);
365  };
369  static std::vector<std::vector<double> > lookupResponseTimeVariances;
370 
372  static std::mt19937 myResponseTimeRNG;
373 
376  double sampleResponseTime(double leadTime) const;
377 
380  static double interpolateVariance(double leadTime, double pMRM);
381 
382 private:
384  MSDevice_ToC(const MSDevice_ToC&);
385 
388 
389 
390 };
391 
392 
393 #endif
394 
395 /****************************************************************************/
396 
MSDevice_ToC::OpenGapParams::newTimeHeadway
double newTimeHeadway
Definition: MSDevice_ToC.h:63
MSDevice_ToC::myUseColorScheme
bool myUseColorScheme
Whether a coloring scheme shall by applied to indicate the different toc stages,.
Definition: MSDevice_ToC.h:301
SUMOTrafficObject
Representation of a vehicle or person.
Definition: SUMOTrafficObject.h:48
MSDevice_ToC::myEvents
std::queue< std::pair< SUMOTime, std::string > > myEvents
Storage for events to be written to the output.
Definition: MSDevice_ToC.h:325
MSDevice_ToC::myManualTypeID
std::string myManualTypeID
vehicle type ID for manual driving
Definition: MSDevice_ToC.h:277
MSDevice_ToC::isAutomated
bool isAutomated()
Whether the current operation mode is automated.
Definition: MSDevice_ToC.cpp:1074
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:74
MSDevice_ToC::ToCState
ToCState
Enum describing the different regimes for the device,.
Definition: MSDevice_ToC.h:111
SUMOTime.h
MSDevice_ToC::myPreviousLCMode
int myPreviousLCMode
LC mode overridden during MRM, stored for restoration.
Definition: MSDevice_ToC.h:328
MSDevice_ToC::descheduleMRM
void descheduleMRM()
Break MRM Process or remove MRM-Trigger command from the event-queue.
Definition: MSDevice_ToC.cpp:688
MSDevice_ToC::triggerUpwardToC
SUMOTime triggerUpwardToC(SUMOTime t)
Trigger execution of a ToC X-->AUTOMATED ("upwards")
Definition: MSDevice_ToC.cpp:627
MSDevice_ToC::OpenGapParams::maxDecel
double maxDecel
Definition: MSDevice_ToC.h:66
MSDevice_ToC::OpenGapParams::OpenGapParams
OpenGapParams(double timegap, double spacing, double changeRate, double maxDecel, bool active)
Definition: MSDevice_ToC.h:68
MSDevice_ToC::OpenGapParams
Definition: MSDevice_ToC.h:62
MSDevice_ToC::generatesOutput
bool generatesOutput()
Whether this device requested to write output.
Definition: MSDevice_ToC.h:186
MSDevice_ToC::getMRMKeepRight
static bool getMRMKeepRight(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:258
MSVehicleDevice.h
MSDevice_ToC::getManualType
static std::string getManualType(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:202
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
MSDevice_ToC::myHolderMS
MSVehicle * myHolderMS
The holder vehicle casted to MSVehicle*.
Definition: MSDevice_ToC.h:309
MSDevice_ToC::sampleResponseTime
double sampleResponseTime(double leadTime) const
Samples a random driver response time from a truncated Gaussian with parameters according to the look...
Definition: MSDevice_ToC.cpp:1167
MSDevice_ToC::MRM
Definition: MSDevice_ToC.h:116
MSDevice_ToC::myExecuteMRMCommand
WrappingCommand< MSDevice_ToC > * myExecuteMRMCommand
Definition: MSDevice_ToC.h:317
MSDevice_ToC::getMRMDecel
static double getMRMDecel(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:232
MSDevice_ToC::triggerDownwardToC
SUMOTime triggerDownwardToC(SUMOTime t)
Trigger execution of a ToC X-->MANUAL ("downwards")
Definition: MSDevice_ToC.cpp:655
MSDevice_ToC::requestToC
void requestToC(SUMOTime timeTillMRM, SUMOTime responseTime=-1000)
Request a ToC. If the device is in AUTOMATED or MRM state, a driver response time is sampled and the ...
Definition: MSDevice_ToC.cpp:550
WrappingCommand.h
MSDevice_ToC::myCurrentAwareness
double myCurrentAwareness
Current awareness-level of the driver in [0,1].
Definition: MSDevice_ToC.h:295
MSDevice_ToC::descheduleRecovery
void descheduleRecovery()
Remove ongoing awareness recovery process from the event-queue.
Definition: MSDevice_ToC.cpp:724
MSDevice_ToC::deviceName
const std::string deviceName() const override
return the name for this type of device
Definition: MSDevice_ToC.h:147
MSDevice_ToC::getResponseTime
static double getResponseTime(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:212
MSDevice_ToC::myMaxPreparationAccel
double myMaxPreparationAccel
Maximal acceleration that may be applied during the ToC preparation phase TODO: Make effective.
Definition: MSDevice_ToC.h:354
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
MSDevice_ToC::responseTimeMean
static double responseTimeMean(double leadTime)
Mean of the response time distribution. (Only depends on given lead time)
Definition: MSDevice_ToC.h:363
WrappingCommand< MSDevice_ToC >
MSDevice_ToC::myResponseTimeRNG
static std::mt19937 myResponseTimeRNG
Random generator for ToC devices.
Definition: MSDevice_ToC.h:372
MSDevice_ToC::_2ToCState
static ToCState _2ToCState(const std::string &)
Definition: MSDevice_ToC.cpp:975
MSDevice_ToC::setVehicleColor
void setVehicleColor()
Definition: MSDevice_ToC.cpp:530
MSDevice_ToC::getLCAbstinence
static double getLCAbstinence(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:222
MSDevice_ToC::buildVehicleDevices
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
Definition: MSDevice_ToC.cpp:151
MSDevice_ToC::getDynamicMRMProbability
static double getDynamicMRMProbability(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:242
MSDevice_ToC::UNDEFINED
Definition: MSDevice_ToC.h:112
MSDevice_ToC::setState
void setState(ToCState state)
Set the ToC device's state.
Definition: MSDevice_ToC.cpp:483
MSDevice_ToC::initColorScheme
void initColorScheme()
Initialize vehicle colors for different states.
Definition: MSDevice_ToC.cpp:429
MSDevice_ToC::resetDeliberateLCs
void resetDeliberateLCs()
Resets the holder's LC mode to the last differing to LCModeMRM.
Definition: MSDevice_ToC.cpp:1044
MSDevice_ToC::OpenGapParams::active
bool active
Definition: MSDevice_ToC.h:67
MSDevice_ToC
The ToC Device controls transition of control between automated and manual driving.
Definition: MSDevice_ToC.h:55
MSDevice_ToC::~MSDevice_ToC
~MSDevice_ToC()
Destructor.
Definition: MSDevice_ToC.cpp:440
RGBColor
Definition: RGBColor.h:40
MSDevice_ToC::lookupResponseTimeLeadTimes
static std::vector< double > lookupResponseTimeLeadTimes
Definition: MSDevice_ToC.h:361
MSDevice_ToC::switchHolderType
void switchHolderType(const std::string &targetTypeID)
Switch the device holder's vehicle type.
Definition: MSDevice_ToC.cpp:734
MSDevice_ToC::myDynamicToCThreshold
double myDynamicToCThreshold
Duration in s. for which the vehicle needs to be able to follow its route without a lane change to co...
Definition: MSDevice_ToC.h:338
MSDevice_ToC::getDynamicToCThreshold
static double getDynamicToCThreshold(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:237
MSDevice_ToC::lookupResponseTimeMRMProbs
static std::vector< double > lookupResponseTimeMRMProbs
Grid of the response time distribution.
Definition: MSDevice_ToC.h:360
MSDevice_ToC::RECOVERING
Definition: MSDevice_ToC.h:117
MSDevice_ToC::triggerMRM
SUMOTime triggerMRM(SUMOTime t)
Trigger execution of an MRM.
Definition: MSDevice_ToC.cpp:601
MSDevice_ToC::myMRMProbability
double myMRMProbability
Probability of an MRM to occur after a dynamically triggered ToC.
Definition: MSDevice_ToC.h:341
MSDevice_ToC::myInitialAwareness
double myInitialAwareness
Average awareness the driver has initially after a ToC.
Definition: MSDevice_ToC.h:289
MSDevice_ToC::myColorScheme
std::map< ToCState, RGBColor > myColorScheme
Coloring scheme,.
Definition: MSDevice_ToC.h:298
MSDevice_ToC::interpolateVariance
static double interpolateVariance(double leadTime, double pMRM)
Two-dimensional interpolation of variance from lookup table assumes pMRM >= 0, leadTime >= 0.
Definition: MSDevice_ToC.cpp:1191
MSDevice_ToC::lookupResponseTimeVariances
static std::vector< std::vector< double > > lookupResponseTimeVariances
Variances of the response time distribution. Given the lead time and the MRM probability the variance...
Definition: MSDevice_ToC.h:365
MSDevice_ToC::myState
ToCState myState
Current state of the device.
Definition: MSDevice_ToC.h:304
MSDevice_ToC::AUTOMATED
Definition: MSDevice_ToC.h:114
MSDevice_ToC::getInitialAwareness
static double getInitialAwareness(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:227
MSDevice_ToC::setAwareness
void setAwareness(double value)
Set the awareness to the given value.
Definition: MSDevice_ToC.cpp:463
MSDevice_ToC::myOutputFile
OutputDevice * myOutputFile
The file the devices output goes to.
Definition: MSDevice_ToC.h:322
MSDevice_ToC::myOriginalMaxAccel
double myOriginalMaxAccel
Storage for original maximal acceleration of vehicle.
Definition: MSDevice_ToC.h:357
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
MSDevice_ToC::getAutomatedType
static std::string getAutomatedType(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:207
MSDevice_ToC::ToCPreparationStep
SUMOTime ToCPreparationStep(SUMOTime t)
Continue the ToC preparation for one time step.
Definition: MSDevice_ToC.cpp:748
MSDevice_ToC::MRMExecutionStep
SUMOTime MRMExecutionStep(SUMOTime t)
Continue the MRM for one time step.
Definition: MSDevice_ToC.cpp:765
MSDevice_ToC::myMRMKeepRight
bool myMRMKeepRight
Whether vehicle tries to change to the right during an MRM.
Definition: MSDevice_ToC.h:350
MSDevice_ToC::descheduleToCPreparation
void descheduleToCPreparation()
Remove ongoing ToC-Preparation process from the event-queue.
Definition: MSDevice_ToC.cpp:712
MSDevice_ToC::myInstances
static std::set< MSDevice_ToC *, ComparatorNumericalIdLess > myInstances
Definition: MSDevice_ToC.h:58
MSDevice_ToC::insertOptions
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_ToC-options.
Definition: MSDevice_ToC.cpp:109
MSDevice_ToC::getRecoveryRate
static double getRecoveryRate(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:217
MSDevice_ToC::operator=
MSDevice_ToC & operator=(const MSDevice_ToC &)
Invalidated assignment operator.
MSDevice_ToC::descheduleToC
void descheduleToC()
Remove scheduled ToC-Trigger command from the event-queue.
Definition: MSDevice_ToC.cpp:704
MSDevice_ToC::notifyMove
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed) override
Return value indicates whether the device still wants to be notified about the vehicle movement.
Definition: MSDevice_ToC.cpp:828
MSDevice_ToC::isManuallyDriven
bool isManuallyDriven()
Whether the current operation mode is manual.
Definition: MSDevice_ToC.cpp:1069
MSDevice_ToC::_2string
static std::string _2string(ToCState state)
Definition: MSDevice_ToC.cpp:996
MSDevice_ToC::checkDynamicToC
bool checkDynamicToC()
Check if the vehicle should induce a ToC due to internal reasons. That is, if the route cannot be fol...
Definition: MSDevice_ToC.cpp:1079
MSDevice_ToC::getOpenGapParams
static OpenGapParams getOpenGapParams(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:268
MSDevice_ToC::MANUAL
Definition: MSDevice_ToC.h:113
MSDevice_ToC::getParameter
std::string getParameter(const std::string &key) const override
try to retrieve the given parameter from this device. Throw exception for unsupported key
Definition: MSDevice_ToC.cpp:858
MSDevice_ToC::useColorScheme
static bool useColorScheme(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:263
MSDevice_ToC::requestMRM
void requestMRM()
Request an MRM to be initiated immediately. No downward ToC will be scheduled.
Definition: MSDevice_ToC.cpp:537
MSDevice_ToC::deactivateDeliberateLCs
void deactivateDeliberateLCs()
Resets the holder's LC mode to the operational LC-mode of the ToC Device (.
Definition: MSDevice_ToC.cpp:1056
config.h
MSDevice_ToC::createdOutputFiles
static std::set< std::string > createdOutputFiles
Definition: MSDevice_ToC.h:60
MSDevice_ToC::myDynamicToCLane
int myDynamicToCLane
Lane, on which the ongoing dynamic ToC was issued. It can only be aborted if the lane was changed.
Definition: MSDevice_ToC.h:347
MSDevice_ToC::getOutputFilename
static std::string getOutputFilename(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:180
MSDevice_ToC::myPrepareToCCommand
WrappingCommand< MSDevice_ToC > * myPrepareToCCommand
Definition: MSDevice_ToC.h:318
MSDevice_ToC::myTriggerMRMCommand
WrappingCommand< MSDevice_ToC > * myTriggerMRMCommand
Definition: MSDevice_ToC.h:314
MSDevice_ToC::PREPARING_TOC
Definition: MSDevice_ToC.h:115
MSDevice_ToC::OpenGapParams::changeRate
double changeRate
Definition: MSDevice_ToC.h:65
MSDevice_ToC::myOpenGapParams
OpenGapParams myOpenGapParams
Parameters for the openGap mechanism applied during ToC preparation phase.
Definition: MSDevice_ToC.h:334
MSDevice_ToC::myMRMDecel
double myMRMDecel
Deceleration rate applied during MRM.
Definition: MSDevice_ToC.h:292
MSDevice_ToC::myAutomatedTypeID
std::string myAutomatedTypeID
vehicle type ID for automated driving
Definition: MSDevice_ToC.h:279
MSDevice_ToC::myRecoveryRate
double myRecoveryRate
Recovery rate for the driver's awareness after a ToC.
Definition: MSDevice_ToC.h:285
MSDevice_ToC::setParameter
void setParameter(const std::string &key, const std::string &value) override
try to set the given parameter for this device. Throw exception for unsupported key
Definition: MSDevice_ToC.cpp:895
MSDevice_ToC::myDynamicToCActive
bool myDynamicToCActive
Switch for considering dynamic ToCs,.
Definition: MSDevice_ToC.h:343
MSDevice_ToC::myRecoverAwarenessCommand
WrappingCommand< MSDevice_ToC > * myRecoverAwarenessCommand
Definition: MSDevice_ToC.h:316
MSDevice_ToC::writeOutput
void writeOutput()
Write output to file given by option device.toc.file.
Definition: MSDevice_ToC.cpp:1017
MSDevice_ToC::getMaxPreparationAccel
static double getMaxPreparationAccel(const SUMOVehicle &v, const OptionsCont &oc)
Definition: MSDevice_ToC.cpp:253
MSDevice_ToC::getResponseTimeRNG
static std::mt19937 * getResponseTimeRNG()
Definition: MSDevice_ToC.h:190
MSDevice_ToC::myTriggerToCCommand
WrappingCommand< MSDevice_ToC > * myTriggerToCCommand
Definition: MSDevice_ToC.h:315
MSDevice_ToC::OpenGapParams::newSpaceHeadway
double newSpaceHeadway
Definition: MSDevice_ToC.h:64
MSDevice_ToC::LCModeMRM
static int LCModeMRM
LC mode operational during an MRM.
Definition: MSDevice_ToC.h:331
MSDevice_ToC::MSDevice_ToC
MSDevice_ToC(SUMOVehicle &holder, const std::string &id, const std::string &outputFilename, std::string manualType, std::string automatedType, SUMOTime responseTime, double recoveryRate, double lcAbstinence, double initialAwareness, double mrmDecel, double dynamicToCThreshold, double dynamicMRMProbability, double maxPreparationAccel, bool mrmKeepRight, bool useColorScheme, OpenGapParams ogp)
Constructor.
Definition: MSDevice_ToC.cpp:315
MSDevice_ToC::getInstances
static const std::set< MSDevice_ToC *, ComparatorNumericalIdLess > & getInstances()
returns all currently existing ToC devices
Definition: MSDevice_ToC.h:94
MSDevice_ToC::cleanup
static void cleanup()
Closes root tags of output files.
Definition: MSDevice_ToC.cpp:1033
MSDevice_ToC::awarenessRecoveryStep
SUMOTime awarenessRecoveryStep(SUMOTime t)
Continue the awareness recovery for one time step.
Definition: MSDevice_ToC.cpp:801
MSDevice_ToC::myIssuedDynamicToC
bool myIssuedDynamicToC
Flag to indicate that a dynamically triggered ToC is in preparation.
Definition: MSDevice_ToC.h:345
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
MSDevice_ToC::myResponseTime
SUMOTime myResponseTime
Average response time needed by the driver to take back control.
Definition: MSDevice_ToC.h:283
MSVehicleDevice
Abstract in-vehicle device.
Definition: MSVehicleDevice.h:55
MSDevice_ToC::myLCAbstinence
double myLCAbstinence
Level of the awareness below which no lane-changes are performed.
Definition: MSDevice_ToC.h:287