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
"soft" ignore restrictions #4606
"soft" ignore restrictions #4606
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.
Not sure about another name either (other than ignore_safe_restrictions
which is also not very good), possibly only ignore_turn_conditional_restrictions
, bit long but describes best what it does.
There's a few more things to do, ideally they'd be tested with a parameterized test somewhere.
Also I know these kind of options weren't documented before, but we really should start documenting them. Would you be up for that? If you feel like including the other ignore_*
's as well, that'd be much appreciated. There's a collection of undocumented options here: #3760. One after the other:)
I think Anyway just ignore everything around naming in this PR for now, it's a bit all over the place. I'll add some more tests that test some more mode specific cases where |
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.
apart from naming: there's still costings missing.. ped not necessary, but why not the rest?
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.
looks good to me now!
then we can focus on the naming of it. I don't have a very strong opinion, though the only option I don't really like tbh is the current ignore_common_restrictions
.
valhalla/sif/dynamiccost.h
Outdated
@@ -605,7 +608,7 @@ class DynamicCost { | |||
if (access_type == baldr::AccessType::kTimedAllowed) | |||
time_allowed = true; | |||
|
|||
if (current_time == 0) { | |||
if (current_time == 0 || ignore_non_vehicular_restrictions_) { |
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'd put this into the if
on line 602, so time_allowed
will stay false if this option is given and we don't need it in the return
below.
src/sif/dynamiccost.cc
Outdated
gate_cost_{0.f, kDefaultGateCost, kMaxPenalty}, gate_penalty_{0.f, kDefaultGatePenalty, | ||
kMaxPenalty}, | ||
gate_cost_{0.f, kDefaultGateCost, kMaxPenalty}, | ||
gate_penalty_{0.f, kDefaultGatePenalty, kMaxPenalty}, |
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.
it doesn't seem like anything changed here. is it possible that you installed clang-format also from pacman rather than mason? looks like a typical "new version" edit
proto/options.proto
Outdated
oneof has_ignore_non_vehicular_restrictions { | ||
bool ignore_non_vehicular_restrictions = 84; | ||
} |
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.
no oneof
I edited the things we talked about @kevinkreiser , should be good now |
oops that broke smth |
…more/most of them, should refactor some), similar to the ranged equivalent
#define JSON_PBF_DEFAULT_V2(costing_options, def, json, json_key, option_name) \ | ||
{ \ | ||
costing_options->set_##option_name( \ | ||
rapidjson::get<std::remove_cv< \ | ||
std::remove_reference<decltype(def)>::type>::type>(json, json_key, \ | ||
costing_options->option_name() \ | ||
? costing_options->option_name() \ | ||
: def)); \ | ||
} |
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.
added one for non-oneof things. most boolean options have false
as default, we should refactor some and remove the oneof
s where it can be done.
so the normal release build works, but the arm & x86 lint-debug build fail. that's weird.. they're failing with
does that ring a bell @gknisely? seems related to #4605? the failing test also seems to be pretty unrelated to this PRs changes, so it seems flaky. |
Should just be creating a temporary file. Odd that this is failing. Are you sure unrelated? |
@gknisely at least this PR doesn't touch any of the graphbuilder logic or the test that fails. Just costings and some of those tests. So I'd say yeah, I'm very sure. Also the release build works. It's "just" the debug and arm build that fail that way. Locally it also doesn't fail. |
hm yeah, now it's the exact opposite! the release build is failing with the same problem, debug & arm builds are fine.. had a quick look at the test, but can't see anything wrong. the only way I'd see this failing would be if gtest would execute tests in parallel which I don't think it does. |
since the flaky test also fails on master's arm workflow currently, this PR should be good to merge. |
we previously looked at this @kevinkreiser and there were just a few things needed to be done before merging (done here), like remove the |
once it passes the master merge, I'd merge this too. it's been reviewed and amended. |
Issue
Follow-up to #4574, fixes #4571. ~~ Open to better ideas for a name. I'll list more as well if I come up with any. @nilsnolde's first take was
ignore_safe_restrictions
. ~~Edit: sticking with
ignore_non_vehicular_restrictions
now.Tasklist