commit
7218b9d718
|
@ -1,7 +1,7 @@
|
|||
name = "TrainRun"
|
||||
uuid = "e4541106-d44c-4e00-b50b-ecdf479fcf92"
|
||||
authors = ["Max Kannenberg"]
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
|
||||
[deps]
|
||||
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
|
||||
|
|
16
README.md
16
README.md
|
@ -17,12 +17,26 @@ Review the settings.yaml file for your appropriate settings.
|
|||
|
||||
# Minimal working example
|
||||
|
||||
See folder examples.
|
||||
```julia
|
||||
include("../src/TrainRun.jl")
|
||||
using .TrainRun
|
||||
|
||||
train = "data/trains/train_freight_V90withOreConsist.yaml"
|
||||
running_path = "data/paths/path_1_10km_nConst_vConst.yaml"
|
||||
settings = "data/settings.yaml"
|
||||
|
||||
train_run = calculateDrivingDynamics(train, running_path, settings)
|
||||
```
|
||||
------------
|
||||
|
||||
# History
|
||||
|
||||
## Version 0.5.2
|
||||
Merge fixing branches
|
||||
|
||||
## Version 0.5.1
|
||||
Rename the real world path file
|
||||
|
||||
## Version 0.5
|
||||
|
||||
Refactor modules for diminishing run and tractive effort velocity pairs
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
path:
|
||||
name: "10 km, no gradient, 160 km/h"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
path:
|
||||
name: "10 km, different gradient, 160 km/h"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
path:
|
||||
name: "10 km, no gradient, different speed limits"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
path:
|
||||
name: "'infra_Ostsachsen': track id='tr_80.6212_2' name='DG-DN' -> spp_5"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
settings:
|
||||
# settings for the simulation
|
||||
|
@ -6,6 +7,6 @@ settings:
|
|||
stepSize: 10 # step size (unit depends on stepVariable s in m, t in s and v in m/s)
|
||||
operationModeMinimumRunningTime: true # operation mode "minimum running time"
|
||||
operationModeMinimumEnergyConsumption: true # operation mode "minimum energy consumption"
|
||||
typeOfOutput: "CSV" # output as "julia dictionary" or as "CSV"
|
||||
typeOfOutput: "julia dictionary" # output as "julia dictionary" or as "CSV"
|
||||
detailOfOutput: "driving course" # should the output be "reduced" or "driving course"?
|
||||
csvDirectory: "~/Desktop/TrainRun"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
train:
|
||||
name: "V 90 with 10 ore wagons of type Facs 124" # (source: https://de.wikipedia.org/wiki/DB-Baureihe_V_90 and https://dybas.de/dybas/gw/gw_f_1/g124.html)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
train:
|
||||
name: "Intercity 2 (Traxx P160 AC2 + double deck coaches)" # (source: https://de.wikipedia.org/wiki/Bombardier_Twindexx_Vario#Intercity_2 and https://de.wikipedia.org/wiki/Intercity_2_(Deutsche_Bahn))
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
train:
|
||||
name: "Siemens Desiro Classic" # (source: https://de.wikipedia.org/wiki/Siemens_Desiro_Classic)
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env julia
|
||||
# -*- coding: UTF-8 -*-
|
||||
# __julia-version__ = 1.7.0
|
||||
# __author__ = "Max Kannenberg"
|
||||
# __copyright__ = "2021"
|
||||
# __license__ = "ISC"
|
||||
|
||||
include("../src/TrainRun.jl")
|
||||
using .TrainRun
|
||||
|
||||
allPaths=[]
|
||||
push!(allPaths, "data/paths/path_1_10km_nConst_vConst.yaml")
|
||||
push!(allPaths, "data/paths/path_2_10km_nVar_vConst.yaml")
|
||||
push!(allPaths, "data/paths/path_3_10km_nConst_vVar.yaml")
|
||||
push!(allPaths, "data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml")
|
||||
|
||||
allSettings=[]
|
||||
push!(allSettings, "data/settings.yaml")
|
||||
|
||||
allTrains=[]
|
||||
push!(allTrains, "data/trains/train_freight_V90withOreConsist.yaml")
|
||||
push!(allTrains, "data/trains/train_passenger_SiemensDesiroClassic.yaml")
|
||||
push!(allTrains, "data/trains/train_passenger_IC2.yaml")
|
||||
|
||||
for pathDirectory in allPaths
|
||||
# println(" - - - - - - - - -")
|
||||
# println("path: ", pathDirectory)
|
||||
for trainDirectory in allTrains
|
||||
# println("train: ", trainDirectory)
|
||||
for settingsDirectory in allSettings
|
||||
testDict=calculateDrivingDynamics(trainDirectory, pathDirectory, settingsDirectory)
|
||||
|
||||
sleep(2)
|
||||
|
||||
# println("")
|
||||
# println("")
|
||||
# println("")
|
||||
end
|
||||
end
|
||||
# println("")
|
||||
end
|
||||
|
||||
# println("")
|
||||
# println("________________________")
|
||||
# println("")
|
|
@ -1,40 +1,18 @@
|
|||
#!/usr/bin/env julia
|
||||
# -*- coding: UTF-8 -*-
|
||||
# __julia-version__ = 1.7.0
|
||||
# __author__ = "Max Kannenberg"
|
||||
# __copyright__ = "2021"
|
||||
# __license__ = "ISC"
|
||||
|
||||
include("../src/TrainRun.jl")
|
||||
using .TrainRun
|
||||
|
||||
train = "data/trains/train_freight_V90withOreConsist.yaml"
|
||||
running_path = "data/paths/path_1_10km_nConst_vConst.yaml"
|
||||
settings = "data/settings.yaml"
|
||||
|
||||
# println("")
|
||||
# println("________________________")
|
||||
# println("")
|
||||
train_run = calculateDrivingDynamics(train, running_path, settings)
|
||||
runtime = last(train_run["outputArrayMinimumRunningTime"])[5]
|
||||
|
||||
|
||||
allPaths=[]
|
||||
push!(allPaths, "../data/paths/path_1_10km_nConst_vConst.yaml")
|
||||
push!(allPaths, "../data/paths/path_2_10km_nVar_vConst.yaml")
|
||||
push!(allPaths, "../data/paths/path_3_10km_nConst_vVar.yaml")
|
||||
push!(allPaths, "../data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml")
|
||||
|
||||
allSettings=[]
|
||||
push!(allSettings, "../data/settings.yaml")
|
||||
|
||||
allTrains=[]
|
||||
push!(allTrains, "../data/trains/train_freight_V90withOreConsist.yaml")
|
||||
push!(allTrains, "../data/trains/train_passenger_SiemensDesiroClassic.yaml")
|
||||
push!(allTrains, "../data/trains/train_passenger_IC2.yaml")
|
||||
|
||||
for pathDirectory in allPaths
|
||||
# println("")
|
||||
# println(" - - - - - - - - -")
|
||||
# println("path: ", pathDirectory)
|
||||
for trainDirectory in allTrains
|
||||
# println("train: ", trainDirectory)
|
||||
for settingsDirectory in allSettings
|
||||
testDict=calculateDrivingDynamics(trainDirectory, pathDirectory, settingsDirectory)
|
||||
|
||||
sleep(2)
|
||||
|
||||
# println("")
|
||||
# println("")
|
||||
# println("")
|
||||
end
|
||||
end
|
||||
end
|
||||
println("The V 90 with 10 ore wagons needs $runtime seconds for 10 km with no gradient.")
|
||||
|
|
|
@ -1,38 +1,39 @@
|
|||
# access in pkg mode with >>>>> ] test TrainRun <<<<
|
||||
#!/usr/bin/env julia
|
||||
# -*- coding: UTF-8 -*-
|
||||
# __julia-version__ = 1.7.0
|
||||
# __author__ = "Max Kannenberg"
|
||||
# __copyright__ = "2021"
|
||||
# __license__ = "ISC"
|
||||
|
||||
using TrainRun, Test
|
||||
|
||||
|
||||
allPaths=[]
|
||||
push!(allPaths, "../data/paths/path_1_10km_nConst_vConst.yaml")
|
||||
push!(allPaths, "../data/paths/path_2_10km_nVar_vConst.yaml")
|
||||
push!(allPaths, "../data/paths/path_3_10km_nConst_vVar.yaml")
|
||||
push!(allPaths, "../data/paths/path_4_real_Ostsachsen_DG-DN_spp_5.yaml")
|
||||
push!(allPaths, "data/paths/path_1_10km_nConst_vConst.yaml")
|
||||
push!(allPaths, "data/paths/path_2_10km_nVar_vConst.yaml")
|
||||
push!(allPaths, "data/paths/path_3_10km_nConst_vVar.yaml")
|
||||
push!(allPaths, "data/paths/path_4_real_Ostsachsen_DG-DN_spp_5.yaml")
|
||||
|
||||
allSettings=[]
|
||||
push!(allSettings, "../data/settings.yaml")
|
||||
push!(allSettings, "data/settings.yaml")
|
||||
|
||||
allTrains=[]
|
||||
push!(allTrains, "../data/trains/train_freight_V90withOreConsist.yaml")
|
||||
push!(allTrains, "../data/trains/train_yaml_files\\train_passenger_SiemensDesiroClassic.yaml")
|
||||
push!(allTrains, "../data/trains/train_passenger_IC2.yaml")
|
||||
push!(allTrains, "data/trains/train_freight_V90withOreConsist.yaml")
|
||||
push!(allTrains, "data/trains/train_passenger_SiemensDesiroClassic.yaml")
|
||||
push!(allTrains, "data/trains/train_passenger_IC2.yaml")
|
||||
|
||||
for pathDirectory in allPaths
|
||||
# println("")
|
||||
# println(" - - - - - - - - -")
|
||||
# println("path: ", pathDirectory)
|
||||
for trainDirectory in allTrains
|
||||
# println("train: ", trainDirectory)
|
||||
for settingsDirectory in allSettings
|
||||
testDict=calculateDrivingDynamics(trainDirectory, pathDirectory, settingsDirectory)
|
||||
for trainDirectory in allTrains
|
||||
for settingsDirectory in allSettings
|
||||
testDict=calculateDrivingDynamics(trainDirectory, pathDirectory, settingsDirectory)
|
||||
|
||||
sleep(2)
|
||||
sleep(2)
|
||||
|
||||
# println("")
|
||||
# println("")
|
||||
# println("")
|
||||
end
|
||||
end
|
||||
# TODO:
|
||||
# compare result to test data set
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
println("test finished")
|
||||
# TODO:
|
||||
# print test results
|
||||
|
|
Loading…
Reference in New Issue