42 myTauDecel(myDecel * myHeadwayTime),
56 std::cout <<
"# s2s-speed: " <<
myS2Sspeed << std::endl;
64 std::cout <<
"# maxDeltaGap = " <<
maxDeltaGap << std::endl;
80 if (vars->
ggOld.size() > 1) {
81 std::cout <<
"# more than one entry in ggOld list. Speed is " << vPos <<
", corresponding dist is " << vars->
ggOld[(int) vPos] <<
"\n";
82 for (std::map<int, double>::iterator I = vars->
ggOld.begin(); I != vars->
ggOld.end(); I++) {
83 std::cout <<
"# " << (*I).first <<
' ' << (*I).second << std::endl;
98 double tTauTest = gap / speed;
100 if ((tTauTest < vars->myHeadway) && (tTauTest >
TS)) {
105 double vsafe =
_vsafe(veh, gap, predSpeed);
113 vars->
ggOld[(int)vNew] = gap;
123 double tTauTest = gap / speed;
125 if ((tTauTest < vars->myHeadway) && (tTauTest >
TS)) {
146 if (predSpeed == 0 && gap < 0.01) {
153 double vsafe = (double)(-1. * bTau
156 + (predSpeed * predSpeed)
std::map< int, double > ggOld
The original Krauss (1998) car-following model and parameter.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply dawdling
double myTauDecel
The precomputed value for myDecel*myTau.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
virtual double _vsafe(const MSVehicle *const veh, double gap, double predSpeed) const
Returns the "safe" velocity.
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed (no dawdling)
double myS2Sspeed
new variables needed in this model; myS2Sspeed is the speed below which the vehicle does not move whe...
double myTmp1
temporary (testing) parameter
virtual void updateMyHeadway(const MSVehicle *const veh) const
~MSCFModel_SmartSK()
Destructor.
MSCFModel_SmartSK(const MSVehicleType *vtype)
Constructor.
virtual double dawdle(double speed, SumoRNG *rng) const
Applies driver imperfection (dawdling / sigma)
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
virtual double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
The car-following model abstraction.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
virtual double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences. Called at most once per simulation...
CalcReason
What the return value of stop/follow/free-Speed is used for.
double myDecel
The vehicle's maximum deceleration [m/s^2].
double myAccel
The vehicle's maximum acceleration [m/s^2].
virtual double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
Representation of a vehicle in the micro simulation.
double getSpeed() const
Returns the vehicle's current speed.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
The car-following model and parameter.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
Structure representing possible vehicle parameter.