Closed LiekeMeijer closed 1 month ago
I can confirm this is a bug. It can be reproduced using the example in tests/test_data/simple_inputs
:
_case_dir = Path("tests", "test_data", "simple_inputs")
_network_config_data = NetworkConfigDataReader().read_file(_case_dir.joinpath("network.ini"))
_analyses_config_data = AnalysisConfigDataReader().read_file(_case_dir.joinpath("analysis.ini"))
# Modify the Analysis config data to weigh by `time`
_analyses_config_data[0].weighing = WeighingEnum.TIME
# Run analysis
Ra2ceHandler.run_with_config_data(_network_config_data, _analyses_config_data)
@LiekeMeijer it seems the notebook analysis crashes once time
is chosen as weighing as some edges lack the attribute time
.
This will lead to a crash of the analysis in single_link_redundancy
on line 83.
Should we investigate this further?
@mjevanmarle Is the time function still something that we want to support? I think we have not used this a lot over the past time but this may also be the explanation as to why it is not working at the moment.
Discussed: both time
and distance
should work. In case time
is missing avg_speed
should be used to calculate time
based on distance
.
@sahand-asgarpour could you plan a meeting for this?
This is a duplicate of #433 and can be closed if that issue is closed. Linking it to the same PR for that reason.
Ra2ce version checks
master
here.Reproducible example
I tested some functionality and tried to perform a single link redundancy with 'time' as the weighing parameter of the single link redundancy function. While RA2CE does not crash, the output is exactly the same as when using 'distance' as the weighing parameter. I am not sure if 'time' is still a functionality that we want to support, but probably? I have a Jupyter notebook and an analysis ini to reproduce upon request. I also do not see the 'time' option worked out in the code. If we do not support this anymore, we should update the documentation.
From @Carsopre: I can confirm this is a bug. It can be reproduced using the example in
tests/test_data/simple_inputs
:Current behaviour
Setting the weighing parameter to 'time' does not provide any other output than specifying 'distance' in the analysis ini for single link redundancy.
Desired behaviour
Using time as weight.
Additional context
No response