 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
40 #define DEBUG_COND (veh->isSelected())
41 #define DEBUG_DRIVER_ERRORS
114 return MAX2(0., speed);
The car-following model and parameter.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply custom speed adaptations within the given speed bounds
double maximumSafeFollowSpeed(double gap, double egoSpeed, double predSpeed, double predMaxDecel, bool onInsertion=false) const
Returns the maximum safe velocity for following the given leader.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
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,...
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
double getActionStepLengthSecs() const
Returns the vehicle's action step length in secs, i.e. the interval between two action points.
double maximumSafeStopSpeed(double gap, double currentSpeed, bool onInsertion=false, double headway=-1) const
Returns the maximum next velocity for stopping within gap.
double myDawdle
The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max.
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.
~MSCFModel_Krauss()
Destructor.
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 ...
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...
The original Krauss (1998) car-following model and parameter.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
MSCFModel_Krauss(const MSVehicleType *vtype)
Constructor.
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
const SUMOVTypeParameter & getParameter() const
The car-following model abstraction.
virtual double vsafe(double gap, double predSpeed, double predMaxDecel) const
Returns the "safe" velocity.
double dawdle2(double speed, double sigma, std::mt19937 *rng) const
Applies driver imperfection (dawdling / sigma)
double myAccel
The vehicle's maximum acceleration [m/s^2].
static bool gSemiImplicitEulerUpdate
void applyHeadwayPerceptionError(const MSVehicle *const veh, double speed, double &gap) const
Overwrites gap by the perceived value obtained from the vehicle's driver state.
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.
std::mt19937 * getRNG() const
Representation of a vehicle in the micro simulation.