Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dvrp): cached free-speed matrices #3567

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

sebhoerl
Copy link
Contributor

@sebhoerl sebhoerl commented Nov 17, 2024

When working with large scenarios, calculating the dvrp global and mode-specific free-speed matrices takes a lot of time, especially when parametric studies are run in which this has to happen at every simulation start-up.

This PR introduces the possibility to cache the calculated free-speed matrices using the cachePath parameter in the respective DvrpTravelTimeMatrixParams. If the file does not exist, the matrix calculation is performed as usual and saved. If the file exists already, the matrix is read from the file. This way, when setting a global path, the calculation will be performed once in the parametric simulation series and then only read for all subsequent runs. There are various verifications included in the reading code to make sure that the travel times contained in the source file correspond to the present network and zoning system. The matrices are saved in a condensed custom binary format. Unit tests are provided.

@nkuehnel
Copy link
Member

Nice! Something that was on our list for weeks. Thank you so much!

@sebhoerl sebhoerl enabled auto-merge (squash) November 19, 2024 12:41
@sebhoerl sebhoerl merged commit b123ef4 into master Nov 19, 2024
49 checks passed
@sebhoerl sebhoerl deleted the feat/dvrp-cached-travel-time-matrix branch November 19, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants