Skip to content

Calculate min weight only when necessary - #2909

Merged
karussell merged 4 commits into
masterfrom
create_min_weight
Dec 1, 2023
Merged

karussell merged 4 commits into
masterfrom
create_min_weight

Conversation

@karussell

Copy link
Copy Markdown
Member

Instead of retrieving the minimum weight already when creating the Weighting we can post-pone it until it is really used in the BeelineApproximator and when the getMaxOrMaxStorable returns the correct value. I.e. just before the algorithm runs.

We separated the findVariables and findMinMax methods so that we could even remove the findMinMax at a later state easier (this could be if we separated time calculation from the weight and if we then set "motorway" as maximum priority of 1).

The resulting advantage of the PR is that we won't need separate cache entries for a custom model (with potentially different maximum speeds). This simplifies a future refactoring.

@karussell karussell added this to the 9.0 milestone Nov 20, 2023
@karussell
karussell merged commit 63f7114 into master Dec 1, 2023
@karussell
karussell deleted the create_min_weight branch December 1, 2023 10:55

This branch was previously deployed

1 inactive deployment
benchmarks — df87d2b6 Deployed Nov 17, 2023 by karussell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant