47 :
MSCFModel(vtype, accel, decel, headwayTime), myDelta(delta),
48 myAdaptationFactor(1.), myAdaptationTime(0.),
49 myIterations(
MAX2(1, int(
TS / internalStepping + .5))),
50 myTwoSqrtAccelDecel(
SUMOReal(2 * sqrt(accel * decel))) {
88 if (gap2pred < 0.01) {
112 const SUMOReal predSpeed,
const SUMOReal desSpeed,
const bool respectMinGap)
const {
124 const SUMOReal delta_v = newSpeed - predSpeed;
~MSCFModel_IDM()
Destructor.
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
const MSVehicleType * myType
The type to which this model definition belongs to.
MSLane * getLane() const
Returns the lane the vehicle is on.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
virtual SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
SUMOReal myAccel
The vehicle's maximum acceleration [m/s^2].
const SUMOReal myDelta
The IDM delta exponent.
SUMOReal levelOfService
state variable for remembering speed deviation history (lambda)
SUMOReal myHeadwayTime
The driver's desired time headway (aka reaction time tau) [s].
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
The car-following model and parameter.
MSCFModel_IDM(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal headwayTime, SUMOReal delta, SUMOReal internalStepping)
Constructor.
const SUMOReal myTwoSqrtAccelDecel
A computational shortcut.
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) ...
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
const int myIterations
The number of iterations in speed calculations.
SUMOReal interactionGap(const MSVehicle *const, SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
SUMOReal _v(const MSVehicle *const veh, const SUMOReal gap2pred, const SUMOReal mySpeed, const SUMOReal predSpeed, const SUMOReal desSpeed, const bool respectMinGap=true) const
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
const SUMOReal myAdaptationFactor
The IDMM adaptation factor beta.
const SUMOReal myAdaptationTime
The IDMM adaptation time tau.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
SUMOReal myDecel
The vehicle's maximum deceleration [m/s^2].