59 double headwayTime,
double adaptationFactor,
double adaptationTime,
60 double internalStepping);
158 double getSecureGap(
const MSVehicle*
const veh,
const MSVehicle*
const pred,
const double speed,
const double leaderSpeed,
const double leaderMaxDecel)
const;
198 double _v(
const MSVehicle*
const veh,
const double gap2pred,
const double mySpeed,
199 const double predSpeed,
const double desSpeed,
const bool respectMinGap =
true)
const;
double levelOfService
state variable for remembering speed deviation history (lambda)
The Intelligent Driver Model (IDM) car-following model.
const int myIterations
The number of iterations in speed calculations.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
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)
int getModelID() const
Returns the model's name.
virtual double freeSpeed(const MSVehicle *const veh, double speed, double seen, double maxSpeed, const bool onInsertion=false, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed without a leader.
~MSCFModel_IDM()
Destructor.
const bool myIDMM
whether the model is IDMM or IDM
double getSecureGap(const MSVehicle *const veh, const MSVehicle *const pred, const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
double insertionFollowSpeed(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) This method is used during the insertion stage....
const double myAdaptationTime
The IDMM adaptation time tau.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
MSCFModel_IDM(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double headwayTime, double adaptationFactor, double adaptationTime, double internalStepping)
Constructor.
const double myTwoSqrtAccelDecel
A computational shortcut.
const double myAdaptationFactor
The IDMM adaptation factor beta.
const double myDelta
The IDM delta exponent.
double insertionStopSpeed(const MSVehicle *const veh, double speed, double gap) const
Computes the vehicle's safe speed for approaching an obstacle at insertion without constraints due to...
double _v(const MSVehicle *const veh, const double gap2pred, const double mySpeed, const double predSpeed, const double desSpeed, const bool respectMinGap=true) const
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
MSCFModel_IDM & operator=(const MSCFModel_IDM &s)
Invalidated assignment operator.
The car-following model abstraction.
CalcReason
What the return value of stop/follow/free-Speed is used for.
@ CURRENT
the return value is used for calculating the next speed
Representation of a vehicle in the micro simulation.
The car-following model and parameter.