40 #define OVERBRAKING_THRESHOLD -3 46 double emergencyDecel,
double apparentDecel,
47 double dawdle,
double headwayTime,
48 double tmp1,
double tmp2):
49 MSCFModel_Krauss(vtype, accel, decel, emergencyDecel, apparentDecel, dawdle, headwayTime),
77 const double vDawdle =
dawdleX(oldV, vMin, vMax);
87 const double vDawdle =
dawdleX(oldV, vMin, vMax);
94 vNext =
MAX2(vNext, vMin);
117 speed =
MAX2(vMin, speed);
123 speed =
MAX2(0.0, speed);
Representation of a vehicle in the micro simulation.
virtual double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double myApparentDecel
The vehicle's deceleration as expected by surrounding traffic [m/s^2].
The car-following model abstraction.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
double myAccel
The vehicle's maximum acceleration [m/s^2].
double dawdleX(double vOld, double vMin, double vMax) const
Applies driver imperfection (dawdling / sigma)
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
The car-following model and parameter.
MSAbstractLaneChangeModel & getLaneChangeModel()
virtual double patchSpeed(const double min, const double wanted, const double max, const MSCFModel &cfModel)=0
Called to adapt the speed in order to allow a lane change. It uses information on LC-related desired ...
~MSCFModel_KraussX()
Destructor.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
double myDecel
The vehicle's maximum deceleration [m/s^2].
MSCFModel_KraussX(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tmp1, double tmp2)
Constructor.
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation...
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
virtual double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
double myTmp1
extension parameter nr1
static bool gSemiImplicitEulerUpdate
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
Krauss car-following model, with acceleration decrease and faster start.
double getSpeed() const
Returns the vehicle's current speed.