151 double vsafe(
const MSVehicle*
const veh,
double speed,
double gap)
const;
The Nagel-Schreckenberg (1992) cellular automaton car-following model.
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.
double getImperfection() const
Get the driver's imperfection.
double myDawdle
The probability of randomized deceleration by one cell per step ("sigma")
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
NaSch rule 3 ("randomization"): dawdle by exactly one cell with probability sigma.
double vsafe(const MSVehicle *const veh, double speed, double gap) const
the safe speed considering only the gap to the leader/obstacle (NaSch rule 1+2)
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....
~MSCFModel_NaSch()
Destructor.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double minNextSpeedEmergency(double speed, const MSVehicle *const veh=0) const
NaSch does not impose an extra bound on emergency braking: a vehicle may always come to a full (Euler...
void setImperfection(double imperfection)
Sets a new value for driver imperfection.
double myCellSpeed
The speed gained per step by accelerating at myAccel, i.e. one cell's worth of speed.
double roundToCell(double speed) const
Rounds a speed down to the nearest multiple of the cell speed (the speed gained by accelerating for e...
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.