39 #define DEBUG_COND (veh->isSelected())
40 #define DEBUG_DRIVER_ERRORS
113 return MAX2(0., speed);
@ SUMO_ATTR_JM_SIGMA_MINOR
std::mt19937 * getRNG() const
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply custom speed adaptations within the given speed bounds
double followSpeed(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 uses the maximumSafeFollowSpeed.
double dawdle2(double speed, double sigma, std::mt19937 *rng) const
Applies driver imperfection (dawdling / sigma)
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) this uses the m...
~MSCFModel_Krauss()
Destructor.
MSCFModel_Krauss(const MSVehicleType *vtype)
Constructor.
The original Krauss (1998) car-following model and parameter.
virtual double vsafe(double gap, double predSpeed, double predMaxDecel) const
Returns the "safe" velocity.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
The car-following model abstraction.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
virtual double minNextSpeedEmergency(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed after emergency braking, given the current speed (depends on the numerical ...
void applyHeadwayPerceptionError(const MSVehicle *const veh, double speed, double &gap) const
Overwrites gap by the perceived value obtained from the vehicle's driver state.
void applyHeadwayAndSpeedDifferencePerceptionErrors(const MSVehicle *const veh, double speed, double &gap, double &predSpeed, double predMaxDecel, const MSVehicle *const pred) const
Overwrites gap2pred and predSpeed by the perceived values obtained from the vehicle's driver state,...
double maximumSafeFollowSpeed(double gap, double egoSpeed, double predSpeed, double predMaxDecel, bool onInsertion=false) const
Returns the maximum safe velocity for following the given leader.
double maximumSafeStopSpeed(double gap, double currentSpeed, bool onInsertion=false, double headway=-1) const
Returns the maximum next velocity for stopping within gap.
double myAccel
The vehicle's maximum acceleration [m/s^2].
static bool gSemiImplicitEulerUpdate
Representation of a vehicle in the micro simulation.
double getActionStepLengthSecs() const
Returns the vehicle's action step length in secs, i.e. the interval between two action points.
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
The car-following model and parameter.
const SUMOVTypeParameter & getParameter() const
static double rand(std::mt19937 *rng=nullptr)
Returns a random real number in [0, 1)
double getJMParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.