22 #ifndef MSDriverState_h 23 #define MSDriverState_h 43 OUProcess(
double initialState,
double timeScale,
double noiseIntensity);
113 return myMinAwareness;
117 return myInitialAwareness;
121 return myErrorTimeScaleCoefficient;
125 return myErrorNoiseIntensityCoefficient;
129 return myError.getTimeScale();
133 return myError.getNoiseIntensity();
137 return mySpeedDifferenceErrorCoefficient;
141 return myHeadwayErrorCoefficient;
145 return mySpeedDifferenceChangePerceptionThreshold;
149 return myHeadwayChangePerceptionThreshold;
157 return myMaximalReactionTime;
161 return myOriginalReactionTime;
165 return myActionStepLength;
169 return myError.getState();
177 myMinAwareness = value;
181 myInitialAwareness = value;
185 myErrorTimeScaleCoefficient = value;
189 myErrorNoiseIntensityCoefficient = value;
193 mySpeedDifferenceErrorCoefficient = value;
197 myHeadwayErrorCoefficient = value;
201 mySpeedDifferenceChangePerceptionThreshold = value;
205 myHeadwayChangePerceptionThreshold = value;
209 myMaximalReactionTime = value;
210 updateReactionTime();
214 myOriginalReactionTime = value;
215 updateReactionTime();
218 void setAwareness(
const double value);
221 myError.setState(state);
225 myError.setTimeScale(value);
229 myError.setNoiseIntensity(value);
239 void updateAssumedGaps();
253 double getPerceivedSpeedDifference(
const double trueSpeedDifference,
const double trueGap,
const void* objID =
nullptr);
255 double getPerceivedHeadway(
const double trueGap,
const void* objID =
nullptr);
272 void updateStepDuration();
276 void updateReactionTime();
double myAwareness
Driver's 'awareness' [0,1].
void setInitialAwareness(const double value)
double getState() const
Obtain the current state of the process.
double myLastUpdateTime
Time point of the last state update.
double myMinAwareness
Minimal value for 'awareness' [0,1].
Representation of a vehicle in the micro simulation.
void setSpeedDifferenceChangePerceptionThreshold(const double value)
double getMinAwareness() const
void setMinAwareness(const double value)
void setErrorTimeScaleCoefficient(const double value)
double getAwareness() const
double getMaximalReactionTime() const
static double headwayChangePerceptionThreshold
void setNoiseIntensity(double noiseIntensity)
set the process' noise intensity to a new value
double myActionStepLength
Action step length (~current maximal reaction time) induced by awareness level.
double myTimeScale
The time scale of the process.
double myInitialAwareness
Initial value for 'awareness' [0,1].
static double minAwareness
void setState(double state)
set the process' state to a new value
double myOriginalReactionTime
Maximal reaction time (value set for the actionStepLength at awareness=1)
static std::mt19937 * getRNG()
double myHeadwayErrorCoefficient
double getInitialAwareness() const
static double initialAwareness
void setHeadwayChangePerceptionThreshold(const double value)
MSVehicle * myVehicle
Vehicle corresponding to this driver state.
OUProcess(double initialState, double timeScale, double noiseIntensity)
constructor
static double headwayErrorCoefficient
static double errorTimeScaleCoefficient
double myMaximalReactionTime
Maximal reaction time (value set for the actionStepLength at awareness=myMinAwareness) ...
std::map< const void *, double > myLastPerceivedSpeedDifference
The last perceived speed differences to the corresponding objects.
double getActionStepLength() const
An Ornstein-Uhlenbeck stochastic process.
double myState
The current state of the process.
static double speedDifferenceErrorCoefficient
void setErrorNoiseIntensity(const double value)
bool myDebugLock
Used to prevent infinite loops in debugging outputs,.
void setTimeScale(double timeScale)
set the process' timescale to a new value
double getErrorNoiseIntensity() const
double getSpeedDifferenceChangePerceptionThreshold() const
void setErrorTimeScale(const double value)
double getHeadwayChangePerceptionThreshold() const
double getNoiseIntensity() const
static double speedDifferenceChangePerceptionThreshold
double getErrorState() const
void setHeadwayErrorCoefficient(const double value)
static std::mt19937 myRNG
Random generator for OUProcesses.
double getOriginalReactionTime() const
double getTimeScale() const
void setOriginalReactionTime(const double value)
double myErrorNoiseIntensityCoefficient
Coefficient controlling the impact of awareness on the noise intensity of the error process...
double getErrorTimeScaleCoefficient() const
std::map< const void *, double > myAssumedGap
The assumed gaps to different objects.
double myNoiseIntensity
The noise intensity of the process.
double getSpeedDifferenceErrorCoefficient() const
double mySpeedDifferenceErrorCoefficient
Scaling coefficients for the magnitude of errors.
double myErrorTimeScaleCoefficient
Coefficient controlling the impact of awareness on the time scale of the error process.
void setErrorNoiseIntensityCoefficient(const double value)
double mySpeedDifferenceChangePerceptionThreshold
void setSpeedDifferenceErrorCoefficient(const double value)
OUProcess myError
Driver's 'error',.
void step(double dt)
evolve for a time step of length dt.
static double maximalReactionTimeFactor
double myHeadwayChangePerceptionThreshold
Thresholds above a change in the corresponding quantity is perceived.
static double errorNoiseIntensityCoefficient
virtual ~MSSimpleDriverState()
double getErrorNoiseIntensityCoefficient() const
Provides an interface to an error whose fluctuation is controlled via the driver's 'awareness'...
void setErrorState(const double state)
double getHeadwayErrorCoefficient() const
double getErrorTimeScale() const
void setMaximalReactionTime(const double value)