47 :
MSCFModel(vtype, accel, decel, headwayTime), myDawdle(dawdle), myTauDecel(decel * headwayTime) {
87 return followSpeed(veh, speed, gap2pred, predSpeed, predMaxDecel);
105 if (predSpeed == 0 && gap < 0.01) {
111 + (predSpeed * predSpeed)
SUMOReal getSpeedAfterMaxDecel(SUMOReal v) const
Returns the velocity after maximum deceleration.
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
Representation of a vehicle in the micro simulation.
virtual SUMOReal maxNextSpeed(SUMOReal speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
The car-following model abstraction.
virtual SUMOReal vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Returns the "safe" velocity.
~MSCFModel_KraussOrig1()
Destructor.
SUMOReal insertionFollowSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling) This method is used during the insertion stage...
SUMOReal myAccel
The vehicle's maximum acceleration [m/s^2].
static SUMOReal rand()
Returns a random real number in [0, 1)
SUMOReal myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
SUMOReal processNextStop(SUMOReal currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
SUMOReal myTauDecel
The precomputed value for myDecel*myTau.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model and parameter.
MSAbstractLaneChangeModel & getLaneChangeModel()
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
SUMOReal myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
virtual SUMOReal dawdle(SUMOReal speed) const
Applies driver imperfection (dawdling / sigma)
MSCFModel_KraussOrig1(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime)
Constructor.
virtual SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
virtual SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel &cfModel)=0
Called to adapt the speed in order to allow a lane change.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
MSLane * getLane() const
Returns the lane the vehicle is on.
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].