Remove the key :v_entry from CharacteristicSection dictionary
parent
b421fbec5a
commit
548d46b6c4
|
@ -1003,20 +1003,20 @@ end #function recalculateLastBrakingPoint
|
||||||
|
|
||||||
## define the intersection velocities between the characterisitc sections to secure braking behavior
|
## define the intersection velocities between the characterisitc sections to secure braking behavior
|
||||||
function secureBrakingBehavior!(CSs::Vector{Dict}, a_braking::Real, approxLevel::Integer)
|
function secureBrakingBehavior!(CSs::Vector{Dict}, a_braking::Real, approxLevel::Integer)
|
||||||
# limit the entry and exit velocity of the characteristic sections to secure that the train stops at the moving sections end
|
# limit the entry and exit velocities of the characteristic sections to secure that the train stops at the moving sections end
|
||||||
|
|
||||||
csId = length(CSs)
|
csId = length(CSs)
|
||||||
followingCSv_entry = 0.0 # the exit velocity of the last characteristic section is 0.0 m/s
|
v_entryFollowing = 0.0 # the exit velocity of the last characteristic section is 0.0 m/s
|
||||||
while csId >= 1
|
while csId >= 1
|
||||||
|
# calculate the maximum possible entry velocity to define the previous section's maximum allowed exit velocity
|
||||||
CS = CSs[csId]
|
CS = CSs[csId]
|
||||||
|
|
||||||
CS[:v_exit] = min(CS[:v_limit], followingCSv_entry)
|
CS[:v_exit] = min(CS[:v_limit], v_entryFollowing)
|
||||||
|
|
||||||
v_entryMax = brakingStartVelocity(CS[:v_exit], a_braking, CS[:s_exit]-CS[:s_entry], approxLevel)
|
v_entry = brakingStartVelocity(CS[:v_exit], a_braking, CS[:s_exit]-CS[:s_entry], approxLevel)
|
||||||
|
|
||||||
CS[:v_entry] = min(CS[:v_limit], v_entryMax)
|
v_entryFollowing = min(CS[:v_limit], v_entry)
|
||||||
|
|
||||||
followingCSv_entry = CS[:v_entry]
|
|
||||||
csId = csId - 1
|
csId = csId - 1
|
||||||
end #while
|
end #while
|
||||||
return CSs
|
return CSs
|
||||||
|
|
|
@ -21,14 +21,6 @@ function calculateMinimumRunningTime!(CSs::Vector{Dict}, settings::Settings, tra
|
||||||
|
|
||||||
for csId in 1:length(CSs)
|
for csId in 1:length(CSs)
|
||||||
CS = CSs[csId]
|
CS = CSs[csId]
|
||||||
# for testing: # TODO
|
|
||||||
if drivingCourse[end][:s] != CS[:s_entry]
|
|
||||||
println("ERROR: In CS", csId," the train run starts at s=",drivingCourse[end][:s]," and not s_entry=",CS[:s_entry])
|
|
||||||
end
|
|
||||||
if drivingCourse[end][:v] > CS[:v_entry]
|
|
||||||
println("ERROR: In CS", csId," the train run ends with v=",drivingCourse[end][:v]," and not with v_entry=",CS[:v_entry])
|
|
||||||
end
|
|
||||||
|
|
||||||
# determine the different flags for switching between the states for creating moving phases
|
# determine the different flags for switching between the states for creating moving phases
|
||||||
s_braking = brakingDistance(drivingCourse[end][:v], CS[:v_exit], train.a_braking, settings.approxLevel)
|
s_braking = brakingDistance(drivingCourse[end][:v], CS[:v_exit], train.a_braking, settings.approxLevel)
|
||||||
calculateForces!(drivingCourse[end], CSs, CS[:id], "default", train, settings.massModel) # tractive effort and resisting forces (in N)
|
calculateForces!(drivingCourse[end], CSs, CS[:id], "default", train, settings.massModel) # tractive effort and resisting forces (in N)
|
||||||
|
|
|
@ -644,9 +644,7 @@ function CharacteristicSection(id::Integer, s_entry::Real, section::Dict, v_limi
|
||||||
:s_exit => section[:s_end], # last position (in m)
|
:s_exit => section[:s_end], # last position (in m)
|
||||||
:r_path => section[:f_Rp], # path resistance (in ‰)
|
:r_path => section[:f_Rp], # path resistance (in ‰)
|
||||||
:v_limit => v_limit, # speed limit (in m/s)
|
:v_limit => v_limit, # speed limit (in m/s)
|
||||||
# initializing :v_entry and :v_exit with :v_limit
|
:v_exit => v_limit) # maximum exit speed (in m/s) initialized with v_limit
|
||||||
:v_entry => v_limit, # maximum entry speed (in m/s)
|
|
||||||
:v_exit => v_limit) # maximum exit speed (in m/s)
|
|
||||||
|
|
||||||
# list of positions of every point of interest (POI) in this charateristic section for which support points should be calculated
|
# list of positions of every point of interest (POI) in this charateristic section for which support points should be calculated
|
||||||
s_exit = characteristicSection[:s_exit]
|
s_exit = characteristicSection[:s_exit]
|
||||||
|
|
Loading…
Reference in New Issue