44 double emergencyDecel,
45 double dawdle,
double headwayTime,
double tauLast,
double apProb) :
46 MSCFModel(vtype, accel, decel, emergencyDecel, decel, headwayTime), myDawdle(dawdle),
47 myTauDecel(decel * headwayTime),
48 myDecelDivTau(decel / headwayTime),
49 myTauLastDecel(decel * tauLast),
50 myActionPointProbability(apProb) {
73 if (predSpeed == 0 && gap < 0.01) {
79 double apref = vars->
aOld;
102 if (apref <= asafe) {
Representation of a vehicle in the micro simulation.
double myTauDecel
The precomputed value for myDecel*myTau.
virtual double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
~MSCFModel_PWag2009()
Destructor.
double myAccel
The vehicle's maximum acceleration [m/s^2].
The car-following model and parameter.
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
static double rand()
Returns a random real number in [0, 1)
double myDecelDivTau
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 myDecel
The vehicle's maximum deceleration [m/s^2].
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
double myTauLastDecel
The precomputed value for (minimum headway time)*myDecel.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
MSCFModel_PWag2009(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double dawdle, double headwayTime, double tauLast, double apProb)
Constructor.
double myActionPointProbability
The probability for any action.
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
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 getSpeed() const
Returns the vehicle's current speed.