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
Golf cart costing #4492
base: master
Are you sure you want to change the base?
Golf cart costing #4492
Conversation
…ses (the release image is 22.04 though)
…es. This should eliminate at least some concurrency questions
constexpr double gridsize = 100; | ||
|
||
// A network with a mixture of road classes, all of which are legally traversable | ||
const std::string ascii_map = R"( |
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.
Combine this into the access tests to reduce the number of executables that need to be built.
// 2 access flags that didn't fit in the previous 16 bits | ||
uint16_t golf_cart_forward_ : 1; | ||
uint16_t golf_cart_backward_ : 1; |
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.
Move this up to the top of the block; doesn't break anything.
Add BETA to docs and do a quick second pass on prose. |
Quick update on the status of this... I'm working to ensure the first version doesn't require too much of an overhaul later ;) To that end, I've been having conversations with others involved in the LSV space over the last month, and learned quite a few things about which assumptions are golf-cart specific and/or should be tunables vs being generally applicable, including things like "primary roads are actually routable in downtown LA because speed limits are so low." I'm continuing work on this in the background and will likely have a more polished generic LSV profile ready in a few weeks (I have completed most of the refactor to generalize terminology locally). |
@ianthetechie no worries i very much appreciate the diligence in using this last bit in the access mask and making it as worth it as possible 😄 |
Yeah, here's a quick info dump on that just so it's recorded in one piece (there will also be comments in the code to note areas for further improvement, specialization, etc.). First, there is no tagging scheme, either de facto or in use, which covers LSVs as a more general class, nor do I think there is likely to be one anytime soon. LSVs/quadricycles (EU equivalent) mostly behave like cars with somewhat different preferences and a federal/national or state law restricting roads they can legally use based on the posted speed limit. Thus, the access bit will have to go to golf carts, which do have a widely used tagging scheme and are often subject to specific restrictions that are only modeled this way. Fortunately, there are no scenarios I'm currently aware of preventing LSVs/NEVs which are not easily captured in some other attribute like max allowed (tagged) speed. So we'll get a general LSV profile that's tunable for both vehicle type and max allowed speed, and we can evolve it as we uncover more use cases. Most of my work recently has been around making sure that the first version allows for such expansion. |
this is sadly not fully true.. "max" allowed speed is not something we capture today for edges. we have a "tagged" speed, but that's not necessarily the OSM we do have |
Ahh, interesting. That's actually good to know... I guess we'll just need to document that's an edge case for now unless another solution presents itself. Of course there are options if you're willing to run a custom graph / pre-processed OSM data file specific for LSV routing, but that is indeed inconvenient that my assertion isn't fully true out of the box.
I understand that this is bad (slow), but out of curiosity just how "bad" is it? We aren't running hundreds of req/sec yet, but at moderate load we actually had (maybe still have? I forget 😂) deployed an older version of this PR that accessed the Would you be opposed to accessing this when a max legal speed limit is specified and clearly documenting the tradeoffs that you're opting into by doing this? It seems useful to me to unlock that use case unless I'm missing something (quite probably). I'm guessing adding |
you can have a look at this: #2910 (comment). I didn't really in a few years, can't remember well what the suggestion was exactly, but I remember thinking it would work before that particular project I was working on went away. |
* Preprocess language tags for admin polygons during graph building. * Use more optimal algorithm for finding if a point is covered by an admin or timezone polygon. * Disable internal SQLite memory accounting statistics to remove contentious mutex.
…' into golf-cart-costing
Issue
Adds golf cart costing (see #4475; let's discuss if this closes it or not).
Quick hits:
make -j8 check
locally, but it appears to be somewhat spurious related to floating point comparison; we'll see what the official CI run says.)Tasklist
Requirements / Relations
N/A?