43 double decel,
double emergencyDecel,
double headwayTime,
double k,
double phi) :
44 MSCFModel(vtype, accel, decel, emergencyDecel, decel, headwayTime), myK(k), myPhi(phi),
45 myTauDecel(decel * headwayTime) {
83 if (predSpeed == 0 && gap < 0.01) {
91 double va =
MAX2((
double) 0,
MIN3(vfree, vsafe, vcond)) + vars->
rand;
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
T MIN4(T a, T b, T c, T d)
The car-following model abstraction.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
double myAccel
The vehicle's maximum acceleration [m/s^2].
virtual double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model and parameter.
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
static double rand()
Returns a random real number in [0, 1)
double myPhi
Kerner's phi.
double myDecel
The vehicle's maximum deceleration [m/s^2].
double _v(const MSVehicle *const veh, double speed, double vfree, double gap, double predSpeed) const
Returns the "safe" velocity.
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
MSCFModel_Kerner(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double headwayTime, double k, double phi)
Constructor.
double myTauDecel
The precomputed value for myDecel*myTau.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
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) ...
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
~MSCFModel_Kerner()
Destructor.