100 const SUMOReal n = floor((1.0 / 2.0) - ((t + (pow(((s * s) + (4.0 * ((s * ((2.0 * g / b) - t)) + (t * t)))), (1.0 / 2.0)) * -0.5)) / s));
101 const SUMOReal h = 0.5 * n * (n - 1) * b * s + n * b * t;
105 const SUMOReal r = (g - h) / (n * s + t);
MSCFModel_Krauss(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime)
Constructor.
Representation of a vehicle in the micro simulation.
SUMOReal _vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Returns the "safe" velocity.
virtual SUMOReal maxNextSpeed(SUMOReal speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
The car-following model abstraction.
SUMOReal myAccel
The vehicle's maximum acceleration [m/s^2].
static SUMOReal rand()
Returns a random real number in [0, 1)
The original Krauss (1998) car-following model and parameter.
~MSCFModel_Krauss()
Destructor.
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) ...
SUMOReal myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
The car-following model and parameter.
SUMOReal brakeGap(const SUMOReal speed) const
Returns the distance the vehicle needs to halt including driver's reaction time.
SUMOReal myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal dawdle(SUMOReal speed) const
Applies driver imperfection (dawdling / sigma)
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].
SUMOReal _vstop(SUMOReal gap) const
Returns the "safe" velocity for stopping within gap.