Closed ArdtK closed 2 weeks ago
Can be reproduced by example_origin_destination_analysis
and example_optimal_route_origin_destination
:
from ra2ce.analysis.analysis_config_data.enums.weighing_enum import WeighingEnum
handler = Ra2ceHandler(network=network_ini, analysis=analysis_ini)
handler.input_config.analysis_config.config_data.analyses[0].weighing = WeighingEnum.TIME
handler.configure()
handler.run_analysis()
Analysis
nx.shortest_path
is used in:
nx.dijkstra_path_length
is used in:
These work on the next inputs:
This means that on all graphs the right attributes should be added:
Conclusion As the _hazard graphs are derived from the base graphs, fixing it on base_graph and origin_destinations_graph should be sufficient. Thus option 2. sounds the most viable.
Current flow avg_speed File avg_speed.csv is read/created on creation of OSM/Vector network.
Vector (vector_network_wrapper
)
If the network has attribute length
on all edges and maxspeed
on 1 or more edges:
nut.calc_avg_speed
and write result to avg_speed.csv.OSM (osm_network_wrapper
)
Same logic as for Vector.
Questions
Context During development of #433 it was found that also OD-analyses will fail when using
weighing == time
.Problem If
weighing == time
all edges should have a valid value for attributetime
. If not this message is thrown:Options
length
,time
andavgspeed
are present on all edges. <- PREFERREDScope
Notes After this the code changed in #433 can be simplified further.