30#ifndef MSCFMODEL_EIDM_H
31#define MSCFMODEL_EIDM_H
101 double maximumSafeFollowSpeed(
double gap,
double egoSpeed,
double predSpeed,
double predMaxDecel,
bool onInsertion =
false,
const CalcReason usage = CalcReason::CURRENT)
const;
110 double maximumSafeStopSpeed(
double gap,
double decel,
double currentSpeed,
bool onInsertion =
false,
double headway = -1)
const;
130 double predMaxDecel,
const MSVehicle*
const pred = 0,
const CalcReason usage = CalcReason::CURRENT)
const;
140 double stopSpeed(
const MSVehicle*
const veh,
const double speed,
double gap,
double decel,
const CalcReason usage = CalcReason::CURRENT)
const;
156 double maxSpeed,
const bool onInsertion =
false,
const CalcReason usage = CalcReason::CURRENT)
const;
158 static double freeSpeed(
const double currentSpeed,
const double decel,
const double dist,
const double maxSpeed,
const bool onInsertion);
176 double getSecureGap(
const MSVehicle*
const veh,
const MSVehicle*
const ,
const double speed,
const double leaderSpeed,
const double leaderMaxDecel)
const;
183 double brakeGap(
const double speed,
const double decel,
const double headwayTime)
const {
275 std::vector<std::pair<double, double>>
stop;
292 double _v(
const MSVehicle*
const veh,
const double gap2pred,
const double mySpeed,
293 const double predSpeed,
const double desSpeed,
const bool respectMinGap,
const int update,
const CalcReason usage)
const;
299 double internalsecuregap(
const MSVehicle*
const veh,
const double speed,
const double leaderSpeed,
const double targetDecel)
const;
#define UNUSED_PARAMETER(x)
std::vector< std::pair< double, double > > stop
The Extended Intelligent Driver Model (EIDM) car-following model.
const double myTPersEstimate
double patchSpeedBeforeLCEIDM(const MSVehicle *veh, double vMin, double vMax, const VehicleVariables *vars) const
Applies dawdling / driving error.
const double myTPersDrive
const bool myUseVehDynamics
~MSCFModel_EIDM()
Destructor.
double maximumLaneSpeedCF(const MSVehicle *const, double maxSpeed, double) const
Returns the maximum velocity the CF-model wants to achieve in the next step.
const double mySigmaleader
MSCFModel_EIDM & operator=(const MSCFModel_EIDM &s)
Invalidated assignment operator.
const double myEpsilonacc
double slowToStartTerm(MSVehicle *const veh, const double newSpeed, const double currentSpeed, const double vMax, VehicleVariables *vars) const
double maximumSafeFollowSpeed(double gap, double egoSpeed, double predSpeed, double predMaxDecel, bool onInsertion=false, const CalcReason usage=CalcReason::CURRENT) const
Returns the maximum safe velocity for following the given leader.
double maximumSafeStopSpeed(double gap, double decel, double currentSpeed, bool onInsertion=false, double headway=-1) const
Returns the maximum next velocity for stopping within gap.
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....
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
const double myTwoSqrtAccelDecel
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.
MSCFModel_EIDM(const MSVehicleType *vtype)
Constructor.
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...
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
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.
int getModelID() const
Returns the model's name.
double brakeGap(const double speed, const double decel, const double headwayTime) const
Returns the distance the vehicle needs to halt including driver's reaction time tau (i....
double internalsecuregap(const MSVehicle *const veh, const double speed, const double leaderSpeed, const double targetDecel) const
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.
void internalspeedlimit(MSVehicle *const veh, const double oldV) const
double getSecureGap(const MSVehicle *const veh, const MSVehicle *const, 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 maxNextSafeMin(double speed, const MSVehicle *const veh=0) const
Returns the maximum speed given the current speed and regarding driving dynamics.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
const double mySigmaerror
double _v(const MSVehicle *const veh, const double gap2pred, const double mySpeed, const double predSpeed, const double desSpeed, const bool respectMinGap, const int update, const CalcReason usage) const
The car-following model abstraction.
CalcReason
What the return value of stop/follow/free-Speed is used for.
double myDecel
The vehicle's maximum deceleration [m/s^2].
double brakeGap(const double speed) const
Returns the distance the vehicle needs to halt including driver's reaction time tau (i....
static bool gComputeLC
whether the simulationLoop is in the lane changing phase
Representation of a vehicle in the micro simulation.
The car-following model and parameter.