22 #ifndef MSCFModel_SmartSK_h
23 #define MSCFModel_SmartSK_h
Representation of a vehicle in the micro simulation.
The car-following model abstraction.
virtual SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
static SUMOReal rand()
Returns a random real number in [0, 1)
virtual SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
virtual int getModelID() const
Returns the model's name.
~MSCFModel_SmartSK()
Destructor.
SUMOReal myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
virtual void updateMyHeadway(const MSVehicle *const veh) const
virtual SUMOReal dawdle(SUMOReal speed) const
Applies driver imperfection (dawdling / sigma)
The car-following model and parameter.
void setMaxDecel(SUMOReal decel)
Sets a new value for maximum deceleration [m/s^2].
MSCFModel_SmartSK(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime, SUMOReal tmp1, SUMOReal tmp2, SUMOReal tmp3, SUMOReal tmp4, SUMOReal tmp5)
Constructor.
std::map< int, SUMOReal > ggOld
SUMOReal myTmp1
temporary (testing) parameter
The original Krauss (1998) car-following model and parameter.
SUMOReal myS2Sspeed
new variables needed in this model; myS2Sspeed is the speed below which the vehicle does not move whe...
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
SUMOReal getImperfection() const
Get the driver's imperfection.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
void setImperfection(SUMOReal imperfection)
Sets a new value for driver imperfection.
SUMOReal myTauDecel
The precomputed value for myDecel*myTau.
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].
virtual SUMOReal _vsafe(const MSVehicle *const veh, SUMOReal gap, SUMOReal predSpeed) const
Returns the "safe" velocity.
SUMOReal myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
void setHeadwayTime(SUMOReal headwayTime)
Sets a new value for driver reaction time [s].