TrainRun.jl/docs/examples/ExtendedWorkingExample.jl

36 lines
1.1 KiB
Julia
Raw Normal View History

2022-04-28 17:02:40 +02:00
#!/usr/bin/env julia
using TrainRuns
2022-04-28 17:02:40 +02:00
paths=[]
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"))
2022-04-28 17:02:40 +02:00
settings=[]
push!(settings, Settings("test/data/settings/driving_course.yaml"))
2022-04-28 17:02:40 +02:00
trains=[]
push!(trains, Train("test/data/trains/freight.yaml"))
push!(trains, Train("test/data/trains/local.yaml"))
push!(trains, Train("test/data/trains/longdistance.yaml"))
2022-04-28 17:02:40 +02:00
driving_courses=[]
2022-04-28 17:02:40 +02:00
for path in paths
# println(" - - - - - - - - -")
# println("path: ", path[:name])
for train in trains
# println("train: ", train[:name])
for settings in settings
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
2022-04-28 17:02:40 +02:00
end
end
end