-
Notifications
You must be signed in to change notification settings - Fork 673
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
make hgv-only edges also driveable to include in the reclassification logic #3860
Conversation
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.
Maybe I'm wrong but I think this is too broad. Let's discuss
Might very well be.. Like I said, didn't look into it that much. Wanted to do that tmrw with you guys. Just wanted to get a quick check if the tests at least pass. Not that it means too much, but at least that:) |
So, @kevinkreiser is right, this is too naive. We'll have to do the second pass he mentions, when we find that the first pass found a path that's excluding certain modes. So effectively we'll find a second path to up-class (or even more depending on how many modes are missing). |
… for checking the right access direction
f6acce3
to
f19f846
Compare
… for checking the right access direction
f19f846
to
9c2b8ca
Compare
…lhalla into nn-hgv-only-reclassification
…ber which modes were accessible in the resulting path(s)
This is finished. I'll comment more in the PR. |
if (node == (dt == Options::arrive_by ? "targets" : "sources")) { | ||
for (auto& loc : locations) { | ||
loc.set_date_time(dt == Options::current ? "current" : options.date_time()); | ||
} |
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.
just removing a few lines
class FerryTest : public ::testing::TestWithParam<std::string> { | ||
protected: |
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.
I made this a parameterized test class with all vehicular modes as parameters
I first committed the test with 79f6ea0, so it's easy to just run it with current master. |
Hm.. Wanted to run it on the test data of #3731 but on a 200 MB PBF took > 5 mins reclassifying ferry edges before I canceled it.. The whole planet takes that long with |
… attribute for mjolnir::Edge to remember access for _any_ vehicular mode
…hole (auto) access logic when constructing edges in mjolnir
uint16_t fwd_access; | ||
uint16_t rev_access; |
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.
I removed the driveableforward
& driveablereverse
booleans and replaced all logic depending on them with the access masks which are only set if there's no Use::EmergencyAccess
and has access to a vehicular mode.
I guess these would fit still into the attributes
bit field, now that there's 25 bits available, though then only 1 would be left (access has 12 bits in directed edges) and we'd need to re-write to this if we needed more attributes. So I'd leave it this way.
src/mjolnir/node_expander.cc
Outdated
auto edge_itr = edges[node.start_of]; | ||
auto edge = *edge_itr; | ||
auto edge = *edges[node.start_of]; | ||
uint16_t auto_fwd_access = edge.fwd_access & baldr::kAutoAccess; |
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.
change to bool
OSX failed on the |
fixes #3731
I'm not entirely sure if this is fine for all downstream logic.. it seems not too much depends on this directly or indirectly. If someone has a concern, please voice it.
Also, again, IMO including truck here is enough, no need to respect more modes like motorbike.