antarctica / PolarRoute

Long-distance maritime polar route planning, taking into account complex changing environmental conditions.
https://antarctica.github.io/PolarRoute/
MIT License
17 stars 3 forks source link

Smoothing max iterations fix #297

Closed hjabbot closed 2 months ago

hjabbot commented 2 months ago

PolarRoute Pull Request Template

Date: 2024-09-25
Version Number: 0.6.5

Description of change

Fixes bug where smoothing_max_iterations: 1 was not being followed when specified in the route configs. In this, we discovered that the smoothing was looping and the iterator was off by 1, meaning that the output routes were being smoothed 1 less iteration than specified in the config. This requires updating the reg tests because of this off-by-one error. The final time/fuel/distance values are off by approximately 0.3%.

Fixes #296

Testing

To ensure that the functionality of the PolarRoute codebase remains consistent throughout the development cycle a testing strategy has been developed, which can be viewed in the document test/testing_strategy.md. This includes a collection of test files which should be run according to which part of the codebase has been altered in a pull request. Please consult the testing strategy to determine which tests need to be run.

Checklist

hjabbot commented 2 months ago

Something I just noticed is that the distance values in the old reg test files are very round numbers, and they aren't that anymore with the newly generated test output files. Any idea what would have changed?

gecoombs commented 2 months ago

Something I just noticed is that the distance values in the old reg test files are very round numbers, and they aren't that anymore with the newly generated test output files. Any idea what would have changed?

This is a bit strange, I can't see anything in the code on main that would round them but maybe these files were generated with an even older version of PolarRoute?