From 16c753814d3204f539b1ff2e961f8968859c3d9f Mon Sep 17 00:00:00 2001 From: Max Kannenberg <95709892+MaxKannenberg@users.noreply.github.com> Date: Mon, 13 Dec 2021 11:56:22 +0100 Subject: [PATCH] Rename the real world path file --- Project.toml | 2 +- ...p_5.yaml => path_4_real_Germany_EastSaxony_DG-DN.yaml} | 1 - data/settings.yaml | 2 +- examples/MinimalWorkingExample.jl | 4 ++-- src/Output.jl | 8 ++++---- 5 files changed, 8 insertions(+), 9 deletions(-) rename data/paths/{path_4_real_Ostsachsen_DG-DN_spp_5.yaml => path_4_real_Germany_EastSaxony_DG-DN.yaml} (99%) diff --git a/Project.toml b/Project.toml index 942c8ea..a9c85e1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TrainRun" uuid = "e4541106-d44c-4e00-b50b-ecdf479fcf92" authors = ["Max Kannenberg"] -version = "0.5.0" +version = "0.5.1" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/data/paths/path_4_real_Ostsachsen_DG-DN_spp_5.yaml b/data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml similarity index 99% rename from data/paths/path_4_real_Ostsachsen_DG-DN_spp_5.yaml rename to data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml index 5a152fd..1218312 100644 --- a/data/paths/path_4_real_Ostsachsen_DG-DN_spp_5.yaml +++ b/data/paths/path_4_real_Germany_EastSaxony_DG-DN.yaml @@ -97,7 +97,6 @@ path: - [23736.0, 160, 0.9] - [24124.0, 160, 7] - [24918.0, 160, 7.6] - - [25100.0, 150, 7.6] - [25100.0, 150, 7.1] - [25580.0, 150, 7.4] - [25708.0, 160, 7.4] diff --git a/data/settings.yaml b/data/settings.yaml index 9f2ea28..04c0431 100644 --- a/data/settings.yaml +++ b/data/settings.yaml @@ -8,4 +8,4 @@ settings: operationModeMinimumEnergyConsumption: true # operation mode "minimum energy consumption" typeOfOutput: "CSV" # output as "julia dictionary" or as "CSV" detailOfOutput: "driving course" # should the output be "reduced" or "driving course"? - csvFolderPath: "~/Desktop/TrainRun" + csvDirectory: "~/Desktop/TrainRun" diff --git a/examples/MinimalWorkingExample.jl b/examples/MinimalWorkingExample.jl index 1eb8f38..4a218b6 100644 --- a/examples/MinimalWorkingExample.jl +++ b/examples/MinimalWorkingExample.jl @@ -11,14 +11,14 @@ 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_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_yaml_files\\train_passenger_SiemensDesiroClassic.yaml") +push!(allTrains, "../data/trains/train_passenger_SiemensDesiroClassic.yaml") push!(allTrains, "../data/trains/train_passenger_IC2.yaml") for pathDirectory in allPaths diff --git a/src/Output.jl b/src/Output.jl index aa1f473..a9878d4 100644 --- a/src/Output.jl +++ b/src/Output.jl @@ -112,13 +112,13 @@ function createOutputCsv(settings::Settings, pathName::String, trainName::String outputArray="outputArrayMinimumEnergyConsumption" date = Dates.now() dateString=Dates.format(date, "yyyy-mm-dd_HH.MM.SS") - csvFilePath=settings.csvDirectory*"\\"*dateString*"_MinimumEnergyConsumption.csv" + csvFilePath=settings.csvDirectory*"/"*dateString*"_MinimumEnergyConsumption.csv" else operationMode="minimum running time" outputArray="outputArrayMinimumRunningTime" date = Dates.now() dateString=Dates.format(date, "yyyy-mm-dd_HH.MM.SS") - csvFilePath=settings.csvDirectory*"\\"*dateString*"_MinimumRunningTime.csv" + csvFilePath=settings.csvDirectory*"/"*dateString*"_MinimumRunningTime.csv" end # creating information block @@ -195,7 +195,7 @@ function createOutputCsv(settings::Settings, pathName::String, trainName::String end date = Dates.now() dateString=Dates.format(date, "yyyy-mm-dd_HH.MM.SS") - csvFilePath=settings.csvDirectory*"\\"*dateString*"_dataMinimumRunningTime.csv" + csvFilePath=settings.csvDirectory*"/"*dateString*"_dataMinimumRunningTime.csv" CSV.write(csvFilePath, df, header=false) println("The output CSV file has been created for minimum running time at ",csvFilePath) end #if settings.operationModeMinimumRunningTime @@ -235,7 +235,7 @@ function createOutputCsv(settings::Settings, pathName::String, trainName::String # creating a CSV-file at csvDirectory date = Dates.now() dateString=Dates.format(date, "yyyy-mm-dd_HH.MM.SS") - csvFilePath=settings.csvDirectory*"\\"*dateString*"_dataMinimumEnergyConsumption.csv" + csvFilePath=settings.csvDirectory*"/"*dateString*"_dataMinimumEnergyConsumption.csv" CSV.write(csvFilePath, df, header=false) println("The output CSV file has been created for minimum energy consumption at ",csvFilePath) end # if settings.operationModeMinimumEnergyConsumption