43 double decel,
double emergencyDecel,
double apparentDecel,
44 double dawdle,
double headwayTime,
45 double tmp1,
double tmp2,
double tmp3,
double tmp4,
double tmp5) :
46 MSCFModel(vtype, accel, decel, emergencyDecel, apparentDecel, headwayTime),
47 myDawdle(dawdle), myTauDecel(decel * headwayTime),
48 myTmp1(tmp1), myTmp2(tmp2), myTmp3(tmp3), myTmp4(tmp4), myTmp5(tmp5) {
94 if (predSpeed == 0 && gap < 0.01) {
100 + (predSpeed * predSpeed)
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
double myTmp1
temporary (testing) parameter
Representation of a vehicle in the micro simulation.
double myTauDecel
The precomputed value for myDecel*myTau.
double myApparentDecel
The vehicle's deceleration as expected by surrounding traffic [m/s^2].
MSLane * getLane() const
Returns the lane the vehicle is on.
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
double myAccel
The vehicle's maximum acceleration [m/s^2].
virtual double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
#define WRITE_WARNING(msg)
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 ...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
double myDecel
The vehicle's maximum deceleration [m/s^2].
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
double myEmergencyDecel
The vehicle's maximum emergency deceleration [m/s^2].
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
virtual double _vsafe(double gap, double predSpeed) const
Returns the "safe" velocity.
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) ...
double myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
double getSpeed() const
Returns the vehicle's current speed.
const std::string & getID() const
Returns the name of the vehicle.
MSCFModel_Daniel1(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5)
Constructor.
~MSCFModel_Daniel1()
Destructor.