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
Consider vehicle weight and length in autocost like in truckcost #4370
base: master
Are you sure you want to change the base?
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.
It's fine for me. Just a few nits.
src/mjolnir/pbfgraphparser.cc
Outdated
@@ -729,15 +729,15 @@ struct graph_callback : public OSMPBF::Callback { | |||
OSMAccessRestriction restriction; | |||
restriction.set_type(AccessType::kMaxLength); | |||
restriction.set_value(std::stof(tag_.second) * 100); | |||
restriction.set_modes(kTruckAccess); | |||
restriction.set_modes(kTruckAccess | 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.
plus all other modes, see above
|
||
using namespace valhalla; | ||
|
||
class CarRestrictionTest : public ::testing::TestWithParam<std::pair<std::string, std::string>> { |
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.
can you put that with gurka/test_truck_restrictions
and maybe rename that? recently we're trying not to create any more tests unless it's really warranted.
@@ -71,6 +71,8 @@ constexpr float kMaxFactor = 100000.0f; | |||
const std::string kDefaultAutoType = "car"; | |||
constexpr float kDefaultAutoHeight = 1.6f; // Meters (62.9921 inches) | |||
constexpr float kDefaultAutoWidth = 1.9f; // Meters (74.8031 inches) | |||
constexpr float kDefaultAutoLength = 4.0f; // Meters (157,4808 inches) | |||
constexpr float kDefaultAutoWeight = 2.4f; // / Metric Tons (48,000 lbs) |
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.
that's a huge SUV as default haha
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.
SUV, not really. length-wise this is a shorter than normal car. a typical sedan is something like 4.5 to 5m long. weight-wise i would agree this is on the heavier side but if you go with an average sedan weight of somethign like 3500lbs and add 1000lbs of people sitting in it and another 300lbs of crap in the trunk etc you are much closer to 2.4mtons (2.2 mtons).
be careful with the use of german decimal formatting above in the comments, it can really confuse non-german speakers/readers
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.
Yeah I mean the weight, not the length. And you're right, they don't fit very well.
also you'll need to run scripts/format.sh. |
Any update on this? Would be nice to have and its mostly done already |
Issue
Tasklist
Requirements / Relations
Frank Scholter Peres on behalf of Mercedes-Benz Tech Innovation GmbH.
Provider Information