-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
osrm-customize with conditional restrictions multiple times #6117
Comments
This should work as expected. Rerunning |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background: I want to make conditional restriction working, e.g.
no_left_turn@12:00-18:00
, as far as I know, the method is using following preprocess commands:For now it somehow works: if the first time do
osrm-customize
with a timestamp at10:00
, the above restriction is inactivated, and then if doosrm-customize
with a timestamp at13:00
, then above restriction will become activated.The problem is: if then we do
osrm-customize
again with a timestamp at19:00
the restriction is still activated (should not because19:00
is not between12:00-18:00
).I tried to read the source code of related part, this is my understanding:
turn weight stored in
.osrm.turn_weight_penalties
file, whenosrm-customize
executed with conditional restriction parameters, it will load.osrm.turn_weight_penalties
file and update/overwrite related weight with an max turn weight value (max float or int) if conditional restriction should activate according to passed-in timestamp, and then write it out. So the previous turn weight is lost as long as the restriction become activated once.My question is: is my understanding correct? If it works by design then how to make conditional restriction switch between activated and inactivated repeatedly with only
osrm-customize
?PS: A simple solution maybe:
osrm-cutomized
without conditional restriction parameters to make sure no conditional restriction overwrite native turn weight..osrm.turn_weight_penalties
fileosrm-cutomized
again first copy to.osrm.turn_weight_penalties
from the backup fileOr is there some better method?
Thanks for reading!
The text was updated successfully, but these errors were encountered: