Add rounding up at the CS's end if difference is beyond accuracy level

master
Max Kannenberg 2022-08-12 13:24:27 +02:00
parent 442a342e84
commit 395b7eb11c
1 changed files with 7 additions and 0 deletions

View File

@ -99,6 +99,13 @@ function calculateMinimumRunningTime!(CSs::Vector{Dict}, settings::Settings, tra
#else
# error()
end
if CS[:s_exit] - drivingCourse[end][:s] < 1/10^(settings.approxLevel)
drivingCourse[end][:s] = CS[:s_exit] # round s up to CS[:s_exit]
# set state flag
stateFlags[:endOfCSReached] = true
end
end
#if s == s_exit
# halt