Fix rounding error due to braking calculation

master
Max Kannenberg 2022-08-11 16:54:38 +02:00
parent b8578ae49c
commit 442a342e84
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ function calculateMinimumRunningTime!(CSs::Vector{Dict}, settings::Settings, tra
s_braking = brakingDistance(drivingCourse[end][:v], CS[:v_exit], train.a_braking, settings.approxLevel)
s_cruising = CS[:s_exit] - drivingCourse[end][:s] - s_braking
if s_cruising > 0.0 # TODO: define a minimum cruising length?
if s_cruising > 1/10^(settings.approxLevel) # TODO: define another minimum cruising length?
(CS, drivingCourse, stateFlags) = addCruisingSection!(CS, drivingCourse, stateFlags, s_cruising, settings, train, CSs, "cruising")
else
stateFlags[:brakingStartReached] = true