44 double decel,
double emergencyDecel,
double apparentDecel,
45 double dawdle,
double headwayTime,
double tauLast,
double apProb) :
46 MSCFModel(vtype, accel, decel, emergencyDecel, apparentDecel, 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.
double myApparentDecel
The vehicle's deceleration as expected by surrounding traffic [m/s^2].
virtual double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
~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.
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_PWag2009(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tauLast, double apProb)
Constructor.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
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.