143 virtual double _vsafe(
const MSVehicle*
const veh,
double gap,
double predSpeed)
const;
std::map< int, double > ggOld
The original Krauss (1998) car-following model and parameter.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply dawdling
double myTauDecel
The precomputed value for myDecel*myTau.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
virtual double _vsafe(const MSVehicle *const veh, double gap, double predSpeed) const
Returns the "safe" velocity.
void setMaxDecel(double decel)
Sets a new value for maximum deceleration [m/s^2].
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed (no dawdling)
double myS2Sspeed
new variables needed in this model; myS2Sspeed is the speed below which the vehicle does not move whe...
virtual int getModelID() const
Returns the model's name.
double myTmp1
temporary (testing) parameter
virtual void updateMyHeadway(const MSVehicle *const veh) const
~MSCFModel_SmartSK()
Destructor.
void setHeadwayTime(double headwayTime)
Sets a new value for desired headway [s].
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
virtual double dawdle(double speed, SumoRNG *rng) const
Applies driver imperfection (dawdling / sigma)
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double getImperfection() const
Get the driver's imperfection.
virtual double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
void setImperfection(double imperfection)
Sets a new value for driver imperfection.
The car-following model abstraction.
CalcReason
What the return value of stop/follow/free-Speed is used for.
@ CURRENT
the return value is used for calculating the next speed
double myDecel
The vehicle's maximum deceleration [m/s^2].
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
The car-following model and parameter.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)