From c4d8b2c79c49d2648768010ef69b59383bb9c307 Mon Sep 17 00:00:00 2001 From: Max Kannenberg <95709892+MaxKannenberg@users.noreply.github.com> Date: Tue, 16 Aug 2022 12:25:50 +0200 Subject: [PATCH] Remove key :length from CharacteristicSection dictionary --- src/behavior.jl | 2 +- src/constructors.jl | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/behavior.jl b/src/behavior.jl index ff89da8..e05aba7 100644 --- a/src/behavior.jl +++ b/src/behavior.jl @@ -1069,7 +1069,7 @@ function secureBrakingBehavior!(CSs::Vector{Dict}, a_braking::Real, approxLevel: CS[:v_exit] = min(CS[:v_limit], followingCSv_entry) - v_entryMax = brakingStartVelocity(CS[:v_exit], a_braking, CS[:length], approxLevel) + v_entryMax = brakingStartVelocity(CS[:v_exit], a_braking, CS[:s_exit]-CS[:s_entry], approxLevel) CS[:v_entry] = min(CS[:v_limit], v_entryMax) CS[:v_peak] = CS[:v_entry] diff --git a/src/constructors.jl b/src/constructors.jl index 7d93711..39001f0 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -642,7 +642,6 @@ function CharacteristicSection(id::Integer, s_entry::Real, section::Dict, v_limi characteristicSection::Dict{Symbol, Any} = Dict(:id => id, # identifier :s_entry => s_entry, # first position (in m) :s_exit => section[:s_end], # last position (in m) - :length => section[:s_end] -s_entry, # total length (in m) :r_path => section[:f_Rp], # path resistance (in ‰) :v_limit => v_limit, # speed limit (in m/s) # initializing :v_entry, :v_peak and :v_exit with :v_limit