60 myEstimation(estimation),
61 myAX(vtype->getLength() + 1. + 2. * security),
62 myCX(25. *(1. + security + estimation)),
63 myMinAccel(0.2 * myAccel) {
81 return _v(veh, predSpeed, gap2pred);
121 const SUMOReal sdv = sdv_root * sdv_root;
122 const SUMOReal cldv = sdv * ex * ex;
128 }
else if (dx < sdx) {
131 }
else if (dv > opdv) {
137 if (dv > sdv && dx <
D_MAX) {
172 return 0.5 * dv * dv / (bx - dx);
201 if (predSpeed == 0 && gap < 0.01) {
206 const int predSteps = int(predSpeed / speedReduction);
207 const SUMOReal leaderContrib = 2. *
myDecel * (gap +
SPEED2DIST(predSteps * predSpeed - speedReduction * predSteps * (predSteps + 1) / 2));
208 return (
SUMOReal)(-tauDecel + sqrt(tauDecel * tauDecel + leaderContrib));
SUMOReal getSpeedAfterMaxDecel(SUMOReal v) const
Returns the velocity after maximum deceleration.
static SUMOReal randNorm(SUMOReal mean, SUMOReal variance, MTRand *rng=0)
Access to a random number from a normal distribution.
SUMOReal _v(const MSVehicle *veh, SUMOReal predSpeed, SUMOReal gap) const
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
const MSVehicleType * myType
The type to which this model definition belongs to.
MSCFModel_Wiedemann(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal security, SUMOReal estimation)
Constructor.
SUMOReal interactionGap(const MSVehicle *const, SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
The car-following model abstraction.
virtual SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
SUMOReal myAccel
The vehicle's maximum acceleration [m/s^2].
SUMOReal getLength() const
Get vehicle's length [m].
const SUMOReal myAX
front-bumper to front-bumper distance
SUMOReal myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
#define UNUSED_PARAMETER(x)
The car-following model and parameter.
SUMOReal accelSign
state variable for remembering the drift direction
static const SUMOReal D_MAX
free-flow distance in m
const SUMOReal myEstimation
The driver's estimation parameter // also 'ZF2'.
const SUMOReal myMinAccel
The vehicle's minimum acceleration [m/s^2].
~MSCFModel_Wiedemann()
Destructor.
SUMOReal getMaxSpeed() const
Returns the maximum speed.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
const SUMOReal myCX
perception threshold modifier
SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const
SUMOReal following(SUMOReal sign) const
const SUMOReal mySecurity
The driver's security parameter // also 'ZF1'.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const
SUMOReal emergency(SUMOReal dv, SUMOReal dx) const
virtual SUMOReal maxNextSpeed(SUMOReal speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].
SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const
vsafe from krauss since Wiedemann is deficient at approaching