Fix input directories in ExtendedWorkingExample.jl

development
Max Kannenberg 2022-05-17 18:35:58 +02:00
parent f09a5cac9a
commit f6ea317fd4
1 changed files with 17 additions and 14 deletions

View File

@ -1,32 +1,35 @@
#!/usr/bin/env julia
import TrainRuns
using TrainRuns
paths=[]
push!(paths, importFromYaml(:path, "data/paths/path_1_10km_nConst_vConst.yaml"))
push!(paths, importFromYaml(:path, "data/paths/path_2_10km_nVar_vConst.yaml"))
push!(paths, importFromYaml(:path, "data/paths/path_3_10km_nConst_vVar.yaml"))
push!(paths, importFromYaml(:path, "data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml"))
push!(paths, Path("test/data/paths/const.yaml"))
push!(paths, Path("test/data/paths/slope.yaml"))
push!(paths, Path("test/data/paths/speed.yaml"))
push!(paths, Path("test/data/paths/realworld.yaml"))
settings=[]
push!(settings, importFromYaml(:settings, "data/settings/settings_distanceStep_massPoint.yaml"))
push!(settings, Settings("test/data/settings/driving_course.yaml"))
trains=[]
push!(trains, importFromYaml(:train, "data/trains/train_freight_V90withOreConsist.yaml"))
push!(trains, importFromYaml(:train, "data/trains/train_passenger_SiemensDesiroClassic.yaml"))
push!(trains, importFromYaml(:train, "data/trains/train_passenger_IC2.yaml"))
push!(trains, Train("test/data/trains/freight.yaml"))
push!(trains, Train("test/data/trains/local.yaml"))
push!(trains, Train("test/data/trains/longdistance.yaml"))
driving_courses=[]
for path in paths
# println(" - - - - - - - - -")
# println("path: ", path[:name])
for train in trains
# println("train: ", train[:name])
for settings in settings
resultsDict = trainrun(train, path, settings)
if haskey(settings, :outputFormat) && settings[:outputFormat] == "CSV"
exportToCsv(resultsDict, settings)
sleep(2)
end
push!(driving_courses, trainrun(train, path, settings))
#driving_course = trainrun(train, path, settings)
# old: if haskey(settings, :outputFormat) && settings[:outputFormat] == "CSV"
# old: exportToCsv(resultsDict, settings)
# old: sleep(2)
# old: end
end
end
end