 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
44 myTauDecel(myDecel * myHeadwayTime),
58 std::cout <<
"# s2s-speed: " <<
myS2Sspeed << std::endl;
66 std::cout <<
"# maxDeltaGap = " <<
maxDeltaGap << std::endl;
82 if (vars->
ggOld.size() > 1) {
83 std::cout <<
"# more than one entry in ggOld list. Speed is " << vPos <<
", corresponding dist is " << vars->
ggOld[(int) vPos] <<
"\n";
84 for (std::map<int, double>::iterator I = vars->
ggOld.begin(); I != vars->
ggOld.end(); I++) {
85 std::cout <<
"# " << (*I).first <<
' ' << (*I).second << std::endl;
100 double tTauTest = gap / speed;
102 if ((tTauTest < vars->myHeadway) && (tTauTest >
TS)) {
107 double vsafe =
_vsafe(veh, gap, predSpeed);
115 vars->
ggOld[(int)vNew] = gap;
125 double tTauTest = gap / speed;
127 if ((tTauTest < vars->myHeadway) && (tTauTest >
TS)) {
148 if (predSpeed == 0 && gap < 0.01) {
155 double vsafe = (double)(-1. * bTau
158 + (predSpeed * predSpeed)
The car-following model and parameter.
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle's safe speed (no dawdling)
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
double myS2Sspeed
new variables needed in this model; myS2Sspeed is the speed below which the vehicle does not move whe...
~MSCFModel_SmartSK()
Destructor.
double myTmp1
temporary (testing) parameter
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
virtual double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences. Called at most once per simulation...
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
Structure representing possible vehicle parameter.
virtual double dawdle(double speed, std::mt19937 *rng) const
Applies driver imperfection (dawdling / sigma)
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
virtual 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)
virtual double _vsafe(const MSVehicle *const veh, double gap, double predSpeed) const
Returns the "safe" velocity.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply dawdling
double myTauDecel
The precomputed value for myDecel*myTau.
virtual double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
virtual void updateMyHeadway(const MSVehicle *const veh) const
double myDecel
The vehicle's maximum deceleration [m/s^2].
The car-following model abstraction.
double getSpeed() const
Returns the vehicle's current speed.
MSCFModel_SmartSK(const MSVehicleType *vtype)
Constructor.
double myAccel
The vehicle's maximum acceleration [m/s^2].
std::map< int, double > ggOld
std::mt19937 * getRNG() const
Representation of a vehicle in the micro simulation.