21 #ifndef MSCFModel_SmartSK_h 22 #define MSCFModel_SmartSK_h 55 double decel,
double emergencyDecel,
double apparentDecel,
56 double dawdle,
double headwayTime,
57 double tmp1,
double tmp2,
double tmp3,
double tmp4,
double tmp5);
83 virtual double followSpeed(
const MSVehicle*
const veh,
double speed,
double gap2pred,
double predSpeed,
double predMaxDecel)
const;
93 virtual double stopSpeed(
const MSVehicle*
const veh,
const double speed,
double gap2pred)
const;
156 virtual double _vsafe(
const MSVehicle*
const veh,
double gap,
double predSpeed)
const;
163 virtual double dawdle(
double speed)
const;
virtual double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) 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.
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
virtual int getModelID() const
Returns the model's name.
The car-following model abstraction.
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
~MSCFModel_SmartSK()
Destructor.
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].
The car-following model and parameter.
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...
The original Krauss (1998) car-following model and parameter.
double myDecel
The vehicle's maximum deceleration [m/s^2].
virtual double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
MSCFModel_SmartSK(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5)
Constructor.
double getImperfection() const
Get the driver's imperfection.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
double myTauDecel
The precomputed value for myDecel*myTau.
virtual void updateMyHeadway(const MSVehicle *const veh) const
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) 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...
std::map< int, double > ggOld
double myTmp1
temporary (testing) parameter