Remove CharacteristicSections as return value from function 'calculateMinimumRunningTime'

master
Max Kannenberg 2022-08-17 22:30:32 +02:00
parent 4d44674d21
commit 4a047f4cf2
2 changed files with 3 additions and 8 deletions

View File

@ -50,7 +50,7 @@ function trainrun(train::Train, path::Path, settings=Settings()::Settings)
# TODO settings.outputDetail == :verbose && println("The characteristics haven been determined.")
# calculate the train run with the minimum running time
(characteristicSections, drivingCourse) = calculateMinimumRunningTime!(characteristicSections, settings, train)
drivingCourse = calculateMinimumRunningTime(characteristicSections, settings, train)
# TODO settings.outputDetail == :verbose && println("The driving course for the shortest running time has been calculated.")
# accumulate data and create an output dictionary

View File

@ -7,12 +7,7 @@
# Calculate the running time of a train run on a path with special settings with information from the corresponding YAML files with the file paths `trainDirectory`, `pathDirectory`, `settingsDirectory`.
# calculate a train run focussing on using the minimum possible running time
function calculateMinimumRunningTime!(CSs::Vector{Dict}, settings::Settings, train::Train)
if settings.massModel == :homogeneous_strip && settings.stepVariable == speed
println("WARNING: ! ! ! TrainRuns.jl doesn't work reliably for the mass model homogeneous strip with step size v in m/s. The calculation time can be extremely high when calcutlating paths with steep gradients ! ! !")
end # TODO
function calculateMinimumRunningTime(CSs::Vector{Dict}, settings::Settings, train::Train)
startingPoint = SupportPoint()
startingPoint[:i] = 1
startingPoint[:s] = CSs[1][:s_entry]
@ -119,7 +114,7 @@ function calculateMinimumRunningTime!(CSs::Vector{Dict}, settings::Settings, tra
drivingCourse = addHalt!(drivingCourse, CSs, length(CSs), settings, train)
return (CSs, drivingCourse)
return drivingCourse
end #function calculateMinimumRunningTime