2022-04-28 17:02:40 +02:00
|
|
|
#!/usr/bin/env julia
|
|
|
|
|
2022-05-17 18:35:58 +02:00
|
|
|
using TrainRuns
|
2022-06-02 12:32:00 +02:00
|
|
|
using CSV
|
2022-04-28 17:02:40 +02:00
|
|
|
|
|
|
|
paths=[]
|
2022-05-17 18:35:58 +02:00
|
|
|
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
|
|
|
|
|
|
|
trains=[]
|
2022-05-17 18:35:58 +02:00
|
|
|
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
|
|
|
|
2022-06-02 12:32:00 +02:00
|
|
|
settings = Settings("test/data/settings/driving_course.yaml")
|
2022-05-17 18:35:58 +02:00
|
|
|
|
2022-06-02 12:32:00 +02:00
|
|
|
for p in 1:length(paths)
|
|
|
|
for t in 1:length(trains)
|
|
|
|
driving_course = trainrun(trains[t], paths[p], settings)
|
2022-06-03 12:26:58 +02:00
|
|
|
CSV.write("docs/examples/drivingCourse_path"*string(p)*"_train"*string(t)*".csv", driving_course)
|
2022-04-28 17:02:40 +02:00
|
|
|
end
|
|
|
|
end
|