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
Configurable live speed traffic fading time #4177
Comments
Yeah, not having access to the config in costing makes quite a few things very ugly/hard.. @kevinkreiser had the idea to make the config a singleton which gets created first thing on startup of any process and is then easily accessible to every file. Then we remove all the code passing down the config to every small function way downstream. Is that smth you'd be interested in as well? The singleton itself isn't much work I think.. |
Thanks for the quick reply. The suggestion sounds useful and I could not think about any drawbacks to this singleton, it is just the bad rep that it gets and the many little rewrites of source and tests that makes me think about other ways to achieve the solution. Maybe it would be enough if we find a way to make the config pt available in the dynamic cost class? |
I looked into that before, I don't think we'd like that as a project (correct me @kevinkreiser). We should really do the work for the singleton (which is totally fine IMO, if used wisely), instead of further digging that hole. 95% of the changes are mechanical I think. |
yeah passing the config into every place we need costing is a refactor nightmare. we need to do the global config singleton idea and then remove config passing from vast swathes from the code base. i forget if i have an issue for this but its definitely the way to go |
its this one, just updated: #1158 |
Okay this will be something that we'll work on then |
It could be beneficial to have the live speed fading configurable in the valhalla.json. Currently it is hardcoded in the file
valhalla/baldr/graphtile.h
in the GetSpeed(...) function with:I am exploring ways to read out the value from the config and pass it to the GetSpeed-Function in a backwards compatible and contributable way that doesn't uglify the codebase. But reading the config in the cost models currently is not possible as far as I see it. Are there ways to get this value in the cost model that I am missing?
Janusz Spatz on behalf of Mercedes-Benz Tech Innovation GmbH.
Provider Information
The text was updated successfully, but these errors were encountered: