-
Notifications
You must be signed in to change notification settings - Fork 698
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
Favor turn channels more #3222
Favor turn channels more #3222
Conversation
@@ -263,9 +262,7 @@ class SpeedAssigner { | |||
if (directededge.link()) { | |||
uint32_t speed = directededge.speed(); | |||
Use use = directededge.use(); | |||
if (use == Use::kTurnChannel && infer_turn_channels) { | |||
speed = static_cast<uint32_t>((speed * kTurnChannelFactor) + 0.5f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be noticed that durations will be increased after removing this line so I'm hesitating if it's the right move..
Alternative safe solution might be
- leave speed_assigner code as it is
- handle only
if (edge.has_historic_speeds)
case in theAutoCost::EdgeCost
cons:
- Different turn channel factor in 2 places. It would be better to have everything in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats a very good question you raise... here's my opinion:
in general, our speed assignments are always too optimistic. also turn channels are by definition short. i think its maybe its not a big deal to get 20% slower considering these two facts..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also turn channels are by definition short. i think its maybe its not a big deal to get 20% slower considering these two facts
agreed
looks like you need to update the isochrone tests since they change just slightly (i guess they get slightly smaller) |
thanks! didn't notice that ci had failed yeah, it's just 3 points were changed a little bit( +- 1-e4). Fixed 👍 |
@merkispavel @genadz here the route is red. i havent checked but i think this is possible. i would, like uturns, hope that we penalize sharp turns off of turn channels so this only happens if its the only possibility for whatever reason. anyway i was just wondering if you saw anything like that in RAD |
@kevinkreiser
I'll double check manually that this PR doesn't add such bugs but I bet I won't find them. Non-oneway end road + no uturn restriction .. the chances are pretty low |
yep i agree the chances are low, i just wanted to point it out |
the stop_impact is raised when making a sharp turn off of a turn channel - that likely will prevent this. |
Issue
At the moment we boost turn channel speeds by some factor
valhalla/src/mjolnir/speed_assigner.h
Line 267 in 5ec6f65
But we don't do anything with its speeds/costs when there are historic speeds.
PR changes:
kTurnChannel
edge cost for both has-historic-speeds and doesn't-have-historic-speeds cases1 / 0.6
)Screenshots
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?