From 6404dc5f5cf2fd1ad77eef3521c77cd105b6f7a5 Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Wed, 8 Jun 2022 22:19:32 +0200 Subject: [PATCH 1/4] switch order for register and update_citation see also: https://github.com/julia-actions/RegisterAction/issues/8 --- .github/workflows/release.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97d734b..e4d4c03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,16 +61,6 @@ jobs: path: .github/zenodo/metadata.json if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - register: - needs: create_package - name: "publish in JuliaRegistries" - runs-on: ubuntu-latest - steps: - # 1. register new release at JuliaRegistries - - uses: julia-actions/RegisterAction@latest - with: - token: ${{ secrets.GITHUB_TOKEN }} - publish_github: needs: create_package name: "publish on github" @@ -141,7 +131,7 @@ jobs: echo "::set-output name=doi::$(zenodraft deposition show prereserved $ID)" update_citation: - needs: [create_package, register, publish_zenodo] + needs: publish_zenodo name: "updating CITATION.cff" runs-on: ubuntu-latest steps: @@ -175,8 +165,18 @@ jobs: commit_user_name: railtoolkit commit_user_email: railtoolkit@ownx.net + register: + needs: update_citation + name: "publish in JuliaRegistries" + runs-on: ubuntu-latest + steps: + # 1. register new release at JuliaRegistries + - uses: julia-actions/RegisterAction@latest + with: + token: ${{ secrets.GITHUB_TOKEN }} + publish_twitter: - needs: [publish_zenodo] + needs: publish_zenodo name: "tweet about it" runs-on: ubuntu-latest steps: From 6e52dfee879fd21c8e3a3b8c5d8d699f06a44c04 Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Thu, 9 Jun 2022 15:10:59 +0200 Subject: [PATCH 2/4] enhanced help message --- src/TrainRuns.jl | 2 +- src/constructors.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TrainRuns.jl b/src/TrainRuns.jl index f5a9efa..754a3e6 100644 --- a/src/TrainRuns.jl +++ b/src/TrainRuns.jl @@ -40,7 +40,7 @@ The running time will be return in seconds. # Examples ```julia-repl -julia> trainrun(train, path) +julia> trainrun(train, path)[end,:t] xxx.xx # in seconds ``` """ diff --git a/src/constructors.jl b/src/constructors.jl index 1adc3ac..556cfea 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -14,7 +14,8 @@ The function Settings() will create a set of settings for the train run calculat # Example ``` julia> my_settings = Settings() # will generate default settings -Settings(mass_point, :distance, 20, 3, running_time, :dataframe) +# massModel, stepVariable, stepSize, approxLevel, outputDetail, outputFormat +Settings(:mass_point, :distance, 20, 3, :running_time, :dataframe) ``` """ function Settings(file="DEFAULT") From 31801f58ffd69c99b35d9b735d50bdda2715d336 Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Mon, 20 Jun 2022 14:10:38 +0200 Subject: [PATCH 3/4] noted contribution ideas --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df36fce..18cdd82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,3 +85,28 @@ TODO * If a PR is not finished yet and should not be reviewed yet then it should be opened as DRAFT (in this way maintainers will know that they can ignore such PR until it is made non-draft or the author asks for a review). + +## Contribution Ideas + +Models for: +* Breakaway (currently simple like acceleration) +* braking (currently constant braking with a certain value) +* inhomogeneous mass band (consider non-uniform mass distribution (cf. Wende, 2003 p. 96f.)) + +More exact calculation of resistances for: +* the track (e.g. including curves, switches, tunnels) +* for the train (e.g. there are vehicle resistance equations especially for high-speed trains, which are not yet considered in the tool (cf. Wende, 2003 p. 152 f.)) + +Input/calculation of tractive force (currently only tractive force-speed pairs. This could be extended to include tractive force functions that apply to specific velocity ranges (cf. BrĂ¼nger, et al., 2014 p. 69). + +Calculation of energy, cf. (Wende, 2003 p. 324). + +switching between different step variables in one train run or implementation of variable step size (currently it is necessary to choose between s, t and v and to specify a step size that becomes smaller at intersections, but is otherwise constant) + +Driver behaviour, in order to be able to determine the driving behavior of the vehicles more realistically. + +Energy-saving driving. + +good plots would be nice + +Pluto notebook show case From ef4d4bcae2c4b14286ca3d9a75bb23ffe8720deb Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Mon, 20 Jun 2022 14:11:55 +0200 Subject: [PATCH 4/4] amended outer constructor for Settings() --- src/constructors.jl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/constructors.jl b/src/constructors.jl index 556cfea..539e8eb 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -18,16 +18,15 @@ julia> my_settings = Settings() # will generate default settings Settings(:mass_point, :distance, 20, 3, :running_time, :dataframe) ``` """ -function Settings(file="DEFAULT") - - ## default values - massModel = :mass_point - stepVariable = :distance - stepSize = 20 - approxLevel = 3 - outputDetail = :running_time - outputFormat = :dataframe - +function Settings( + file = "DEFAULT"; + massModel::Symbol = :mass_point, + stepVariable::Symbol = :distance, + stepSize::Number = 20, + approxLevel::Number = 3, + outputDetail::Symbol = :running_time, + outputFormat::Symbol = :dataframe + ) ## load from file if file != "DEFAULT"