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) {
171 return 0.5 * dv * dv / (bx - dx);
198 if (predSpeed == 0 && gap < 0.01) {
203 const int predSteps =
int(predSpeed / speedReduction);
204 const SUMOReal leaderContrib = 2. *
myDecel * (gap +
SPEED2DIST(predSteps * predSpeed - speedReduction * predSteps * (predSteps + 1) / 2));
205 return (
SUMOReal)(-tauDecel + sqrt(tauDecel * tauDecel + leaderContrib));
SUMOReal getSpeedAfterMaxDecel(SUMOReal v) const
Returns the velocity after maximum deceleration.
Representation of a vehicle in the micro simulation.
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 getMaxSpeed() const
Returns the maximum speed.
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.
The car-following model abstraction.
SUMOReal myAccel
The vehicle's maximum acceleration [m/s^2].
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
SUMOReal getLength() const
Get vehicle's length [m].
static SUMOReal randNorm(SUMOReal mean, SUMOReal variance, MTRand &rng=myRandomNumberGenerator)
Access to a random number from a normal distribution.
SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const
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
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
const SUMOReal myEstimation
The driver's estimation parameter // also 'ZF2'.
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) ...
const SUMOReal myMinAccel
The vehicle's minimum acceleration [m/s^2].
SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const
~MSCFModel_Wiedemann()
Destructor.
SUMOReal following(SUMOReal sign) const
const SUMOReal myCX
perception threshold modifier
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
virtual SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
const SUMOReal mySecurity
The driver's security parameter // also 'ZF1'.
SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const
vsafe from krauss since Wiedemann is deficient at approaching
SUMOReal getSpeed() const
Returns the vehicle's current speed.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal _v(const MSVehicle *veh, SUMOReal predSpeed, SUMOReal gap) const
SUMOReal interactionGap(const MSVehicle *const , SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].