47 double emergencyDecel,
double apparentDecel,
48 double dawdle,
double headwayTime) :
71 return MIN2(vsafe, vmax);
75 return MAX2(
MIN2(vsafe, vmax), vmin);
101 return MAX2(0., speed);
Representation of a vehicle in the micro simulation.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle's safe speed (no dawdling) this uses the maximumSafeFollowSpeed.
double myApparentDecel
The vehicle's deceleration as expected by surrounding traffic [m/s^2].
The car-following model abstraction.
double maximumSafeStopSpeed(double gap, double currentSpeed, bool onInsertion=false, double headway=-1) const
Returns the maximum next velocity for stopping within gap.
The original Krauss (1998) car-following model and parameter.
double myAccel
The vehicle's maximum acceleration [m/s^2].
~MSCFModel_Krauss()
Destructor.
The car-following model and parameter.
virtual double vsafe(double gap, double predSpeed, double predMaxDecel) const
Returns the "safe" velocity.
static double rand()
Returns a random real number in [0, 1)
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
double myDecel
The vehicle's maximum deceleration [m/s^2].
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
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) this uses the m...
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
virtual double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
static bool gSemiImplicitEulerUpdate
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
double maximumSafeFollowSpeed(double gap, double egoSpeed, double predSpeed, double predMaxDecel, bool onInsertion=false) const
Returns the maximum safe velocity for following the given leader.
MSCFModel_Krauss(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime)
Constructor.